Files
DTU-HMI/CMakeLists.txt

39 lines
830 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(DTU_HMI)
set(CMAKE_C_STANDARD 99)
# 导出编译数据库,供 Cursor/clangd 使用
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
if(MSVC)
add_compile_options(/utf-8)
endif()
# 可选:启用 DEBUG 宏用于条件编译输出调试信息cmake -DENABLE_DEBUG=ON ..
option(ENABLE_DEBUG "Enable debug printf output" OFF)
if(ENABLE_DEBUG)
add_compile_definitions(DEBUG)
endif()
add_executable(DTU-HMI
src/main.c
src/thread_utils.c
src/remoteDisplay.c
src/Drv/menu.c
src/Drv/lcd.c
src/Drv/key.c
src/Drv/Ascii.c
src/Drv/display.c
src/TCP/tcp.c
)
target_include_directories(DTU-HMI PRIVATE include src src/TCP)
if(WIN32)
target_link_libraries(DTU-HMI PRIVATE ws2_32)
else()
target_link_libraries(DTU-HMI PRIVATE pthread)
endif()