cmake_minimum_required(VERSION 3.5)
project(multirole_sensor_client)

# Default to C++17
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 17)
endif()

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(smacc2 REQUIRED)
find_package(smacc2_msgs REQUIRED)

set(dependencies
    smacc2
    smacc2_msgs)

include_directories(include)

add_library(${PROJECT_NAME} SHARED
            src/${PROJECT_NAME}/cl_multirole_sensor.cpp)

ament_target_dependencies(${PROJECT_NAME} ${dependencies})

ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(${dependencies})

install(
  DIRECTORY include/
  DESTINATION include
)

install(TARGETS
  ${PROJECT_NAME}
  DESTINATION lib/)

ament_package()
