We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afe4e40 commit 9b03f97Copy full SHA for 9b03f97
1 file changed
src/CMakeLists.txt
@@ -44,7 +44,10 @@ target_link_libraries( DataStreamROS2 commonROS)
44
add_library( TopicPublisherROS2 SHARED TopicPublisherROS2/publisher_ros2.cpp)
45
target_link_libraries( TopicPublisherROS2 commonROS)
46
47
-if("$ENV{ROS_DISTRO}" STREQUAL "humble")
+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")
51
message(STATUS "Detected Humble")
52
target_compile_definitions(DataLoadROS2 PUBLIC ROS_HUMBLE)
53
target_compile_definitions(TopicPublisherROS2 PUBLIC ROS_HUMBLE)
0 commit comments