|
| 1 | +cmake_minimum_required(VERSION 2.8.3) |
| 2 | +project(catmux) |
| 3 | + |
| 4 | +## Compile as C++11, supported in ROS Kinetic and newer |
| 5 | +# add_compile_options(-std=c++11) |
| 6 | + |
| 7 | +## Find catkin macros and libraries |
| 8 | +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) |
| 9 | +## is used, also find other catkin packages |
| 10 | +find_package(catkin REQUIRED COMPONENTS |
| 11 | +catkin_pkg rospy |
| 12 | +) |
| 13 | + |
| 14 | +## System dependencies are found with CMake's conventions |
| 15 | +# find_package(Boost REQUIRED COMPONENTS system) |
| 16 | + |
| 17 | +## Uncomment this if the package has a setup.py. This macro ensures |
| 18 | +## modules and global scripts declared therein get installed |
| 19 | +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html |
| 20 | +catkin_python_setup() |
| 21 | + |
| 22 | +################################################ |
| 23 | +## Declare ROS messages, services and actions ## |
| 24 | +################################################ |
| 25 | + |
| 26 | +## To declare and build messages, services or actions from within this |
| 27 | +## package, follow these steps: |
| 28 | +## * Let MSG_DEP_SET be the set of packages whose message types you use in |
| 29 | +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). |
| 30 | +## * In the file package.xml: |
| 31 | +## * add a build_depend tag for "message_generation" |
| 32 | +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET |
| 33 | +## * If MSG_DEP_SET isn't empty the following dependency has been pulled in |
| 34 | +## but can be declared for certainty nonetheless: |
| 35 | +## * add a run_depend tag for "message_runtime" |
| 36 | +## * In this file (CMakeLists.txt): |
| 37 | +## * add "message_generation" and every package in MSG_DEP_SET to |
| 38 | +## find_package(catkin REQUIRED COMPONENTS ...) |
| 39 | +## * add "message_runtime" and every package in MSG_DEP_SET to |
| 40 | +## catkin_package(CATKIN_DEPENDS ...) |
| 41 | +## * uncomment the add_*_files sections below as needed |
| 42 | +## and list every .msg/.srv/.action file to be processed |
| 43 | +## * uncomment the generate_messages entry below |
| 44 | +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) |
| 45 | + |
| 46 | +## Generate messages in the 'msg' folder |
| 47 | +# add_message_files( |
| 48 | +# FILES |
| 49 | +# Message1.msg |
| 50 | +# Message2.msg |
| 51 | +# ) |
| 52 | + |
| 53 | +## Generate services in the 'srv' folder |
| 54 | +# add_service_files( |
| 55 | +# FILES |
| 56 | +# Service1.srv |
| 57 | +# Service2.srv |
| 58 | +# ) |
| 59 | + |
| 60 | +## Generate actions in the 'action' folder |
| 61 | +# add_action_files( |
| 62 | +# FILES |
| 63 | +# Action1.action |
| 64 | +# Action2.action |
| 65 | +# ) |
| 66 | + |
| 67 | +## Generate added messages and services with any dependencies listed here |
| 68 | +# generate_messages( |
| 69 | +# DEPENDENCIES |
| 70 | +# std_msgs # Or other packages containing msgs |
| 71 | +# ) |
| 72 | + |
| 73 | +################################################ |
| 74 | +## Declare ROS dynamic reconfigure parameters ## |
| 75 | +################################################ |
| 76 | + |
| 77 | +## To declare and build dynamic reconfigure parameters within this |
| 78 | +## package, follow these steps: |
| 79 | +## * In the file package.xml: |
| 80 | +## * add a build_depend and a run_depend tag for "dynamic_reconfigure" |
| 81 | +## * In this file (CMakeLists.txt): |
| 82 | +## * add "dynamic_reconfigure" to |
| 83 | +## find_package(catkin REQUIRED COMPONENTS ...) |
| 84 | +## * uncomment the "generate_dynamic_reconfigure_options" section below |
| 85 | +## and list every .cfg file to be processed |
| 86 | + |
| 87 | +## Generate dynamic reconfigure parameters in the 'cfg' folder |
| 88 | +# generate_dynamic_reconfigure_options( |
| 89 | +# cfg/DynReconf1.cfg |
| 90 | +# cfg/DynReconf2.cfg |
| 91 | +# ) |
| 92 | + |
| 93 | +################################### |
| 94 | +## catkin specific configuration ## |
| 95 | +################################### |
| 96 | +## The catkin_package macro generates cmake config files for your package |
| 97 | +## Declare things to be passed to dependent projects |
| 98 | +## INCLUDE_DIRS: uncomment this if your package contains header files |
| 99 | +## LIBRARIES: libraries you create in this project that dependent projects also need |
| 100 | +## CATKIN_DEPENDS: catkin_packages dependent projects also need |
| 101 | +## DEPENDS: system dependencies of this project that dependent projects also need |
| 102 | +catkin_package( |
| 103 | + CATKIN_DEPENDS |
| 104 | +catkin_pkg rospy |
| 105 | +) |
| 106 | + |
| 107 | +########### |
| 108 | +## Build ## |
| 109 | +########### |
| 110 | + |
| 111 | +## Specify additional locations of header files |
| 112 | +## Your package locations should be listed before other locations |
| 113 | +include_directories( |
| 114 | +# include |
| 115 | + ${catkin_INCLUDE_DIRS} |
| 116 | +) |
| 117 | + |
| 118 | +## Declare a C++ library |
| 119 | +# add_library(${PROJECT_NAME} |
| 120 | +# src/${PROJECT_NAME}/catmux.cpp |
| 121 | +# ) |
| 122 | + |
| 123 | +## Add cmake target dependencies of the library |
| 124 | +## as an example, code may need to be generated before libraries |
| 125 | +## either from message generation or dynamic reconfigure |
| 126 | +# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) |
| 127 | + |
| 128 | +## Declare a C++ executable |
| 129 | +## With catkin_make all packages are built within a single CMake context |
| 130 | +## The recommended prefix ensures that target names across packages don't collide |
| 131 | +# add_executable(${PROJECT_NAME}_node src/catmux_node.cpp) |
| 132 | + |
| 133 | +## Rename C++ executable without prefix |
| 134 | +## The above recommended prefix causes long target names, the following renames the |
| 135 | +## target back to the shorter version for ease of user use |
| 136 | +## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" |
| 137 | +# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") |
| 138 | + |
| 139 | +## Add cmake target dependencies of the executable |
| 140 | +## same as for the library above |
| 141 | +# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) |
| 142 | + |
| 143 | +## Specify libraries to link a library or executable target against |
| 144 | +# target_link_libraries(${PROJECT_NAME}_node |
| 145 | +# ${catkin_LIBRARIES} |
| 146 | +# ) |
| 147 | + |
| 148 | +############# |
| 149 | +## Install ## |
| 150 | +############# |
| 151 | + |
| 152 | +# all install targets should use catkin DESTINATION variables |
| 153 | +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html |
| 154 | + |
| 155 | +## Mark executable scripts (Python etc.) for installation |
| 156 | +## in contrast to setup.py, you can choose the destination |
| 157 | + |
| 158 | + |
| 159 | +## Mark executables and/or libraries for installation |
| 160 | +# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node |
| 161 | +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
| 162 | +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
| 163 | +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
| 164 | +# ) |
| 165 | + |
| 166 | +## Mark cpp header files for installation |
| 167 | +# install(DIRECTORY include/${PROJECT_NAME}/ |
| 168 | +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} |
| 169 | +# FILES_MATCHING PATTERN "*.h" |
| 170 | +# PATTERN ".svn" EXCLUDE |
| 171 | +# ) |
| 172 | + |
| 173 | +## Mark other files for installation (e.g. launch and bag files, etc.) |
| 174 | +# install(FILES |
| 175 | +# # myfile1 |
| 176 | +# # myfile2 |
| 177 | +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
| 178 | +# ) |
| 179 | + |
| 180 | +############# |
| 181 | +## Testing ## |
| 182 | +############# |
| 183 | + |
| 184 | +## Add gtest based cpp test target and link libraries |
| 185 | +# catkin_add_gtest(${PROJECT_NAME}-test test/test_catmux.cpp) |
| 186 | +# if(TARGET ${PROJECT_NAME}-test) |
| 187 | +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) |
| 188 | +# endif() |
| 189 | + |
| 190 | +## Add folders to be run by python nosetests |
| 191 | +# catkin_add_nosetests(test) |
| 192 | +catkin_install_python(PROGRAMS script/create_session |
| 193 | + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
0 commit comments