forked from mikeferguson/simple_grasping
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
100 lines (90 loc) · 2.04 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
cmake_minimum_required(VERSION 2.8.3)
project(simple_grasping)
find_package(Boost REQUIRED)
find_package(PCL REQUIRED)
find_package(catkin REQUIRED
COMPONENTS
actionlib
cmake_modules
geometry_msgs
grasping_msgs
message_generation
moveit_msgs
pcl_ros
roscpp
sensor_msgs
shape_msgs
tf
)
find_package(Eigen REQUIRED)
link_directories(
${catkin_LIBRARY_DIRS}
${Boost_LIBRARY_DIRS}
${PCL_LIBRARY_DIRS}
)
catkin_package(
CATKIN_DEPENDS
actionlib
geometry_msgs
grasping_msgs
moveit_msgs
pcl_ros
sensor_msgs
shape_msgs
INCLUDE_DIRS include
LIBRARIES
simple_grasping
)
include_directories(
include
SYSTEM
${Boost_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
${Eigen_INCLUDE_DIRS}
${PCL_INCLUDE_DIRS}
)
### Build simple_grasping library
add_library(simple_grasping
src/cloud_tools.cpp
src/object_support_segmentation.cpp
src/shape_extraction.cpp
src/shape_grasp_planner.cpp
)
target_link_libraries(simple_grasping
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_dependencies(simple_grasping grasping_msgs_generate_messages_cpp)
### Build basic_grasping_perception
add_executable(basic_grasping_perception src/basic_grasping_perception.cpp)
target_link_libraries(basic_grasping_perception
simple_grasping
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_dependencies(basic_grasping_perception grasping_msgs_generate_messages_cpp)
### Build grasp_planner_node
add_executable(grasp_planner_node src/grasp_planner_node.cpp)
target_link_libraries(grasp_planner_node
simple_grasping
${Boost_LIBRARIES}
${catkin_LIBRARIES}
${PCL_LIBRARIES}
)
add_dependencies(grasp_planner_node grasping_msgs_generate_messages_cpp)
### Test
if (CATKIN_ENABLE_TESTING)
add_subdirectory(test)
endif()
### Install
install(
DIRECTORY include/
DESTINATION include
)
install(
TARGETS simple_grasping basic_grasping_perception grasp_planner_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)