Skip to content

Commit 9b03f97

Browse files
committed
try detecting umble in the build farm
1 parent afe4e40 commit 9b03f97

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ target_link_libraries( DataStreamROS2 commonROS)
4444
add_library( TopicPublisherROS2 SHARED TopicPublisherROS2/publisher_ros2.cpp)
4545
target_link_libraries( TopicPublisherROS2 commonROS)
4646

47-
if("$ENV{ROS_DISTRO}" STREQUAL "humble")
47+
message("AMENT_PREFIX_PATH = ${AMENT_PREFIX_PATH}")
48+
message("ROS_DISTRO (env) = $ENV{ROS_DISTRO}")
49+
50+
if("${AMENT_PREFIX_PATH}" STREQUAL "/opt/ros/humble" OR "$ENV{ROS_DISTRO}" STREQUAL "humble")
4851
message(STATUS "Detected Humble")
4952
target_compile_definitions(DataLoadROS2 PUBLIC ROS_HUMBLE)
5053
target_compile_definitions(TopicPublisherROS2 PUBLIC ROS_HUMBLE)

0 commit comments

Comments
 (0)