58 lines
1.8 KiB
CMake
58 lines
1.8 KiB
CMake
cmake_minimum_required(VERSION 3.5)
|
|
project(assemble_component)
|
|
|
|
if(NOT CMAKE_C_STANDARD)
|
|
set(CMAKE_C_STANDARD 99)
|
|
endif()
|
|
|
|
if(NOT CMAKE_CXX_STANDARD)
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
endif()
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
add_compile_options(-Wall -Wextra -Wpedantic)
|
|
endif()
|
|
|
|
find_package(ament_cmake REQUIRED)
|
|
find_package(ament_cmake_ros REQUIRED)
|
|
find_package(rbs_skill_interfaces REQUIRED)
|
|
find_package(rclcpp REQUIRED)
|
|
find_package(rclcpp_components REQUIRED)
|
|
find_package(tf2_ros REQUIRED)
|
|
find_package(tf2_msgs REQUIRED)
|
|
find_package(geometry_msgs REQUIRED)
|
|
find_package(env_manager REQUIRED)
|
|
|
|
add_library(assemble_state_component SHARED
|
|
src/assemble_state_component.cpp)
|
|
target_compile_definitions(assemble_state_component
|
|
PRIVATE "COMPOSITION_BUILDING_DLL")
|
|
ament_target_dependencies(assemble_state_component
|
|
"rbs_skill_interfaces"
|
|
"rclcpp"
|
|
"rclcpp_components"
|
|
"tf2_ros"
|
|
"tf2_msgs"
|
|
"geometry_msgs"
|
|
"env_manager")
|
|
rclcpp_components_register_nodes(assemble_state_component "assemble_component::AssembleStateComponent")
|
|
set(node_plugins "${node_plugins}assemble_component::AssembleStateComponent;$<TARGET_FILE:assemble_component>\n")
|
|
|
|
install(TARGETS assemble_state_component
|
|
DESTINATION lib)
|
|
|
|
if(BUILD_TESTING)
|
|
find_package(ament_lint_auto REQUIRED)
|
|
# the following line skips the linter which checks for copyrights
|
|
# comment the line when a copyright and license is added to all source files
|
|
set(ament_cmake_copyright_FOUND TRUE)
|
|
# the following line skips cpplint (only works in a git repo)
|
|
# comment the line when this package is in a git repo and when
|
|
# a copyright and license is added to all source files
|
|
set(ament_cmake_cpplint_FOUND TRUE)
|
|
ament_lint_auto_find_test_dependencies()
|
|
endif()
|
|
|
|
ament_package()
|