CMakeLists.txt 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(op_simu)
  3. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
  4. find_package(autoware_build_flags REQUIRED)
  5. find_package(catkin REQUIRED COMPONENTS
  6. op_utility
  7. op_planner
  8. )
  9. find_package(OpenCV REQUIRED)
  10. find_package(OpenGL REQUIRED)
  11. find_package(GLEW REQUIRED)
  12. find_package(GLUT REQUIRED)
  13. find_package(X11 REQUIRED)
  14. find_package(Threads REQUIRED)
  15. catkin_package(
  16. INCLUDE_DIRS include
  17. LIBRARIES ${PROJECT_NAME}
  18. CATKIN_DEPENDS op_utility op_planner
  19. )
  20. include_directories(
  21. include
  22. ${catkin_INCLUDE_DIRS}
  23. ${OpenCV_INCLUDE_DIRS}
  24. ${OpenGL_INCLUDE_DIRS}
  25. ${GLUT_INCLUDE_DIRS}
  26. ${GLEW_INCLUDE_DIRS}
  27. )
  28. set(SIMUH_SRC
  29. src/SimpleTracker.cpp
  30. src/SimulatedTrajectoryFollower.cpp
  31. src/TrajectoryFollower.cpp
  32. )
  33. ## Declare a cpp library
  34. add_library(${PROJECT_NAME}
  35. ${SIMUH_SRC}
  36. )
  37. target_link_libraries(${PROJECT_NAME}
  38. ${catkin_LIBRARIES}
  39. ${OpenCV_LIBRARIES}
  40. ${OPENGL_LIBRARIES}
  41. ${GLUT_LIBRARIES}
  42. ${GLEW_LIBRARIES}
  43. ${X11_LIBRARIES}
  44. ${CMAKE_THREAD_LIBS_INIT}
  45. )
  46. add_executable(Simu
  47. ${SIMUH_SRC}
  48. main.cpp
  49. )
  50. target_link_libraries(Simu
  51. ${catkin_LIBRARIES}
  52. ${OpenCV_LIBS}
  53. ${OPENGL_LIBRARIES}
  54. ${GLUT_LIBRARIES}
  55. ${GLUT_LIBRARY}
  56. ${GLEW_LIBRARIES}
  57. ${X11_LIBRARIES}
  58. ${CMAKE_THREAD_LIBS_INIT}
  59. )
  60. install(DIRECTORY include/${PROJECT_NAME}/
  61. DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  62. FILES_MATCHING PATTERN "*.h"
  63. )
  64. install(TARGETS ${PROJECT_NAME} Simu
  65. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  66. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  67. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  68. )