Skip to content

Commit

Permalink
fix: workaround for new boost versions which have a process component
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 25, 2024
1 parent 744e9fb commit 6c8a1cd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion cmake/dwarfs-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)
Expand Down
4 changes: 4 additions & 0 deletions cmake/libdwarfs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c8a1cd

Please sign in to comment.