fix: workaround for new boost versions which have a process component

This commit is contained in:
Marcus Holland-Moritz 2024-08-25 10:10:21 +02:00
parent 744e9fb52b
commit 6c8a1cdbd3
3 changed files with 10 additions and 2 deletions

View File

@ -187,7 +187,9 @@ include(${CMAKE_SOURCE_DIR}/cmake/need_range_v3.cmake)
if(WITH_LIBDWARFS)
include(${CMAKE_SOURCE_DIR}/cmake/need_phmap.cmake)
find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED COMPONENTS chrono iostreams program_options)
find_package(Boost ${BOOST_REQUIRED_VERSION} REQUIRED CONFIG
COMPONENTS chrono iostreams program_options
OPTIONAL_COMPONENTS process)
if(APPLE)
if(USE_HOMEBREW_LIBARCHIVE)

View File

@ -21,7 +21,9 @@ endif()
find_dependency(Threads REQUIRED)
find_dependency(fmt CONFIG REQUIRED)
find_dependency(gflags CONFIG REQUIRED)
find_dependency(Boost @BOOST_REQUIRED_VERSION@ REQUIRED COMPONENTS chrono context filesystem iostreams program_options regex system thread)
find_dependency(Boost @BOOST_REQUIRED_VERSION@ REQUIRED CONFIG
COMPONENTS chrono context filesystem iostreams program_options regex system thread
OPTIONAL_COMPONENTS process)
pkg_check_modules(LIBCRYPTO REQUIRED IMPORTED_TARGET libcrypto>=@LIBCRYPTO_REQUIRED_VERSION@)
pkg_check_modules(LIBARCHIVE REQUIRED IMPORTED_TARGET libarchive>=@LIBARCHIVE_REQUIRED_VERSION@)
pkg_check_modules(XXHASH REQUIRED IMPORTED_TARGET libxxhash>=@XXHASH_REQUIRED_VERSION@)

View File

@ -221,6 +221,10 @@ target_link_libraries(
dwarfs_fsst
)
if(TARGET Boost::process)
target_link_libraries(dwarfs_common PUBLIC Boost::process)
endif()
list(APPEND LIBDWARFS_TARGETS
dwarfs_common
dwarfs_reader