CMakeLists.txt 984 B

123456789101112131415161718192021222324252627282930
  1. # {BEGIN_LICENSE}
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. #
  7. # {END_LICENSE}
  8. # Query the gem name from the gem.json file if possible
  9. # otherwise fallback to using ${Name}
  10. o3de_find_ancestor_gem_root(gem_path gem_name "${CMAKE_CURRENT_SOURCE_DIR}")
  11. if (NOT gem_name)
  12. set(gem_name "${Name}")
  13. endif()
  14. # Fallback to using the current source CMakeLists.txt directory as the gem root path
  15. if (NOT gem_path)
  16. set(gem_path ${CMAKE_CURRENT_SOURCE_DIR})
  17. endif()
  18. set(gem_json ${gem_path}/gem.json)
  19. o3de_restricted_path(${gem_json} gem_restricted_path gem_parent_relative_path)
  20. o3de_pal_dir(pal_dir ${CMAKE_CURRENT_SOURCE_DIR}/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  21. ly_add_external_target_path(${CMAKE_CURRENT_SOURCE_DIR}/3rdParty)
  22. add_subdirectory(Code)