Skip to content

Commit 834b599

Browse files
committed
Fix compilation with ROS2 Galactic
1 parent 6f88dc7 commit 834b599

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ add_executable(sbp-to-ros
7676
DEPENDENCIES std_msgs
7777
)
7878

79-
if(${FOUND_ROS2_DISTRO} STREQUAL "foxy")
79+
if((${FOUND_ROS2_DISTRO} STREQUAL "foxy") OR (${FOUND_ROS2_DISTRO} STREQUAL "galactic"))
8080
rosidl_target_interfaces(sbp-to-ros ${PROJECT_NAME} "rosidl_typesupport_cpp")
8181
else()
8282
rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")
@@ -148,7 +148,7 @@ if(BUILD_TESTING)
148148
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
149149
)
150150

151-
if(${FOUND_ROS2_DISTRO} STREQUAL "foxy")
151+
if((${FOUND_ROS2_DISTRO} STREQUAL "foxy") OR (${FOUND_ROS2_DISTRO} STREQUAL "galactic"))
152152
rosidl_target_interfaces(${PROJECT_NAME}_test ${PROJECT_NAME} "rosidl_typesupport_cpp")
153153
else()
154154
rosidl_get_typesupport_target(cpp_typesupport_target ${PROJECT_NAME} "rosidl_typesupport_cpp")

0 commit comments

Comments
 (0)