Nicolas Porcel 7 лет назад
Родитель
Сommit
db8055f3dc
1 измененных файлов: 9 добавлений и 1 удалений
  1. 9
    1
      CMakeLists.txt

+ 9
- 1
CMakeLists.txt Просмотреть файл

@@ -118,7 +118,15 @@ else()
118 118
   endif()
119 119
 endif()
120 120
 
121
+get_property(LIB64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS)
122
+
123
+if ("${LIB64}" STREQUAL "TRUE")
124
+  set(LIBSUFFIX 64)
125
+else()
126
+  set(LIBSUFFIX "")
127
+endif()
128
+
121 129
 install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
122
-install( TARGETS ${LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib" )
130
+install( TARGETS ${LIBRARY_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIBSUFFIX}" )
123 131
 install( FILES ${CMAKE_SOURCE_DIR}/src/slop.hpp DESTINATION "${CMAKE_INSTALL_PREFIX}/include" COMPONENT development )
124 132
 install( FILES "${CMAKE_SOURCE_DIR}/${MANTARGET}" DESTINATION  "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT doc )