-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCMakeLists.txt
60 lines (51 loc) · 1.58 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
cmake_minimum_required(VERSION 3.8)
project(layered_hardware_dynamixel)
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# include_directories(include)
## Find dependencies
find_package(ament_cmake REQUIRED)
find_package(dynamixel_workbench_toolbox REQUIRED)
find_package(controller_interface REQUIRED)
find_package(hardware_interface REQUIRED)
find_package(layered_hardware REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rclcpp REQUIRED)
# yaml_cpp_vendor builds yaml-cpp if not installed
find_package(yaml_cpp_vendor REQUIRED)
find_package(yaml-cpp REQUIRED)
## Declare a C++ library
add_library(
layered_hardware_dynamixel_plugins SHARED
src/layered_hardware_dynamixel_plugins.cpp)
target_include_directories(
layered_hardware_dynamixel_plugins PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_NAME}>
)
ament_target_dependencies(
layered_hardware_dynamixel_plugins
dynamixel_workbench_toolbox
controller_interface
hardware_interface
layered_hardware
pluginlib
rclcpp
yaml_cpp_vendor)
target_link_libraries(
layered_hardware_dynamixel_plugins
${YAML_CPP_LIBRARIES})
## Export plugin descriptions
pluginlib_export_plugin_description_file(layered_hardware plugins.xml)
## Install resources
install(
TARGETS layered_hardware_dynamixel_plugins
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
install(
DIRECTORY examples
DESTINATION share/layered_hardware_dynamixel)
# TODO: declare tests here
ament_package()