CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(twist2odom)
  3. add_compile_options(-std=c++14)
  4. find_package(catkin REQUIRED
  5. geometry_msgs
  6. nav_msgs
  7. roscpp
  8. roslint
  9. )
  10. catkin_package(
  11. CATKIN_DEPENDS
  12. geometry_msgs
  13. nav_msgs
  14. )
  15. include_directories(
  16. include
  17. ${catkin_INCLUDE_DIRS}
  18. )
  19. roslint_cpp()
  20. add_executable(${PROJECT_NAME}
  21. src/twist2odom.cpp
  22. src/twist2odom_node.cpp
  23. )
  24. add_dependencies(${PROJECT_NAME}
  25. ${${PROJECT_NAME}_EXPORTED_TARGETS}
  26. ${catkin_EXPORTED_TARGETS}
  27. )
  28. target_link_libraries(${PROJECT_NAME}
  29. ${catkin_LIBRARIES}
  30. )
  31. install(TARGETS
  32. ${PROJECT_NAME}
  33. ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  34. LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  35. RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  36. )
  37. if(CATKIN_ENABLE_TESTING)
  38. roslint_add_test()
  39. find_package(rostest REQUIRED)
  40. add_rostest_gtest(
  41. ${PROJECT_NAME}_test
  42. test/twist2odom_test.test
  43. test/twist2odom_test.cpp
  44. src/twist2odom.cpp
  45. )
  46. target_link_libraries(
  47. ${PROJECT_NAME}_test
  48. ${catkin_LIBRARIES}
  49. )
  50. endif()