|
| 1 | +################################################################################ |
| 2 | +# CMake |
| 3 | +################################################################################ |
1 | 4 | cmake_minimum_required(VERSION 2.8.3) |
2 | 5 | project(turtlebot3_panorama) |
3 | 6 |
|
4 | | -# Load catkin and all dependencies required for this package |
5 | | -find_package(catkin REQUIRED COMPONENTS cmake_modules roscpp std_msgs std_srvs nav_msgs sensor_msgs geometry_msgs turtlebot3_msgs image_transport cv_bridge) |
| 7 | +################################################################################ |
| 8 | +# Packages |
| 9 | +################################################################################ |
| 10 | +find_package(catkin REQUIRED COMPONENTS |
| 11 | + roscpp |
| 12 | + rospy |
| 13 | + std_msgs |
| 14 | + std_srvs |
| 15 | + sensor_msgs |
| 16 | + geometry_msgs |
| 17 | + nav_msgs |
| 18 | + turtlebot3_msgs |
| 19 | + cv_bridge |
| 20 | + image_transport |
| 21 | + cmake_modules |
| 22 | +) |
6 | 23 | find_package(Boost REQUIRED COMPONENTS system) |
7 | | -find_package(cmake_modules REQUIRED) |
8 | 24 | find_package(Eigen3 REQUIRED) |
9 | 25 | find_package(OpenCV REQUIRED) |
10 | 26 |
|
11 | | -# What other packages will need to use this package |
| 27 | +################################################################################ |
| 28 | +# Declare ROS messages, services and actions |
| 29 | +################################################################################ |
| 30 | + |
| 31 | +################################################################################ |
| 32 | +# Declare ROS dynamic reconfigure parameters |
| 33 | +################################################################################ |
| 34 | + |
| 35 | +################################################################################ |
| 36 | +# Catkin specific configuration |
| 37 | +################################################################################ |
12 | 38 | catkin_package( |
13 | | - INCLUDE_DIRS include |
14 | | - CATKIN_DEPENDS |
15 | | - DEPENDS Boost Eigen3 OpenCV |
| 39 | + INCLUDE_DIRS include |
| 40 | + CATKIN_DEPENDS roscpp rospy std_msgs std_srvs sensor_msgs geometry_msgs nav_msgs turtlebot3_msgs cv_bridge image_transport cmake_modules |
| 41 | + DEPENDS Boost Eigen3 OpenCV |
16 | 42 | ) |
17 | 43 |
|
18 | | -include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}) |
19 | | - |
20 | | -add_executable(panorama src/panorama.cpp) |
21 | | -add_dependencies(panorama turtlebot3_msgs_gencpp) |
22 | | -target_link_libraries(panorama ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${OpenCV_LIBRARIES}) |
| 44 | +################################################################################ |
| 45 | +# Build |
| 46 | +################################################################################ |
| 47 | +include_directories( |
| 48 | + include |
| 49 | + ${catkin_INCLUDE_DIRS} |
| 50 | + ${Boost_INCLUDE_DIRS} |
| 51 | + ${EIGEN_INCLUDE_DIRS} |
| 52 | +) |
23 | 53 |
|
24 | | -############# |
25 | | -## Install ## |
26 | | -############# |
| 54 | +add_executable(turtlebot3_panorama src/panorama.cpp) |
| 55 | +add_dependencies(turtlebot3_panorama ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) |
| 56 | +target_link_libraries(turtlebot3_panorama ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${Eigen3_LIBRARIES} ${OpenCV_LIBRARIES}) |
27 | 57 |
|
28 | | -# Mark executables and/or libraries for installation |
29 | | -install(TARGETS panorama |
30 | | - LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} |
| 58 | +################################################################################ |
| 59 | +# Install |
| 60 | +################################################################################ |
| 61 | +install(TARGETS turtlebot3_panorama |
31 | 62 | RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
32 | 63 | ) |
33 | 64 |
|
34 | | -# Mark executable scripts (Python etc.) for installation |
35 | | -install(PROGRAMS scripts/loop.py |
36 | | - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
| 65 | +install(PROGRAMS |
| 66 | + scripts/loop.py |
| 67 | + DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} |
37 | 68 | ) |
38 | 69 |
|
39 | | -# Mark anything (useful) else for installation |
40 | | -install(DIRECTORY launch |
41 | | - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
| 70 | +install(DIRECTORY include/${PROJECT_NAME}/ |
| 71 | + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} |
42 | 72 | ) |
43 | 73 |
|
44 | | -install(DIRECTORY param |
45 | | - DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
| 74 | +install(DIRECTORY launch param |
| 75 | + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} |
46 | 76 | ) |
| 77 | + |
| 78 | +################################################################################ |
| 79 | +# Test |
| 80 | +################################################################################ |
0 commit comments