Skip to content

Commit

Permalink
build: Find boost with name "Boost"
Browse files Browse the repository at this point in the history
On many distributions like AOSC OS, Alpine Linux, Arch Linux, etc., boost should be searched with name "Boost".
This should fix the packaging issue on AOSC OS.

Signed-off-by: xtex <[email protected]>
  • Loading branch information
xtexChooser committed Aug 6, 2024
1 parent 63c6028 commit f0057cd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cmake/build_helpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -702,8 +702,13 @@ macro(addBundledLibraries)
endif()

if (USE_SYSTEM_BOOST)
find_package(boost REQUIRED)
set(BOOST_LIBRARIES boost::regex)
find_package(boost QUIET)
if (boost_FOUND)
set(BOOST_LIBRARIES boost::regex)
else()
find_package(Boost CONFIG REQUIRED)
set(BOOST_LIBRARIES Boost::regex)
endif()
else()
add_subdirectory(${THIRD_PARTY_LIBS_FOLDER}/boost ${CMAKE_CURRENT_BINARY_DIR}/boost EXCLUDE_FROM_ALL)
set(BOOST_LIBRARIES boost::regex)
Expand Down

0 comments on commit f0057cd

Please sign in to comment.