From a27bbaaebf1391e41495f33d66237bcf485e332b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Sat, 30 Jul 2016 00:26:43 +0800 Subject: [PATCH] cmake: link libcommon against pthread as Thread.cc lives in libcommon, and global is not using libpthread directly. so moving libpthread linkage from libglobal to libcommon. Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 2 +- src/global/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 463d0d3c2e334..5a7e6126b9fa5 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -508,7 +508,7 @@ add_library(common STATIC ${libcommon_files} $) target_link_libraries(common json_spirit erasure_code rt resolv ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${Backtrace_LIBRARIES} - ${CRYPTO_LIBS} ${CMAKE_DL_LIBS}) + ${CRYPTO_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${CMAKE_DL_LIBS}) set_source_files_properties(${CMAKE_SOURCE_DIR}/src/ceph_ver.c ${CMAKE_SOURCE_DIR}/src/common/version.cc diff --git a/src/global/CMakeLists.txt b/src/global/CMakeLists.txt index 7cbee098d977f..f9a1c264ed32b 100644 --- a/src/global/CMakeLists.txt +++ b/src/global/CMakeLists.txt @@ -7,4 +7,4 @@ set(global_common_files add_library(global_common_objs OBJECT ${global_common_files}) add_library(global STATIC ${libglobal_srcs} $) -target_link_libraries(global common ${CMAKE_THREAD_LIBS_INIT} ${EXTRALIBS}) +target_link_libraries(global common ${EXTRALIBS}) -- 2.39.5