diff --git a/src/blobstore/CMakeLists.txt b/src/blobstore/CMakeLists.txt index 141e33be..18fb6ec7 100644 --- a/src/blobstore/CMakeLists.txt +++ b/src/blobstore/CMakeLists.txt @@ -18,10 +18,6 @@ set(SOURCES add_library(${PROJECT_NAME} STATIC ${SOURCES}) -# This is needed by boost thread -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries(${PROJECT_NAME} PRIVATE rt) -endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils blockstore) target_add_boost(${PROJECT_NAME} filesystem system thread) diff --git a/src/blockstore/CMakeLists.txt b/src/blockstore/CMakeLists.txt index e435b4cd..804658b4 100644 --- a/src/blockstore/CMakeLists.txt +++ b/src/blockstore/CMakeLists.txt @@ -31,11 +31,6 @@ set(SOURCES add_library(${PROJECT_NAME} STATIC ${SOURCES}) -# This is needed by boost thread -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries(${PROJECT_NAME} PRIVATE rt) -endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils) target_add_boost(${PROJECT_NAME} filesystem system thread) diff --git a/src/cpp-utils/CMakeLists.txt b/src/cpp-utils/CMakeLists.txt index 9519158c..b66ba46d 100644 --- a/src/cpp-utils/CMakeLists.txt +++ b/src/cpp-utils/CMakeLists.txt @@ -37,10 +37,10 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES}) # This is needed by boost thread if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries(${PROJECT_NAME} PRIVATE rt) + target_link_libraries(${PROJECT_NAME} PUBLIC rt) endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") -target_link_libraries(${PROJECT_NAME} PRIVATE pthread curl) +target_link_libraries(${PROJECT_NAME} PUBLIC pthread curl) # TODO From Crypto++ 5.7 on, it should support cmake with find_package() instead of find_library(). find_library_with_path(CryptoPP cryptopp CRYPTOPP_LIB_PATH) diff --git a/src/fspp/CMakeLists.txt b/src/fspp/CMakeLists.txt index 3628fb67..45a25865 100644 --- a/src/fspp/CMakeLists.txt +++ b/src/fspp/CMakeLists.txt @@ -8,11 +8,6 @@ set(SOURCES add_library(${PROJECT_NAME} STATIC ${SOURCES}) -# This is needed by boost thread -if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_link_libraries(${PROJECT_NAME} PRIVATE rt) -endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") - target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64) target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils) diff --git a/utils.cmake b/utils.cmake index 4c2ead5b..71b8cec8 100644 --- a/utils.cmake +++ b/utils.cmake @@ -45,7 +45,7 @@ function(target_add_boost TARGET) REQUIRED COMPONENTS ${ARGN}) target_include_directories(${TARGET} SYSTEM PRIVATE ${Boost_INCLUDE_DIRS}) - target_link_libraries(${TARGET} PRIVATE ${Boost_LIBRARIES}) + target_link_libraries(${TARGET} PUBLIC ${Boost_LIBRARIES}) endfunction(target_add_boost) ##################################################