cmake_minimum_required(VERSION 3.8)
project(vision_test)

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

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(nlohmann_json REQUIRED)

find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(message_filters REQUIRED)
find_package(interfaces REQUIRED)


add_executable(
  detect_node 
  src/creat_detect_node.cpp 
  src/VisionTestNode.cpp
  src/CalculateTool.cpp
  )

target_include_directories(
  detect_node 
  PRIVATE
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/eigen-3.4.1>
  PUBLIC 
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:include>
  )
target_compile_features(
  detect_node 
  PRIVATE c_std_99 cxx_std_17
  )  


install(
  TARGETS detect_node DESTINATION lib/${PROJECT_NAME}
  DIRECTORY configs DESTINATION share/${PROJECT_NAME}/configs
  DIRECTORY checkpoints DESTINATION share/${PROJECT_NAME}/checkpoints
  DIRECTORY launch DESTINATION share/${PROJECT_NAME}/launch
  )


ament_package()
