CMakeLists.txt 435 B

12345678910111213141516171819202122232425
  1. cmake_minimum_required(VERSION 3.10)
  2. project(FeedLevelDetection)
  3. # 设置C++标准
  4. set(CMAKE_CXX_STANDARD 17)
  5. # 查找OpenCV包
  6. find_package(OpenCV REQUIRED)
  7. # 包含头文件目录
  8. include_directories(
  9. ${OpenCV_INCLUDE_DIRS}
  10. include
  11. )
  12. # 添加可执行文件
  13. add_executable(feed_level_detection
  14. src/FeedLevelDetector.cpp
  15. main.cpp
  16. )
  17. # 链接OpenCV库
  18. target_link_libraries(feed_level_detection
  19. ${OpenCV_LIBS}
  20. )