cmake_minimum_required(VERSION 3.8)
project(dual_arm_moveit_action_server)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()
add_compile_options(-g)

include_directories(include)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(moveit_msgs REQUIRED)

add_executable(dual_arm_moveit_action_server
  src/dual_arm_moveit_action_server.cpp
)

ament_target_dependencies(dual_arm_moveit_action_server
  rclcpp
  rclcpp_action
  interfaces
  geometry_msgs
  moveit_ros_planning_interface
  moveit_msgs
)

install(TARGETS
  dual_arm_moveit_action_server
  DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY include/
  DESTINATION include
)

install(DIRECTORY config meshes urdf
  DESTINATION share/${PROJECT_NAME}
)

install(DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}
)

install(FILES .setup_assistant
  DESTINATION share/${PROJECT_NAME}
)

ament_package()

