CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425
  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 ProteusRobot
  7. o3de_find_ancestor_gem_root(gem_root_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
  8. if (NOT gem_name)
  9. set(gem_name "ProteusRobot")
  10. endif()
  11. # This indicates to the Builders applications(AssetProcessor, AssetBuilder, AssetBundler)
  12. # that the gem should be added to the "cmake_dependencies.<project>.assetbuilder.setreg"
  13. # which is generated when cmake configure occurs.
  14. # Also tooling applications such as the Editor needs the CMake alias
  15. # to see the gem as active
  16. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  17. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem)
  18. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem)
  19. # Add in CMake dependencies for each gem dependency listed in this gem's gem.json file
  20. # for the Tools and Builders gem variants
  21. o3de_add_variant_dependencies_for_gem_dependencies(GEM_NAME ${gem_name} VARIANTS Tools Builders)
  22. endif()