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
No related branches found
No related tags found
No related merge requests found
...@@ -137,7 +137,7 @@ endif() ...@@ -137,7 +137,7 @@ endif()
#Searching for Boost Package #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) if(Boost_FOUND)
list(APPEND packages Boost) list(APPEND packages Boost)
endif() endif()
......
...@@ -131,19 +131,30 @@ list(APPEND dir_to_link ...@@ -131,19 +131,30 @@ list(APPEND dir_to_link
${Boost_FILESYSTEM_LIBRARY} ${Boost_FILESYSTEM_LIBRARY}
${Boost_REGEX_LIBRARY} ${Boost_REGEX_LIBRARY}
${Boost_SERIALIZATION_LIBRARY} ${Boost_SERIALIZATION_LIBRARY}
${Boost_ASIO_LIBRARY} ${Boost_SYSTEM_LIBRARY} # Needed for the monitoring library linking
${Boost_BEAST_LIBRARY} ${Boost_IOSTREAMS_LIBRARY} # needed for the fles_ipc library linking
fmt::fmt fmt::fmt
) )
if(NOT APPLE) if(NOT APPLE)
list(APPEND dir_to_link ${Boost_THREAD_LIBRARY} -lrt) list(APPEND dir_to_link ${Boost_THREAD_LIBRARY} -lrt)
endif() endif()
set_target_properties(external::fles_ipc PROPERTIES # Hack such that for boost versions below 1.80.0 libzstd is found
IMPORTED_LOCATION ${FLESNET_DESTDIR}/src/flesnet-build/lib/fles_ipc/${CMAKE_STATIC_LIBRARY_PREFIX}fles_ipc${CMAKE_STATIC_LIBRARY_SUFFIX} if(APPLE AND Boost_VERSION LESS 1.80.0)
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}/flesnet/lib/fles_ipc set_target_properties(external::fles_ipc PROPERTIES
IMPORTED_LINK_INTERFACE_LIBRARIES "${dir_to_link}" 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.
Finish editing this message first!
Please register or to comment