forked from moveit/moveit_visual_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·102 lines (86 loc) · 2.33 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
cmake_minimum_required(VERSION 3.5)
project(moveit_visual_tools)
find_package(moveit_common REQUIRED)
moveit_package()
# Load all dependencies required for this package
find_package(Boost REQUIRED system)
find_package(Eigen3 REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(graph_msgs REQUIRED)
find_package(moveit_core REQUIRED)
find_package(moveit_ros_planning REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_components REQUIRED)
find_package(rviz_visual_tools REQUIRED)
find_package(std_msgs REQUIRED)
find_package(tf2_eigen REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(trajectory_msgs REQUIRED)
find_package(visualization_msgs REQUIRED)
set(THIS_PACKAGE_INCLUDE_DEPENDS
Boost
geometry_msgs
graph_msgs
moveit_core
moveit_ros_planning
rclcpp
rviz_visual_tools
std_msgs
tf2_eigen
tf2_ros
trajectory_msgs
visualization_msgs
)
# Visualization Tools Library
add_library(${PROJECT_NAME} SHARED
src/${PROJECT_NAME}.cpp
src/imarker_robot_state.cpp
src/imarker_end_effector.cpp
)
target_include_directories(${PROJECT_NAME}
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
PUBLIC $<INSTALL_INTERFACE:include>
)
ament_target_dependencies(${PROJECT_NAME} ${THIS_PACKAGE_INCLUDE_DEPENDS})
# Demo executable
add_executable(${PROJECT_NAME}_demo
src/${PROJECT_NAME}_demo.cpp
)
target_link_libraries(${PROJECT_NAME}_demo
${PROJECT_NAME}
)
ament_target_dependencies(${PROJECT_NAME}_demo ${THIS_PACKAGE_INCLUDE_DEPENDS})
# Exports
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
#############
## Install ##
#############
# Install libraries
install(
TARGETS ${PROJECT_NAME}
EXPORT
export_${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
)
# Install executables
install(
TARGETS ${PROJECT_NAME}_demo
RUNTIME DESTINATION lib/${PROJECT_NAME}
)
# Install header files
install(DIRECTORY include/ DESTINATION include)
# Install shared resources
install(DIRECTORY launch resources DESTINATION share/${PROJECT_NAME})
#############
## Testing ##
#############
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
set(ament_cmake_cppcheck_FOUND TRUE)
set(ament_cmake_cpplint_FOUND TRUE)
set(ament_cmake_uncrustify_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_package()