forked from valantano/moveit-ros-benchmark-humble-fix
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
113 lines (92 loc) · 2.79 KB
/
CMakeLists.txt
File metadata and controls
113 lines (92 loc) · 2.79 KB
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
cmake_minimum_required(VERSION 3.22)
project(moveit_ros_benchmarks_fix)
set(MOVEIT_LIB_NAME moveit_ros_benchmarks_fix)
# Common cmake code applied to all moveit packages
find_package(moveit_common REQUIRED)
moveit_package()
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(tf2_eigen REQUIRED)
find_package(moveit_core REQUIRED)
find_package(moveit_ros_planning REQUIRED)
find_package(moveit_ros_warehouse REQUIRED)
find_package(pluginlib REQUIRED)
# Finds Boost Components
include(ConfigExtras.cmake)
include_directories(include)
set(THIS_PACKAGE_INCLUDE_DEPENDS
rclcpp
Boost
tf2_eigen
moveit_core
moveit_ros_planning
moveit_ros_warehouse
pluginlib
)
add_library(${MOVEIT_LIB_NAME} SHARED
src/BenchmarkOptions.cpp
src/BenchmarkExecutor.cpp
)
set_target_properties(${MOVEIT_LIB_NAME} PROPERTIES VERSION "${${PROJECT_NAME}_VERSION}")
if(WIN32)
set(EXTRA_LIB ws2_32.lib)
endif()
ament_target_dependencies(${MOVEIT_LIB_NAME}
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
target_link_libraries(${MOVEIT_LIB_NAME} ${EXTRA_LIB})
add_executable(moveit_run_benchmark src/RunBenchmark.cpp)
ament_target_dependencies(moveit_run_benchmark
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
target_link_libraries(moveit_run_benchmark ${MOVEIT_LIB_NAME})
add_executable(moveit_combine_predefined_poses_benchmark src/simple_benchmarks/CombinePredefinedPosesBenchmark.cpp)
ament_target_dependencies(moveit_combine_predefined_poses_benchmark
${THIS_PACKAGE_INCLUDE_DEPENDS}
)
target_link_libraries(moveit_combine_predefined_poses_benchmark ${MOVEIT_LIB_NAME})
install(
TARGETS ${MOVEIT_LIB_NAME}
EXPORT export_${PROJECT_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
install(
TARGETS
moveit_run_benchmark
moveit_combine_predefined_poses_benchmark
DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY include/
DESTINATION include
)
install(PROGRAMS
scripts/moveit_benchmark_statistics.py
scripts/gen_benchmark_results.sh
DESTINATION lib/${PROJECT_NAME}
)
install(DIRECTORY old_examples/
DESTINATION share/${PROJECT_NAME}
)
install(DIRECTORY config/
DESTINATION share/${PROJECT_NAME}
)
install(DIRECTORY launch/
DESTINATION share/${PROJECT_NAME}
)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# These don't pass yet, disable them for now
set(ament_cmake_copyright_FOUND TRUE)
set(ament_cmake_cpplint_FOUND TRUE)
set(ament_cmake_flake8_FOUND TRUE)
set(ament_cmake_pep257_FOUND TRUE)
set(ament_cmake_uncrustify_FOUND TRUE)
# Run all lint tests in package.xml except those listed above
ament_lint_auto_find_test_dependencies()
endif()
ament_package(CONFIG_EXTRAS ConfigExtras.cmake)