From f0057cd0c38dd071413eb3f041e738979ad82992 Mon Sep 17 00:00:00 2001 From: xtex Date: Tue, 6 Aug 2024 15:11:51 +0800 Subject: [PATCH] build: Find boost with name "Boost" 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 --- cmake/build_helpers.cmake | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index dce5eaae1b1dd..b82f786f202cd 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -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)