SHOW:
|
|
- or go back to the newest paste.
1 | cmake_minimum_required(VERSION 3.8.3) | |
2 | project(lidar_point_cloud) | |
3 | ||
4 | list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) | |
5 | ||
6 | ## Find catkin macros and libraries | |
7 | - | find_package |
7 | + | |
8 | - | ( |
8 | + | |
9 | find_package( | |
10 | catkin REQUIRED COMPONENTS | |
11 | roscpp | |
12 | rospy | |
13 | std_msgs | |
14 | genmsg | |
15 | cmake_modules | |
16 | Eigen | |
17 | ) | |
18 | ||
19 | ||
20 | ## System dependencies are found with CMake's conventions | |
21 | # find_package(Boost REQUIRED COMPONENTS system) | |
22 | ||
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 and a run_depend tag for each package in MSG_DEP_SET | |
39 | ## * If MSG_DEP_SET isn't empty the following dependencies might have been | |
40 | ## pulled in transitively but can be declared for certainty nonetheless: | |
41 | ## * add a build_depend tag for "message_generation" | |
42 | ## * add a run_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 | ||
52 | ## and list every .msg/.srv/.action file to be processed | |
53 | ## * uncomment the generate_messages entry below | |
54 | ## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) | |
55 | ||
56 | ## Generate messages in the 'msg' folder | |
57 | # add_message_files( | |
58 | # FILES | |
59 | # Message1.msg | |
60 | # Message2.msg | |
61 | # ) | |
62 | ||
63 | ## Generate services in the 'srv' folder | |
64 | # add_service_files( | |
65 | # FILES | |
66 | # Service1.srv | |
67 | # Service2.srv | |
68 | # ) | |
69 | ||
70 | ## Generate actions in the 'action' folder | |
71 | # add_action_files( | |
72 | # FILES | |
73 | # Action1.action | |
74 | ||
75 | # Action2.action | |
76 | # ) | |
77 | ||
78 | ## Generate added messages and services with any dependencies listed here | |
79 | # generate_messages( | |
80 | # DEPENDENCIES | |
81 | # std_msgs | |
82 | # ) | |
83 | ||
84 | ################################### | |
85 | ## catkin specific configuration ## | |
86 | ################################### | |
87 | ## The catkin_package macro generates cmake config files for your package | |
88 | ## Declare things to be passed to dependent projects | |
89 | ## INCLUDE_DIRS: uncomment this if you package contains header files | |
90 | - | INCLUDE_DIRS include |
90 | + | |
91 | - | LIBRARIES lidar_point_cloud |
91 | + | |
92 | ## DEPENDS: system dependencies of this project that dependent projects also need | |
93 | - | CATKIN_DEPENDS roscpp rospy std_msgs |
93 | + | |
94 | - | DEPENDS system_lib |
94 | + | INCLUDE_DIRS include |
95 | LIBRARIES lidar_point_cloud | |
96 | ||
97 | CATKIN_DEPENDS | |
98 | roscpp rospy std_msgs cmake_modules Eigen | |
99 | ||
100 | DEPENDS system_lib | |
101 | ) | |
102 | ||
103 | ########### | |
104 | ## Build ## | |
105 | ########### | |
106 | ||
107 | ## Specify additional locations of header files | |
108 | ## Your package locations should be listed before other locations | |
109 | # include_directories(include) | |
110 | include_directories( | |
111 | ${catkin_INCLUDE_DIRS} | |
112 | ) | |
113 | ||
114 | include_directories(${EIGEN_INCLUDE_DIRS}) | |
115 | ||
116 | ## Declare a cpp library | |
117 | # add_library(lidar_point_cloud | |
118 | # src/${PROJECT_NAME}/lidar_point_cloud.cpp | |
119 | # ) | |
120 | ||
121 | ## Declare a cpp executable | |
122 | add_executable(lidar_point_cloud laser_scan_to_point_cloud.cpp) | |
123 | ||
124 | ## Add cmake target dependencies of the executable/library | |
125 | ## as an example, message headers may need to be generated before nodes | |
126 | add_dependencies(lidar_point_cloud src/idar_point_cloud_generate_messages_cpp) | |
127 | ||
128 | ## Specify libraries to link a library or executable target against | |
129 | target_link_libraries(lidar_point_cloud_node | |
130 | ${catkin_LIBRARIES} | |
131 | ) | |
132 | ||
133 | ############# | |
134 | ## Install ## | |
135 | ############# | |
136 | ||
137 | # all install targets should use catkin DESTINATION variables | |
138 | # See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html | |
139 | ||
140 | ## Mark executable scripts (Python etc.) for installation | |
141 | ## in contrast to setup.py, you can choose the destination | |
142 | # install(PROGRAMS | |
143 | # scripts/my_python_script | |
144 | # DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |
145 | # ) | |
146 | ||
147 | ## Mark executables and/or libraries for installation | |
148 | # install(TARGETS lidar_point_cloud lidar_point_cloud_node | |
149 | # ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |
150 | # LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |
151 | # RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |
152 | # ) | |
153 | ||
154 | ## Mark cpp header files for installation | |
155 | # install(DIRECTORY include/${PROJECT_NAME}/ | |
156 | # DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | |
157 | # FILES_MATCHING PATTERN "*.h" | |
158 | # PATTERN ".svn" EXCLUDE | |
159 | # ) | |
160 | ||
161 | ## Mark other files for installation (e.g. launch and bag files, etc.) | |
162 | # install(FILES | |
163 | # # myfile1 | |
164 | # # myfile2 | |
165 | # DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | |
166 | # ) | |
167 | ||
168 | ############# | |
169 | ## Testing ## | |
170 | be run by python nosetests | |
171 | # catkin_add_nosetests(test) | |
172 | -- INSERT -- 166,29 Bot |