Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,14 @@ add_definitions(-DVSOMEIP_INTERNAL_SUPPRESS_DEPRECATED)
# Threads
find_package(Threads REQUIRED)

# Boost
find_package( Boost 1.66 COMPONENTS system thread filesystem REQUIRED )
# Boost: once this is pushed passed 1.70, it should be found using CONFIG rather
# than CMake's FindBoost module, see policy CMP0167
find_package(
Boost 1.66 REQUIRED
COMPONENTS system thread filesystem
OPTIONAL_COMPONENTS stacktrace
)

if(${CMAKE_SYSTEM_NAME} MATCHES "QNX")
include_directories(${Boost_INCLUDE_DIR} )
else()
Expand Down Expand Up @@ -351,7 +357,7 @@ target_include_directories(${VSOMEIP_NAME} INTERFACE
# them (which shouldn't be required). ${Boost_LIBRARIES} includes absolute
# build host paths as of writing, which also makes this important as it breaks
# the build.
target_link_libraries(${VSOMEIP_NAME} PRIVATE ${Boost_LIBRARIES} ${USE_RT} ${DL_LIBRARY} ${DLT_LIBRARIES} ${SystemD_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(${VSOMEIP_NAME} PRIVATE ${Boost_LIBRARIES} $<$<TARGET_EXISTS:Boost::stacktrace>:Boost::stacktrace> ${USE_RT} ${DL_LIBRARY} ${DLT_LIBRARIES} ${SystemD_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})

if(NOT WIN32)
target_link_options(${VSOMEIP_NAME} PRIVATE "LINKER:-as-needed")
Expand Down
Loading