forked from PickNikRobotics/descartes_capability
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
149 lines (127 loc) · 3.05 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
cmake_minimum_required(VERSION 2.8.12)
project(descartes_capability)
# C++ 14
add_compile_options(-std=c++14)
# Warnings
add_definitions(-W -Wall -Wextra
-Wwrite-strings -Wunreachable-code -Wpointer-arith
-Winit-self -Wredundant-decls
-Wno-unused-parameter -Wno-unused-function)
# Find catkin macros and libraries
find_package(catkin REQUIRED COMPONENTS
descartes_core
descartes_moveit
descartes_trajectory
descartes_planner
moveit_core
moveit_ros_planning
moveit_visual_tools
moveit_ros_move_group
roscpp
roslint
rospy
)
# System dependencies are found with CMake's conventions
find_package(Boost REQUIRED)
find_package(Eigen3 REQUIRED)
###################################
## Catkin specific configuration ##
###################################
catkin_package(
CATKIN_DEPENDS
roscpp
rospy
moveit_core
moveit_ros_planning
moveit_ros_move_group
moveit_visual_tools
INCLUDE_DIRS
include
LIBRARIES
${PROJECT_NAME}
DEPENDS
Boost
EIGEN3
)
###########
## Build ##
###########
# Specify additional locations of header files
# Your package locations should be listed before other locations
include_directories(
SYSTEM
${Boost_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIRS}
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
# Declare a C++ library with project namespace to avoid naming collision
add_library(
${PROJECT_NAME}
src/descartes_path_service_capability.cpp
)
add_dependencies(
${PROJECT_NAME}
${catkin_EXPORTED_TARGETS}
)
# Specify libraries to link a library or executable target against
target_link_libraries(
${PROJECT_NAME}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
#############
## Install ##
#############
# Mark executables and/or libraries for installation
install(
TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION
${CATKIN_PACKAGE_BIN_DESTINATION}
)
# Mark cpp header files for installation
install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION
${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
# Mark config files for installation
install(
DIRECTORY
config
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}
)
# Mark python demo script for installation
install(PROGRAMS
scripts/example_cartesian_command.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(FILES
descartes_capability_plugin_description.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
#############
## Testing ##
#############
if(CATKIN_ENABLE_TESTING)
find_package(rostest REQUIRED)
find_package(pluginlib REQUIRED)
find_package(moveit_resources REQUIRED)
include_directories(${moveit_resources_INCLUDE_DIRS})
add_rostest_gtest(descartes_path_service_capability_test test/descartes_path_service_capability_test.test test/descartes_path_service_capability_test.cpp)
target_link_libraries(descartes_path_service_capability_test
${PROJECT_NAME}
${catkin_LIBRARIES}
${Boost_LIBRARIES}
)
endif()
## Test for correct C++ source code
roslint_cpp()