cmake_minimum_required(VERSION 3.0.2)
project(toposens_pointcloud)

add_compile_options(-std=c++17)

set(${PROJECT_NAME}_DEPS
  geometry_msgs
  message_runtime
  pcl_ros
  roscpp
  tf2
  tf2_geometry_msgs
  toposens_driver
  toposens_msgs
  visualization_msgs
)

find_package(Eigen3 3.3 REQUIRED NO_MODULE)

find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_DEPS})

catkin_package(INCLUDE_DIRS include LIBRARIES ${PROJECT_NAME} CATKIN_DEPENDS
               ${${PROJECT_NAME}_DEPS})

include_directories(include ${catkin_INCLUDE_DIRS})

add_subdirectory(src)

install(DIRECTORY include/${PROJECT_NAME}/
        DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(DIRECTORY launch rviz DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# ##############################################################################
# Test ##
# ##############################################################################
if(CATKIN_ENABLE_TESTING)
  add_subdirectory(tests)
endif()
