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