-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathCMakeLists.txt
174 lines (152 loc) · 3.46 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
cmake_minimum_required(VERSION 2.8.3)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
project(robowflex_library)
set(LIBRARY_NAME ${PROJECT_NAME})
set(CMAKE_MODULE_PATH
"${CMAKE_MODULE_PATH}"
"${CMAKE_ROOT_DIR}/cmake/Modules"
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules")
include(CompileOptions)
include(HelperFunctions)
##
## Non-ROS libraries
##
find_package(Boost REQUIRED filesystem)
find_library(YAML yaml-cpp REQUIRED)
find_package(TinyXML2 REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(HDF5 REQUIRED COMPONENTS C CXX)
find_package(pybind11 CONFIG)
##
## Catkin setup
##
list(APPEND CATKIN_SOURCES
std_msgs
sensor_msgs
geometry_msgs
visualization_msgs
shape_msgs
octomap_msgs
trajectory_msgs
object_recognition_msgs
moveit_msgs
roscpp
rosbag
urdf
srdfdom
pluginlib
geometric_shapes
moveit_core
moveit_ros_planning
tf2_ros
xmlrpcpp
)
find_package(catkin REQUIRED COMPONENTS ${CATKIN_SOURCES})
catkin_package(
LIBRARIES ${LIBRARY_NAME}
CATKIN_DEPENDS ${CATKIN_SOURCES}
DEPENDS
INCLUDE_DIRS ${CMAKE_CURRENT_LIST_DIR}/include
)
##
## Library Creation
##
list(APPEND SOURCES
src/planning.cpp
src/builder.cpp
src/scene.cpp
src/robot.cpp
src/geometry.cpp
src/benchmarking.cpp
src/util.cpp
src/id.cpp
src/io.cpp
src/log.cpp
src/openrave.cpp
src/io/visualization.cpp
src/io/colormap.cpp
src/io/broadcaster.cpp
src/io/hdf5.cpp
src/io/gnuplot.cpp
src/pool.cpp
src/tf.cpp
src/random.cpp
src/yaml.cpp
src/trajectory.cpp
src/detail/ur5.cpp
src/detail/fetch.cpp
src/detail/cob4.cpp
)
list(APPEND INCLUDES
${CMAKE_CURRENT_LIST_DIR}/include
${catkin_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${TINYXML2_INCLUDE_DIRS}
${HDF5_INCLUDE_DIRS}
yaml-cpp
)
list(APPEND LIBRARIES
${catkin_LIBRARIES}
${Boost_LIBRARIES}
${TINYXML2_LIBRARIES}
${HDF5_LIBRARIES}
yaml-cpp
)
include_directories(SYSTEM ${INCLUDES})
link_directories(${catkin_LIBRARY_DIRS})
add_library(${LIBRARY_NAME} ${SOURCES})
set_target_properties(${LIBRARY_NAME} PROPERTIES VERSION ${${PROJECT_NAME}_VERSION})
target_link_libraries(${LIBRARY_NAME} ${LIBRARIES})
##
## Python bindings
##
if(${pybind11_FOUND})
pybind11_add_module(robowflex_library_python src/python_bindings.cpp)
set_target_properties(robowflex_library_python PROPERTIES OUTPUT_NAME "robowflex")
endif()
##
## Scripts
##
add_script(ur5_test)
add_script(ur5_cylinder)
add_script(ur5_benchmark)
add_script(ur5_io)
add_script(ur5_pool)
add_script(ur5_visualization)
add_script(ur5_ik)
add_script(ur5_cartesian)
add_script(fetch_test)
add_script(fetch_chomp)
add_script(fetch_scenes_visualize)
add_script(fetch_scenes_benchmark)
add_script(fetch_benchmark)
add_script(fetch_visualization)
add_script(fetch_cartesian)
add_script(wam7_test)
add_script(wam7_benchmark)
add_script(resources_visualization)
add_script(plugin_io)
add_script(baxter_multi_target)
add_script(shadowhand_ik)
add_script(cob4_test)
add_script(cob4_visualization)
add_script(cob4_multi_target)
##
## Tests
##
add_test_script(robot_scene)
##
## Installation of programs, library, headers, and YAML used by scripts
##
install_scripts()
install_library()
install_directory(yaml)
if(${pybind11_FOUND})
# We do this here because it causes errors with this old version of CMake if we do it before
# finding pybind11
find_package(Python COMPONENTS Development)
install(TARGETS robowflex_library_python
COMPONENT python
LIBRARY DESTINATION "${Python_SITELIB}/robowflex")
endif()