From 834b599d0834e3627cecc37f1786407ef0887595 Mon Sep 17 00:00:00 2001 From: Daniel Burr Date: Thu, 18 Jul 2024 02:32:46 +0200 Subject: [PATCH] Fix compilation with ROS2 Galactic --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d89ecd..f9c4d0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ add_executable(sbp-to-ros DEPENDENCIES std_msgs ) -if(${FOUND_ROS2_DISTRO} STREQUAL "foxy") +if((${FOUND_ROS2_DISTRO} STREQUAL "foxy") OR (${FOUND_ROS2_DISTRO} STREQUAL "galactic")) rosidl_target_interfaces(sbp-to-ros ${PROJECT_NAME} "rosidl_typesupport_cpp") else() rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp") @@ -148,7 +148,7 @@ if(BUILD_TESTING) $ ) - if(${FOUND_ROS2_DISTRO} STREQUAL "foxy") + if((${FOUND_ROS2_DISTRO} STREQUAL "foxy") OR (${FOUND_ROS2_DISTRO} STREQUAL "galactic")) rosidl_target_interfaces(${PROJECT_NAME}_test ${PROJECT_NAME} "rosidl_typesupport_cpp") else() rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")