kunlang_config_server/CMakeLists.txt
2025-12-12 09:02:06 +08:00

30 lines
695 B
CMake
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

cmake_minimum_required(VERSION 3.10)
project(demo_config_server LANGUAGES CXX)
# C++ 标准
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# 可执行文件输出到 ./bin 目录
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
# 源文件
add_executable(config_server
src/config_server.cpp
)
# 头文件路径httplib/json 都在这里)
target_include_directories(config_server
PRIVATE
${CMAKE_SOURCE_DIR}/include
)
# 如果用到了多线程httplib 常见),顺手连上线程库,没用也没事
find_package(Threads REQUIRED)
target_link_libraries(config_server
PRIVATE
Threads::Threads
)