parent
95a37c42e4
commit
f2326f8714
@ -0,0 +1,26 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.10)
|
||||||
|
project(file_search)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# 查找依赖包
|
||||||
|
find_package(Xapian REQUIRED)
|
||||||
|
find_package(cppjieba REQUIRED)
|
||||||
|
find_package(httplib REQUIRED)
|
||||||
|
find_package(nlohmann_json REQUIRED)
|
||||||
|
|
||||||
|
# 添加可执行文件
|
||||||
|
add_executable(file_search
|
||||||
|
src/main.cpp
|
||||||
|
src/search_engine.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
# 链接依赖库
|
||||||
|
target_link_libraries(file_search
|
||||||
|
PRIVATE
|
||||||
|
Xapian::xapian
|
||||||
|
cppjieba::cppjieba
|
||||||
|
httplib::httplib
|
||||||
|
nlohmann_json::nlohmann_json
|
||||||
|
)
|
Loading…
Reference in new issue