You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
557 B

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
)