|
1 |
| -cmake_minimum_required(VERSION 2.4.6) |
2 |
| -include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) |
3 |
| - |
4 |
| -# Set the build type. Options are: |
5 |
| -# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage |
6 |
| -# Debug : w/ debug symbols, w/o optimization |
7 |
| -# Release : w/o debug symbols, w/ optimization |
8 |
| -# RelWithDebInfo : w/ debug symbols, w/ optimization |
9 |
| -# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries |
10 |
| -#set(ROS_BUILD_TYPE RelWithDebInfo) |
11 |
| - |
12 |
| -rosbuild_init() |
13 |
| - |
14 |
| -#set the default path for built executables to the "bin" directory |
15 |
| -set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin) |
16 |
| -#set the default path for built libraries to the "lib" directory |
17 |
| -set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) |
18 |
| - |
19 |
| -#uncomment if you have defined messages |
20 |
| -#rosbuild_genmsg() |
21 |
| -#uncomment if you have defined services |
22 |
| -#rosbuild_gensrv() |
23 |
| - |
24 |
| -rosbuild_add_executable(basic_shapes src/basic_shapes.cpp) |
25 |
| -rosbuild_add_executable(points_and_lines src/points_and_lines.cpp) |
| 1 | +cmake_minimum_required(VERSION 2.8.3) |
| 2 | +project(visualization_marker_tutorials) |
| 3 | + |
| 4 | +find_package(catkin REQUIRED COMPONENTS roscpp visualization_msgs) |
| 5 | + |
| 6 | +################################### |
| 7 | +## catkin specific configuration ## |
| 8 | +################################### |
| 9 | +## The catkin_package macro generates cmake config files for your package |
| 10 | +## Declare things to be passed to dependent projects |
| 11 | +## LIBRARIES: libraries you create in this project that dependent projects also need |
| 12 | +## CATKIN_DEPENDS: catkin_packages dependent projects also need |
| 13 | +## DEPENDS: system dependencies of this project that dependent projects also need |
| 14 | + |
| 15 | +catkin_package( |
| 16 | + CATKIN_DEPENDS roscpp visualization_msgs |
| 17 | +) |
| 18 | + |
| 19 | +########### |
| 20 | +## Build ## |
| 21 | +########### |
| 22 | + |
| 23 | +include_directories(include |
| 24 | + ${catkin_INCLUDE_DIRS} |
| 25 | +) |
| 26 | + |
| 27 | +add_executable(basic_shapes src/basic_shapes.cpp) |
| 28 | +target_link_libraries(basic_shapes |
| 29 | + ${catkin_LIBRARIES} |
| 30 | +) |
| 31 | + |
| 32 | +add_executable(points_and_lines src/points_and_lines.cpp) |
| 33 | +target_link_libraries(points_and_lines |
| 34 | + ${catkin_LIBRARIES} |
| 35 | +) |
| 36 | + |
| 37 | +############# |
| 38 | +## Install ## |
| 39 | +############# |
| 40 | + |
| 41 | +## Mark executables and/or libraries for installation |
| 42 | +install(TARGETS |
| 43 | + basic_shapes |
| 44 | + points_and_lines |
| 45 | + ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
| 46 | + LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
| 47 | + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
| 48 | +) |
0 commit comments