-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
187 lines (155 loc) · 4.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
cmake_minimum_required(VERSION 3.5)
project(tms_if_for_opera)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
set(TARGETS
zx200_change_pose_action_server
zx200_excavate_simple_action_server
zx200_release_simple_action_server
zx200_change_pose_action_client
)
find_package(ament_cmake REQUIRED)
find_package(tms_msg_rp REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(std_msgs REQUIRED)
find_package(urdf REQUIRED)
find_package(moveit_common REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(rosidl_default_runtime REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
find_package(bsoncxx REQUIRED)
find_package(mongocxx REQUIRED)
add_library(excavator_ik SHARED src/excavator_ik.cpp)
ament_target_dependencies(excavator_ik rclcpp urdf)
set(COMMON_DEPENDENCIES
"rclcpp"
"rclcpp_action"
"moveit_common"
"moveit_ros_planning_interface"
"rosidl_default_runtime"
"std_msgs"
"tf2"
"tf2_geometry_msgs"
"Boost"
"mongocxx"
"bsoncxx"
"tms_msg_rp"
)
set(COMMON_INCLUDE_DIRS
include
/usr/local/include/mongocxx/v_noabi
/usr/local/include/bsoncxx/v_noabi
)
set(COMMON_LINK_DIRS
/usr/local/lib
)
set(COMMON_LINK_LIBS
mongocxx
bsoncxx
excavator_ik
)
foreach(TARGET ${TARGETS})
add_executable(${TARGET} src/${TARGET}.cpp)
ament_target_dependencies(${TARGET} ${COMMON_DEPENDENCIES})
target_include_directories(${TARGET} PRIVATE ${COMMON_INCLUDE_DIRS})
target_link_directories(${TARGET} PUBLIC ${COMMON_LINK_DIRS})
target_link_libraries(${TARGET} ${COMMON_LINK_LIBS})
install(TARGETS ${TARGET} DESTINATION lib/${PROJECT_NAME})
endforeach()
install(TARGETS excavator_ik
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
install(DIRECTORY
launch
collision_objects
DESTINATION share/${PROJECT_NAME}/
)
ament_package()
# cmake_minimum_required(VERSION 3.5)
# project(tms_if_for_opera)
# # Default to C++14
# if(NOT CMAKE_CXX_STANDARD)
# set(CMAKE_CXX_STANDARD 14)
# endif()
# if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# add_compile_options(-Wall -Wextra -Wpedantic)
# endif()
# set(TARGETS
# zx200_change_pose_action_server
# zx200_excavate_simple_action_server
# zx200_release_simple_action_server
# zx200_change_pose_action_client
# )
# find_package(ament_cmake REQUIRED)
# find_package(tms_msg_rp REQUIRED)
# find_package(rclcpp REQUIRED)
# find_package(rclcpp_action REQUIRED)
# find_package(std_msgs REQUIRED)
# find_package(urdf REQUIRED)
# find_package(moveit_common REQUIRED)
# find_package(moveit_ros_planning_interface REQUIRED)
# find_package(rosidl_default_runtime REQUIRED)
# find_package(Boost REQUIRED COMPONENTS system)
# find_package(bsoncxx REQUIRED)
# find_package(mongocxx REQUIRED)
# # find_package(excavator_ik REQUIRED)
# add_library(excavator_ik SHARED
# src/excavator_ik.cpp)
# ament_target_dependencies(excavator_ik
# rclcpp
# urdf)
# set(COMMON_DEPENDENCIES
# "rclcpp"
# "rclcpp_action"
# "moveit_common"
# "moveit_ros_planning_interface"
# "rosidl_default_runtime"
# "std_msgs"
# "tf2"
# "tf2_geometry_msgs"
# "Boost"
# "mongocxx"
# "bsoncxx"
# "excavator_ik"
# "tms_msg_rp"
# )
# set(COMMON_INCLUDE_DIRS
# include
# /usr/local/include/mongocxx/v_noabi
# /usr/local/include/bsoncxx/v_noabi
# )
# set(COMMON_LINK_DIRS
# /usr/local/lib
# )
# set(COMMON_LINK_LIBS
# mongocxx
# bsoncxx
# )
# foreach(TARGET ${TARGETS})
# add_executable(${TARGET} src/${TARGET}.cpp)
# ament_target_dependencies(${TARGET} ${COMMON_DEPENDENCIES})
# target_include_directories(${TARGET} PRIVATE ${COMMON_INCLUDE_DIRS})
# target_link_directories(${TARGET} PUBLIC ${COMMON_LINK_DIRS})
# target_link_libraries(${TARGET} ${COMMON_LINK_LIBS})
# install(TARGETS ${TARGET} DESTINATION lib/${PROJECT_NAME})
# endforeach()
# install(DIRECTORY
# launch
# DESTINATION share/${PROJECT_NAME}/
# )
# # if(BUILD_TESTING)
# # find_package(ament_cmake_gtest REQUIRED)
# # ament_add_gtest(test_zx200_change_pose_action_server test/test_zx200_change_pose_action_server.cpp)
# # ament_target_dependencies(test_zx200_change_pose_action_server ${COMMON_DEPENDENCIES})
# # target_include_directories(test_zx200_change_pose_action_server PRIVATE ${COMMON_INCLUDE_DIRS})
# # target_link_directories(test_zx200_change_pose_action_server PUBLIC ${COMMON_LINK_DIRS})
# # target_link_libraries(test_zx200_change_pose_action_server ${COMMON_LINK_LIBS})
# # endif()
# ament_package()