FindROS2.cmake 675 B

1234567891011121314
  1. # Copyright (c) Contributors to the Open 3D Engine Project.
  2. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. # Note that this does not find any ros2 package in particular, but determines whether a distro is sourced properly
  6. # Can be extended to handle supported / unsupported distros
  7. if (NOT DEFINED ENV{ROS_DISTRO} OR NOT DEFINED ENV{AMENT_PREFIX_PATH})
  8. message(WARNING, "To build ROS2 Gem a ROS distribution needs to be sourced, but none detected")
  9. set(ROS2_FOUND FALSE)
  10. return()
  11. endif()
  12. message(STATUS "Ros Distro is \"$ENV{ROS_DISTRO}\"")
  13. set(ROS2_FOUND TRUE)