led_ctrl/CMakeLists.txt
2025-06-05 01:03:12 +00:00

21 lines
583 B
CMake
Raw 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(led_control)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# 设置头文件目录
include_directories(include)
# 查找src目录下所有cpp文件
file(GLOB SOURCES "src/*.cpp")
# 生成可执行文件
add_executable(led_app ${SOURCES})
# 链接需要的库示例链接pthread和toml11假设toml11是头文件库不用链接
find_package(Threads REQUIRED)
target_link_libraries(led_app PRIVATE Threads::Threads)
# 如果你toml11是以静态库形式存在或有其他依赖库记得这里添加