diff --git a/rtabmap_msgs/CMakeLists.txt b/rtabmap_msgs/CMakeLists.txt
index 0ffcd3b55..7ae7eead0 100644
--- a/rtabmap_msgs/CMakeLists.txt
+++ b/rtabmap_msgs/CMakeLists.txt
@@ -1,11 +1,21 @@
cmake_minimum_required(VERSION 3.5)
project(rtabmap_msgs)
+# Default to C++17
+if(NOT CMAKE_CXX_STANDARD)
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+endif()
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wall -Wextra -Wpedantic)
+endif()
+
##################
## Dependencies ##
##################
find_package(rosidl_default_generators REQUIRED)
+find_package(builtin_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
@@ -66,7 +76,9 @@ set(srv_files
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
- DEPENDENCIES geometry_msgs std_msgs sensor_msgs std_srvs
+ DEPENDENCIES builtin_interfaces geometry_msgs std_msgs sensor_msgs std_srvs
)
+ament_export_dependencies(rosidl_default_runtime)
+
ament_package()
diff --git a/rtabmap_msgs/package.xml b/rtabmap_msgs/package.xml
index 7724cc5bb..8968e6084 100644
--- a/rtabmap_msgs/package.xml
+++ b/rtabmap_msgs/package.xml
@@ -12,13 +12,20 @@
ament_cmake
- rosidl_default_generators
- rosidl_default_runtime
- rosidl_interface_packages
+ rosidl_default_generators
+ builtin_interfaces
std_msgs
std_srvs
geometry_msgs
sensor_msgs
+
+ rosidl_default_runtime
+
+ rosidl_interface_packages
+
+
+ ament_cmake
+