2
0

CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526272829
  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. # Query the gem name from the gem.json file if possible
  6. # otherwise fallback to using ${Name}
  7. o3de_find_ancestor_gem_root(gempath gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
  8. if (NOT gem_name)
  9. set(gem_name "ROS2")
  10. endif()
  11. # Add pip requirements required for ros2 packages.
  12. update_pip_requirements(${CMAKE_CURRENT_LIST_DIR}/requirements.txt ROS2)
  13. list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Code")
  14. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE)
  15. set(gem_path ${CMAKE_CURRENT_LIST_DIR})
  16. set(gem_json ${gem_path}/gem.json)
  17. o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
  18. ly_add_external_target_path(${CMAKE_CURRENT_LIST_DIR}/3rdParty)
  19. # Include ROS2 target function here so that every Project with this Gem can make use of it
  20. # Currently only affects the Gem itself but this likely will change in the future
  21. include(${CMAKE_CURRENT_LIST_DIR}/Code/ros2_target_depends.cmake)
  22. add_subdirectory(Code)