cmake_minimum_required(VERSION 3.5)
project(tutorial_package)
# Default to C99
if(NOT CMAKE_C_STANDARD)
  set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()
# Add compile options
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(rclcpp REQUIRED)
# Set target
add_executable(helloworld src/helloworld.cpp)
ament_target_dependencies(helloworld rclcpp)
install(TARGETS helloworld DESTINATION lib/${PROJECT_NAME})
# Call ament build system
ament_package()