cmake_minimum_required(VERSION 3.0)
project(FireliteApp C CXX)
set (CMAKE_CXX_STANDARD 17)
string(LENGTH "${CMAKE_SOURCE_DIR}/" SOURCE_PATH_SIZE)
add_definitions("-DSOURCE_PATH_SIZE=${SOURCE_PATH_SIZE}")
find_package(Threads)
add_executable(FireliteApp src/dependency/Serial.cpp src/dependency/LinuxTimer.cpp src/dependency/data_type.cpp src/dependency/TASDP_COMM.cpp
src/dependency/DriverAppConfig.cpp src/dependency/JSONData.cpp
src/dependency/boot_data.cpp src/dependency/config_rx.cpp src/dependency/queue.c
src/sbus/core/SBusPkt.cpp src/sbus/core/sendsbus.cpp
src/sbus/expander/expander_sbus.c src/main.cpp
)
include_directories(include/ include/sbus/Core include/sbus/Expander include/dependency "${PROJECT_BINARY_DIR}")
target_include_directories(FireliteApp PUBLIC include)
target_include_directories(FireliteApp PUBLIC ../inc)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lrt -lm -g -pipe -Wall -lpthread ")
target_link_libraries(FireliteApp rt pthread )
set_property(TARGET FireliteApp PROPERTY CXX_STANDARD 17)
请帮帮我。我是 CMake 的新手