-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
162 lines (134 loc) · 4.86 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
cmake_minimum_required(VERSION 3.0.2)
project(trajectory_planning_gui)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
################################################################################
# Find catkin packages and libraries for catkin and system dependencies
################################################################################
find_package(catkin REQUIRED COMPONENTS
cmake_modules
geometry_msgs
roscpp
std_msgs
sensor_msgs
moveit_msgs
moveit_core
moveit_ros_planning
moveit_ros_planning_interface
moveit_visual_tools
interactive_markers
geometric_shapes
actionlib
control_msgs
trajectory_msgs
cv_bridge
rviz
message_generation
)
find_package(Eigen3 REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Multimedia REQUIRED)
find_package(Qt5MultimediaWidgets REQUIRED)
find_package(Boost REQUIRED)
## Generate messages in the 'msg' folder
add_message_files(
FILES
JogFrame.msg
JogJoint.msg
MoveJoint.msg
)
## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES
std_msgs
geometry_msgs
)
set(${PROJECT_NAME}_SRCS
src/main.cpp
src/main_window.cpp
src/qnode.cpp
src/point_tree_model.cpp
src/point_tree_item.cpp
)
set(${PROJECT_NAME}_HDRS
include/${PROJECT_NAME}/TabProxy.h
include/${PROJECT_NAME}/main_window.hpp
include/${PROJECT_NAME}/qnode.hpp
include/${PROJECT_NAME}/point_tree_model.hpp
include/${PROJECT_NAME}/point_tree_item.hpp
include/${PROJECT_NAME}/json.hpp
)
set(${PROJECT_NAME}_RESOURCES
resources/images.qrc
)
set(${PROJECT_NAME}_UIS
ui/main_window.ui
)
set(${PROJECT_NAME}_INCLUDE_DIRECTORIES
"${CATKIN_DEVEL_PREFIX}/${CATKIN_GLOBAL_INCLUDE_DESTINATION}/${PROJECT_NAME}"
)
if(NOT EXISTS ${${PROJECT_NAME}_INCLUDE_DIRECTORIES})
file(MAKE_DIRECTORY ${${PROJECT_NAME}_INCLUDE_DIRECTORIES})
endif()
################################################################################
# Setup for python modules and scripts
################################################################################
################################################################################
# Declare ROS messages, services and actions
################################################################################
################################################################################
# Declare ROS dynamic reconfigure parameters
################################################################################
################################################################################
# Declare catkin specific configuration to be passed to dependent projects
################################################################################
catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS
geometry_msgs
roscpp
std_msgs
sensor_msgs
moveit_msgs
moveit_core
moveit_ros_planning
moveit_ros_planning_interface
cv_bridge
DEPENDS EIGEN3
)
qt5_wrap_cpp(${PROJECT_NAME}_MOCS ${${PROJECT_NAME}_HDRS})
qt5_add_resources(${PROJECT_NAME}_RCC ${${PROJECT_NAME}_RESOURCES})
# 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 ${trajectory_planning_gui_INCLUDE_DIRECTORIES})
qt5_wrap_ui(${PROJECT_NAME}_UIS_H ${${PROJECT_NAME}_UIS})
set(CMAKE_CURRENT_BINARY_DIR "${_cmake_current_binary_dir}")
## https://stackoverflow.com/questions/30535933/eigen-gcc-5-class-stdbinder2nd-is-deprecated
## supress deprecation warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
################################################################################
# Build
################################################################################
include_directories(
include
${trajectory_planning_gui_INCLUDE_DIRECTORIES}
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
)
add_executable(trajectory_planning_gui ${trajectory_planning_gui_SRCS} ${trajectory_planning_gui_MOCS} ${trajectory_planning_gui_UIS_H} ${trajectory_planning_gui_RCC})
add_dependencies(trajectory_planning_gui ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
target_link_libraries(trajectory_planning_gui Qt5::Widgets Qt5::Core Qt5::Multimedia Qt5::MultimediaWidgets ${catkin_LIBRARIES} ${Eigen3_LIBRARIES})
# linking the yaml-cpp library; used while reading waypoints from yaml file
target_link_libraries(${PROJECT_NAME} yaml-cpp)
#################################################################################
## Install
#################################################################################
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(DIRECTORY launch ui
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)