RobotKernal-UESTC/Code/MowingRobot/test_map/CMakeLists.txt

21 lines
435 B
CMake
Raw Normal View History

2024-03-08 17:56:05 +08:00
# 声明要求的 cmake 最低版本
cmake_minimum_required(VERSION 2.8)
# 声明一个 cmake 工程
project(test)
find_package(OpenCV REQUIRED)
# 设置编译模式
set(CMAKE_CXX_STANDARD 11)
# 添加一个可执行程序
# 语法add_executable( 程序名 源代码文件
set(SOURCES
src/main.cpp
)
add_executable(test ${SOURCES})
include_directories(${OpenCV_INCLUDE_DIRS})
target_link_libraries(test ${OpenCV_LIBS})