From f2326f87142619d24aa860d2b092920c635cd6df Mon Sep 17 00:00:00 2001 From: pr4ku3p2c <925473174@qq.com> Date: Mon, 20 Jan 2025 18:08:27 +0800 Subject: [PATCH] ADD file via upload --- CMakeLists.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..6854c70 --- /dev/null +++ b/CMakeLists.txt @@ -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 +) \ No newline at end of file