Skip to content
Snippets Groups Projects
Commit 5f9b6bb1 authored by Pierre-Alain Loizeau's avatar Pierre-Alain Loizeau Committed by Administrator
Browse files

Fix boost requirements and deps for flesnet ipc in cmake files

Add missing iostreams and system requirement and dependency

Add special case for macosx
When using libboost_iostreams below 1.80.0 libzstd is linked explicitly
but not found even if installed in /usr/local/lib so we need to add this
path to the target properties.

MR 1607
Cherry-picked from 87b2a064
parent a7be40c7
Branches
Tags
No related merge requests found
......@@ -137,7 +137,7 @@ endif()
#Searching for Boost Package
find_package(Boost COMPONENTS serialization regex filesystem log log_setup container program_options thread)
find_package(Boost COMPONENTS serialization regex filesystem log log_setup container program_options thread iostreams system)
if(Boost_FOUND)
list(APPEND packages Boost)
endif()
......
......@@ -131,19 +131,30 @@ list(APPEND dir_to_link
${Boost_FILESYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY}
${Boost_SERIALIZATION_LIBRARY}
${Boost_ASIO_LIBRARY}
${Boost_BEAST_LIBRARY}
${Boost_SYSTEM_LIBRARY} # Needed for the monitoring library linking
${Boost_IOSTREAMS_LIBRARY} # needed for the fles_ipc library linking
fmt::fmt
)
if(NOT APPLE)
list(APPEND dir_to_link ${Boost_THREAD_LIBRARY} -lrt)
endif()
# Hack such that for boost versions below 1.80.0 libzstd is found
if(APPLE AND Boost_VERSION LESS 1.80.0)
set_target_properties(external::fles_ipc PROPERTIES
IMPORTED_LOCATION ${FLESNET_DESTDIR}/src/flesnet-build/lib/fles_ipc/${CMAKE_STATIC_LIBRARY_PREFIX}fles_ipc${CMAKE_STATIC_LIBRARY_SUFFIX}
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/flesnet/lib/fles_ipc
IMPORTED_LINK_INTERFACE_LIBRARIES "${dir_to_link}"
INTERFACE_LINK_DIRECTORIES "/usr/local/lib"
)
else ()
set_target_properties(external::fles_ipc PROPERTIES
IMPORTED_LOCATION ${FLESNET_DESTDIR}/src/flesnet-build/lib/fles_ipc/${CMAKE_STATIC_LIBRARY_PREFIX}fles_ipc${CMAKE_STATIC_LIBRARY_SUFFIX}
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/flesnet/lib/fles_ipc
IMPORTED_LINK_INTERFACE_LIBRARIES "${dir_to_link}"
)
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment