瀏覽代碼

Fix 64 bit install

Nicolas Porcel 7 年之前
父節點
當前提交
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 )