From 8382dda5f97334f9e693dcd00ff952729e8802f1 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 28 Jul 2016 17:41:30 +0800 Subject: [PATCH] cmake: move common_utf8 closer to where it is used for example, json_spirit uses common_utf8, so link json_spirit against common_utf8. because libcommon includes json_spirit, this change does not impact the consumers of libcommon. Signed-off-by: Kefu Chai --- src/CMakeLists.txt | 2 +- src/json_spirit/CMakeLists.txt | 2 +- src/rgw/CMakeLists.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45a27a87205..2e3ff71bdc6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -518,7 +518,7 @@ endif(HAVE_ARMV8_CRC) add_library(common_utf8 STATIC common/utf8.c) -target_link_libraries(common json_spirit common_utf8 erasure_code rt uuid resolv ${CRYPTO_LIBS} ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${Backtrace_LIBRARIES}) +target_link_libraries(common json_spirit erasure_code rt uuid resolv ${CRYPTO_LIBS} ${Boost_LIBRARIES} ${BLKID_LIBRARIES} ${Backtrace_LIBRARIES}) if(${WITH_LTTNG}) add_subdirectory(tracing) diff --git a/src/json_spirit/CMakeLists.txt b/src/json_spirit/CMakeLists.txt index 75a734962dc..8abb5627242 100644 --- a/src/json_spirit/CMakeLists.txt +++ b/src/json_spirit/CMakeLists.txt @@ -1,4 +1,4 @@ add_library(json_spirit STATIC json_spirit_reader.cpp json_spirit_writer.cpp) -target_link_libraries(json_spirit ${Boost_LIBRARIES}) +target_link_libraries(json_spirit ${Boost_LIBRARIES} common_utf8) diff --git a/src/rgw/CMakeLists.txt b/src/rgw/CMakeLists.txt index 964880004a4..dcb7a8c937d 100644 --- a/src/rgw/CMakeLists.txt +++ b/src/rgw/CMakeLists.txt @@ -92,8 +92,8 @@ add_library(rgw_a STATIC ${rgw_a_srcs}) target_include_directories(rgw_a PUBLIC ${FCGI_INCLUDE_DIR}) target_link_libraries(rgw_a librados cls_rgw_client cls_refcount_client cls_log_client cls_statelog_client cls_timeindex_client cls_version_client - cls_replica_log_client cls_user_client curl global expat ${OPENLDAP_LIBRARIES} - ${CRYPTO_LIBS}) + cls_replica_log_client cls_user_client common common_utf8 curl global expat + ${OPENLDAP_LIBRARIES} ${CRYPTO_LIBS}) set(radosgw_srcs rgw_fcgi_process.cc -- 2.39.5