CMakeLists.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. cmake_minimum_required(VERSION 2.8.3)
  2. project(robot_bringup)
  3. ## Compile as C++11, supported in ROS Kinetic and newer
  4. # add_compile_options(-std=c++11)
  5. ## Find catkin macros and libraries
  6. ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
  7. ## is used, also find other catkin packages
  8. find_package(catkin REQUIRED
  9. roscpp
  10. ros_arduino_msgs
  11. std_msgs
  12. )
  13. ## System dependencies are found with CMake's conventions
  14. # find_package(Boost REQUIRED COMPONENTS system)
  15. ###################################
  16. ## catkin specific configuration ##
  17. ###################################
  18. ## The catkin_package macro generates cmake config files for your package
  19. ## Declare things to be passed to dependent projects
  20. ## INCLUDE_DIRS: uncomment this if your package contains header files
  21. ## LIBRARIES: libraries you create in this project that dependent projects also need
  22. ## CATKIN_DEPENDS: catkin_packages dependent projects also need
  23. ## DEPENDS: system dependencies of this project that dependent projects also need
  24. catkin_package(
  25. # INCLUDE_DIRS include
  26. # LIBRARIES robot_bringup
  27. # CATKIN_DEPENDS other_catkin_pkg
  28. # DEPENDS system_lib
  29. )
  30. ###########
  31. ## Build ##
  32. ###########
  33. ## Specify additional locations of header files
  34. ## Your package locations should be listed before other locations
  35. include_directories(
  36. # include
  37. ${catkin_INCLUDE_DIRS}
  38. )
  39. ## Declare a C++ library
  40. # add_library(${PROJECT_NAME}
  41. # src/${PROJECT_NAME}/robot_bringup.cpp
  42. # )
  43. ## Add cmake target dependencies of the library
  44. ## as an example, code may need to be generated before libraries
  45. ## either from message generation or dynamic reconfigure
  46. # add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
  47. ## Declare a C++ executable
  48. ## With catkin_make all packages are built within a single CMake context
  49. ## The recommended prefix ensures that target names across packages don't collide
  50. add_executable(get_battery_node src/get_battery.cpp)
  51. ## Rename C++ executable without prefix
  52. ## The above recommended prefix causes long target names, the following renames the
  53. ## target back to the shorter version for ease of user use
  54. ## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
  55. # set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
  56. ## Add cmake target dependencies of the executable
  57. ## same as for the library above
  58. add_dependencies(get_battery_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
  59. ## Specify libraries to link a library or executable target against
  60. target_link_libraries(get_battery_node
  61. ${catkin_LIBRARIES}
  62. )
  63. #############
  64. ## Install ##
  65. #############
  66. # all install targets should use catkin DESTINATION variables
  67. # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
  68. ## Mark executable scripts (Python etc.) for installation
  69. ## in contrast to setup.py, you can choose the destination
  70. # install(PROGRAMS
  71. # scripts/my_python_script
  72. # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  73. # )
  74. ## Mark executables and/or libraries for installation
  75. # install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node
  76. # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  77. # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
  78. # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
  79. # )
  80. ## Mark cpp header files for installation
  81. # install(DIRECTORY include/${PROJECT_NAME}/
  82. # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
  83. # FILES_MATCHING PATTERN "*.h"
  84. # PATTERN ".svn" EXCLUDE
  85. # )
  86. ## Mark other files for installation (e.g. launch and bag files, etc.)
  87. # install(FILES
  88. # # myfile1
  89. # # myfile2
  90. # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
  91. # )
  92. #############
  93. ## Testing ##
  94. #############
  95. ## Add gtest based cpp test target and link libraries
  96. # catkin_add_gtest(${PROJECT_NAME}-test test/test_robot_bringup.cpp)
  97. # if(TARGET ${PROJECT_NAME}-test)
  98. # target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
  99. # endif()
  100. ## Add folders to be run by python nosetests
  101. # catkin_add_nosetests(test)