forked from moveit/moveit_visual_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
97 lines (81 loc) · 2 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
cmake_minimum_required(VERSION 2.8.3)
project(moveit_visual_tools)
# C++ 11 required for OMPL
add_compile_options(-std=c++11)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS
rviz_visual_tools
tf2_eigen
geometry_msgs
moveit_ros_planning
moveit_core
roscpp
tf2_ros
visualization_msgs
graph_msgs
std_msgs
trajectory_msgs
cmake_modules
roslint
)
find_package(Eigen3 REQUIRED)
find_package(Boost REQUIRED system)
# Catkin
catkin_package(
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
rviz_visual_tools
moveit_ros_planning
moveit_core
geometry_msgs
visualization_msgs
graph_msgs
std_msgs
trajectory_msgs
INCLUDE_DIRS include
)
## Build
include_directories(SYSTEM
${EIGEN3_INCLUDE_DIRS}
)
include_directories(
include
${catkin_INCLUDE_DIRS}
)
# Visualization Tools Library
add_library(${PROJECT_NAME}
src/${PROJECT_NAME}.cpp
src/imarker_robot_state.cpp
src/imarker_end_effector.cpp
)
add_dependencies(${PROJECT_NAME} graph_msgs_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES} ${Boost_LIBRARIES}
)
# Demo executable
add_executable(${PROJECT_NAME}_demo src/${PROJECT_NAME}_demo.cpp)
target_link_libraries(${PROJECT_NAME}_demo
${catkin_LIBRARIES} ${PROJECT_NAME}
)
#############
## Testing ##
#############
## Test for correct C++ source code
roslint_cpp()
#############
## Install ##
#############
# Install libraries
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
# Install header files
install(DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
# Install shared resources
install(DIRECTORY launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY resources DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
# Install executables
install(TARGETS ${PROJECT_NAME}_demo
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)