CMakeLists.txt 832 B

12345678910111213141516171819202122232425
  1. cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
  2. add_definitions(-std=c++11)
  3. set(CXX_FLAGS "-Wall" "-pedantic")
  4. set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}")
  5. project(camera_fusion)
  6. find_package(OpenCV 4.1 REQUIRED)
  7. find_package(PCL 1.7 REQUIRED)
  8. include_directories(${OpenCV_INCLUDE_DIRS})
  9. link_directories(${PCL_LIBRARY_DIRS})
  10. link_directories(${OpenCV_LIBRARY_DIRS})
  11. add_definitions(${OpenCV_DEFINITIONS})
  12. # Executables for exercises
  13. add_executable(lccp src/lccp.cpp)
  14. add_executable(show_lidar_top_view src/show_lidar_top_view.cpp src/structIO.cpp)
  15. target_link_libraries(show_lidar_top_view ${OpenCV_LIBRARIES})
  16. target_link_libraries(lccp ${OpenCV_LIBRARIES} ${PCL_LIBRARIES})
  17. add_executable(project_lidar_to_camera src/project_lidar_to_camera.cpp src/structIO.cpp)
  18. target_link_libraries(project_lidar_to_camera ${OpenCV_LIBRARIES})