Bläddra i källkod

Merge pull request #87 from Nicop06/fix-install-lib64

Fix 64 bit install
Dalton Nell 6 år sedan
förälder
incheckning
25c133eba8
1 ändrade filer med 9 tillägg och 1 borttagningar
  1. 9
    1
      CMakeLists.txt

+ 9
- 1
CMakeLists.txt Visa fil

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 )