Skip to content

Commit

Permalink
Fix compilation with ROS2 Galactic
Browse files Browse the repository at this point in the history
  • Loading branch information
dgburr committed Jul 18, 2024
1 parent 6f88dc7 commit 834b599
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -148,7 +148,7 @@ if(BUILD_TESTING)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
)

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")
Expand Down

0 comments on commit 834b599

Please sign in to comment.