2022-04-26 19:55:44 +08:00
|
|
|
cmake_minimum_required(VERSION 3.10) # 设置cmake项目需要的cmake最小版本
|
|
|
|
|
|
|
|
|
|
|
|
project(auto_pilot_bus) # 设置项目的名称
|
|
|
|
|
|
|
|
set(CMAKE_C_STANDARD 11) # 设置项目的C语言标准版本
|
|
|
|
|
|
|
|
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/build) # 设置项目的产生的库的路径,这里直接设为二进制文件处
|
|
|
|
|
|
|
|
# 设置项目的头文件目录
|
|
|
|
include_directories(
|
|
|
|
${PROJECT_SOURCE_DIR}/include/
|
|
|
|
)
|
|
|
|
|
2022-04-29 10:37:33 +08:00
|
|
|
add_subdirectory(lib)
|
|
|
|
|
2022-04-26 19:55:44 +08:00
|
|
|
# 产生可执行文件
|
2022-04-29 10:37:33 +08:00
|
|
|
add_executable(bus main.c)
|
|
|
|
|
|
|
|
target_link_libraries(bus bus_lib)
|