forked from smith-doug/fermi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
153 lines (135 loc) · 4.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
150
151
152
153
cmake_minimum_required(VERSION 2.8.3)
project(moveit_cartesian_plan_plugin)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
interactive_markers
pluginlib
roscpp
rqt_gui
rqt_gui_cpp
rviz
visualization_msgs
moveit_ros_move_group
moveit_ros_planning_interface
tf
tf_conversions
cartesian_impedance_msgs
)
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Concurrent REQUIRED)
set(qt_LIBRARIES Qt5::Widgets Qt5::Concurrent)
else()
find_package(Qt4 COMPONENTS QtCore QtGui REQUIRED)
include(${QT_USE_FILE})
set(qt_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
endif()
## I prefer the Qt signals and slots to avoid defining "emit", "slots",
## etc because they can conflict with boost signals, so define QT_NO_KEYWORDS here.
add_definitions(-DQT_NO_KEYWORDS)
add_definitions(-std=c++11)
set(
moveit_cartesian_plan_plugin_SRCS
src/add_way_point.cpp
src/point_tree_item.cpp
src/point_tree_model.cpp
src/widgets/path_planning_widget.cpp
src/generate_cartesian_path.cpp
src/set_cart_impedance.cpp
src/set_cart_ft_control.cpp
src/waypoint.cpp
${MOC_FILES}
)
set(
moveit_cartesian_plan_plugin_HDRS
include/moveit_cartesian_plan_plugin/add_way_point.h
include/moveit_cartesian_plan_plugin/point_tree_item.h
include/moveit_cartesian_plan_plugin/point_tree_model.h
include/moveit_cartesian_plan_plugin/widgets/path_planning_widget.h
include/moveit_cartesian_plan_plugin/generate_cartesian_path.h
include/moveit_cartesian_plan_plugin/set_cart_impedance.h
include/moveit_cartesian_plan_plugin/set_cart_ft_control.h
include/moveit_cartesian_plan_plugin/waypoint.h
)
set(moveit_cartesian_plan_plugin_UIS
src/widgets/path_planning_widget.ui
)
set(moveit_cartesian_plan_plugin_INCLUDE_DIRECTORIES
include
"${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}"
)
if(NOT EXISTS "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
file(MAKE_DIRECTORY "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
endif()
catkin_package(
INCLUDE_DIRS
${moveit_cartesian_plan_plugin_INCLUDE_DIRECTORIES}
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
interactive_markers
pluginlib
roscpp
rqt_gui
rviz
rqt_gui_cpp
visualization_msgs
)
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
qt5_wrap_cpp(moveit_cartesian_plan_plugin_MOCS ${moveit_cartesian_plan_plugin_HDRS})
else()
qt4_wrap_cpp(moveit_cartesian_plan_plugin_MOCS ${moveit_cartesian_plan_plugin_HDRS})
endif()
# ensure generated header files are being created in the devel space
set(_cmake_current_binary_dir "${CMAKE_CURRENT_BINARY_DIR}")
set(CMAKE_CURRENT_BINARY_DIR "${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}")
if("${qt_gui_cpp_USE_QT_MAJOR_VERSION} " STREQUAL "5 ")
qt5_wrap_ui(moveit_cartesian_plan_plugin_UIS_H ${moveit_cartesian_plan_plugin_UIS})
else()
qt4_wrap_ui(moveit_cartesian_plan_plugin_UIS_H ${moveit_cartesian_plan_plugin_UIS})
endif()
set(CMAKE_CURRENT_BINARY_DIR "${_cmake_current_binary_dir}")
include_directories(${moveit_cartesian_plan_plugin_INCLUDE_DIRECTORIES} ${catkin_INCLUDE_DIRS})
add_library(
${PROJECT_NAME}
${moveit_cartesian_plan_plugin_SRCS}
${moveit_cartesian_plan_plugin_HDRS}
${moveit_cartesian_plan_plugin_MOCS}
${moveit_cartesian_plan_plugin_UIS_H}
) # ${moveit_cartesian_plan_plugin_UIS_H}
target_link_libraries(
${PROJECT_NAME}
${catkin_LIBRARIES}
${qt_LIBRARIES}
${moveit_move_group_interface}
yaml-cpp
)
add_dependencies(
${PROJECT_NAME}
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
find_package(class_loader)
class_loader_hide_library_symbols(${PROJECT_NAME})
install(
TARGETS
${PROJECT_NAME}
ARCHIVE DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION
# ${CATKIN_GLOBAL_BIN_DESTINATION}
)
install(
PROGRAMS
scripts/moveit_cartesian_plan_plugin
DESTINATION
${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(
FILES
plugin.xml
DESTINATION
${CATKIN_PACKAGE_SHARE_DESTINATION}
)