From 93ca40b66d45a5f864b3e047d1229f489bd9dd19 Mon Sep 17 00:00:00 2001 From: kel Date: Sat, 19 Nov 2016 00:34:36 +0300 Subject: [PATCH] Install libraries in lib64 directory on x64 systems --- CMakeLists.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8343f61b..446f5592 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic -fno-strict-aliasing") if(CMAKE_TARGET_ARCHITECTURE STREQUAL "x86_64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16") + set(LIB_SUFFIX "64") endif() if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0.0") # gcc 4.8 - 6: disable noise -Wunused-local-typedefs @@ -127,9 +128,9 @@ set_target_properties(${CDS_STATIC_LIBRARY} PROPERTIES DEBUG_POSTFIX "_d") target_link_libraries(${CDS_SHARED_LIBRARY} PRIVATE ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(${CDS_STATIC_LIBRARY} PRIVATE ${CMAKE_THREAD_LIBS_INIT}) -install(TARGETS ${CDS_SHARED_LIBRARY} LIBRARY DESTINATION lib COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) -install(TARGETS ${CDS_SHARED_LIBRARY} LIBRARY DESTINATION lib COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) -install(TARGETS ${CDS_STATIC_LIBRARY} DESTINATION lib COMPONENT ${LIBRARIES_COMPONENT}) +install(TARGETS ${CDS_SHARED_LIBRARY} LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT} NAMELINK_SKIP) +install(TARGETS ${CDS_SHARED_LIBRARY} LIBRARY DESTINATION lib${LIB_SUFFIX} COMPONENT ${HEADERS_COMPONENT} NAMELINK_ONLY) +install(TARGETS ${CDS_STATIC_LIBRARY} DESTINATION lib${LIB_SUFFIX} COMPONENT ${LIBRARIES_COMPONENT}) install(DIRECTORY ${PROJECT_SOURCE_DIR}/cds DESTINATION include COMPONENT ${HEADERS_COMPONENT}) if(WITH_TESTS) -- 2.34.1