File tree Expand file tree Collapse file tree
src/dfm-search/dfm-search-lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,12 @@ include(CMakeFindDependencyMacro)
44find_dependency (Qt@QT_VERSION_MAJOR@ COMPONENTS Core )
55find_dependency (Dtk@DFM_VERSION_MAJOR@ COMPONENTS Core )
66find_dependency (Threads )
7- find_dependency (Boost COMPONENTS system )
7+ find_package (Boost REQUIRED )
8+
9+ if (Boost_VERSION_STRING VERSION_LESS "1.89.0" )
10+ message (STATUS "Boost < 1.89 → using Boost::system" )
11+ find_package (Boost REQUIRED COMPONENTS system )
12+ endif ()
813
914# 查找 PkgConfig 和 liblucene++ 依赖
1015find_dependency (PkgConfig )
Original file line number Diff line number Diff line change 22find_package (Qt${QT_VERSION_MAJOR} COMPONENTS Core REQUIRED )
33find_package (Dtk${DFM_VERSION_MAJOR} COMPONENTS Core REQUIRED )
44find_package (Threads REQUIRED )
5- find_package (Boost REQUIRED COMPONENTS system )
5+ find_package (Boost REQUIRED )
6+
7+ if (Boost_VERSION_STRING VERSION_LESS "1.89.0" )
8+ message (STATUS "Boost < 1.89 → using Boost::system" )
9+ find_package (Boost REQUIRED COMPONENTS system )
10+ endif ()
611
712find_package (PkgConfig REQUIRED )
813pkg_check_modules (Lucene REQUIRED IMPORTED_TARGET liblucene++ liblucene++-contrib )
@@ -18,9 +23,12 @@ target_link_libraries(${BIN_NAME} PUBLIC
1823 Dtk${DFM_VERSION_MAJOR}::Core
1924 PkgConfig::Lucene
2025 Threads::Threads
21- Boost::system
2226)
2327
28+ if (Boost_VERSION_STRING VERSION_LESS "1.89.0" )
29+ target_link_libraries (${BIN_NAME} PUBLIC Boost::system )
30+ endif ()
31+
2432target_include_directories (
2533 ${BIN_NAME}
2634PUBLIC
You can’t perform that action at this time.
0 commit comments