Fix compile on Debian 8 (link it to a library it wants)
This commit is contained in:
parent
31bf927e07
commit
e44c44334f
@ -18,10 +18,6 @@ set(SOURCES
|
|||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${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_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils blockstore)
|
||||||
|
|
||||||
target_add_boost(${PROJECT_NAME} filesystem system thread)
|
target_add_boost(${PROJECT_NAME} filesystem system thread)
|
||||||
|
@ -31,11 +31,6 @@ set(SOURCES
|
|||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${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_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
|
||||||
|
|
||||||
target_add_boost(${PROJECT_NAME} filesystem system thread)
|
target_add_boost(${PROJECT_NAME} filesystem system thread)
|
||||||
|
@ -37,10 +37,10 @@ add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
|||||||
|
|
||||||
# This is needed by boost thread
|
# This is needed by boost thread
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
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")
|
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().
|
# 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)
|
find_library_with_path(CryptoPP cryptopp CRYPTOPP_LIB_PATH)
|
||||||
|
@ -8,11 +8,6 @@ set(SOURCES
|
|||||||
|
|
||||||
add_library(${PROJECT_NAME} STATIC ${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_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
|
||||||
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
|
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ function(target_add_boost TARGET)
|
|||||||
REQUIRED
|
REQUIRED
|
||||||
COMPONENTS ${ARGN})
|
COMPONENTS ${ARGN})
|
||||||
target_include_directories(${TARGET} SYSTEM PRIVATE ${Boost_INCLUDE_DIRS})
|
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)
|
endfunction(target_add_boost)
|
||||||
|
|
||||||
##################################################
|
##################################################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user