cmake_minimum_required(VERSION 3.8)
project(arm_keyboard_input)

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
  ${CMAKE_CURRENT_SOURCE_DIR}/../include
  ${EIGEN3_INCLUDE_DIRS}  # 引入Eigen3的头文件路径
)

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(interfaces REQUIRED)
find_package(gjk_interface REQUIRED)
find_package(rclcpp_action REQUIRED)

# 设置源文件
set(SOURCES
    src/arm_keyboard_node.cpp
)

add_executable(arm_keyboard_input ${SOURCES})
ament_target_dependencies(arm_keyboard_input 
  rclcpp
  std_msgs
  rclcpp_action
  gjk_interface
  interfaces
)

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

ament_package()
