Browse Source

Fix 64 bit install

Nicolas Porcel 7 years ago
parent
commit
db8055f3dc
1 changed files with 9 additions and 1 deletions
  1. 9
    1
      CMakeLists.txt

+ 9
- 1
CMakeLists.txt View File

118
   endif()
118
   endif()
119
 endif()
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
 install( TARGETS ${EXECUTABLE_NAME} DESTINATION "${CMAKE_INSTALL_PREFIX}/bin" )
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
 install( FILES ${CMAKE_SOURCE_DIR}/src/slop.hpp DESTINATION "${CMAKE_INSTALL_PREFIX}/include" COMPONENT development )
131
 install( FILES ${CMAKE_SOURCE_DIR}/src/slop.hpp DESTINATION "${CMAKE_INSTALL_PREFIX}/include" COMPONENT development )
124
 install( FILES "${CMAKE_SOURCE_DIR}/${MANTARGET}" DESTINATION  "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT doc )
132
 install( FILES "${CMAKE_SOURCE_DIR}/${MANTARGET}" DESTINATION  "${CMAKE_INSTALL_MANDIR}/man1" COMPONENT doc )