/orunav_motion_planner/CMakeLists.txt

https://github.com/OrebroUniversity/navigation_oru-release · CMake · 113 lines · 89 code · 13 blank · 11 comment · 2 complexity · 671406f173e946c89175488f42802779 MD5 · raw file

  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(orunav_motion_planner)
  3. set(CMAKE_BUILD_TYPE Release)
  4. find_package(catkin REQUIRED COMPONENTS
  5. cmake_modules
  6. roscpp
  7. std_msgs
  8. nav_msgs
  9. cv_bridge
  10. orunav_msgs
  11. orunav_generic
  12. orunav_rviz
  13. orunav_conversions
  14. orunav_geometry
  15. )
  16. find_package(OpenCV REQUIRED)
  17. find_package(Eigen3)
  18. if(NOT EIGEN3_FOUND)
  19. # Fallback to cmake_modules
  20. find_package(cmake_modules REQUIRED)
  21. find_package(Eigen REQUIRED)
  22. set(EIGEN3_INCLUDE_DIRS ${EIGEN_INCLUDE_DIRS})
  23. else()
  24. set(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
  25. endif()
  26. ## System dependencies are found with CMake's conventions
  27. find_package(Boost REQUIRED COMPONENTS system program_options thread)
  28. if (${Boost_VERSION} LESS 106500)
  29. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DBOOST_MATH_DISABLE_FLOAT128")
  30. endif()
  31. #SET(CMAKE_CXX_FLAGS "-std=c++11 -O3")
  32. add_definitions(-std=c++11)
  33. catkin_package(
  34. INCLUDE_DIRS include
  35. LIBRARIES orunav_motion_planner
  36. CATKIN_DEPENDS roscpp std_msgs nav_msgs cv_bridge orunav_msgs orunav_generic orunav_rviz orunav_conversions orunav_geometry
  37. DEPENDS Boost
  38. )
  39. ###########
  40. ## Build ##
  41. ###########
  42. include_directories(
  43. include
  44. ${catkin_INCLUDE_DIRS}
  45. ${Boost_INCLUDE_DIRS}
  46. ${EIGEN3_INCLUDE_DIRS}
  47. )
  48. ## Declare a cpp executable
  49. add_executable(get_path_service src/get_path_service.cpp
  50. src/ARAStarPathPlanner.cpp
  51. src/AStar.cpp
  52. src/AStarPathPlanner.cpp
  53. src/CarConfiguration.cpp
  54. src/CarModel.cpp
  55. src/CollisionDetector.cpp
  56. src/Configuration.cpp
  57. src/DiscWorldVisualizer.cpp
  58. src/LHDConfiguration.cpp
  59. src/LHDModel.cpp
  60. src/MapGenerators.cpp
  61. src/MotionPrimitiveData.cpp
  62. src/MotionPrimitiveSelector.cpp
  63. src/PathFinder.cpp
  64. src/PathNode.cpp
  65. src/UnicycleConfiguration.cpp
  66. src/UnicycleModel.cpp
  67. src/Utils.cpp
  68. src/VehicleMission.cpp
  69. src/VehicleModel.cpp
  70. src/World.cpp
  71. src/WorldOccupancyMap.cpp
  72. src/WorldParameters.cpp
  73. )
  74. add_dependencies(get_path_service ${catkin_EXPORTED_TARGETS})
  75. target_link_libraries(get_path_service
  76. # orunav_motion_planner
  77. ${catkin_LIBRARIES} ${OpenCV_LIBS}
  78. )
  79. add_executable(get_path_client src/get_path_client.cpp)
  80. add_dependencies(get_path_client ${catkin_EXPORTED_TARGETS})
  81. target_link_libraries(get_path_client
  82. ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${OpenCV_LIBS}
  83. )
  84. #############
  85. ## Install ##
  86. #############
  87. install(TARGETS get_path_service get_path_client
  88. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  89. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  90. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  91. )
  92. install(DIRECTORY
  93. include/${PROJECT_NAME}/
  94. DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  95. )
  96. install(DIRECTORY
  97. LookupTables
  98. Primitives
  99. DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  100. )