CMakeLists.txt 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #
  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. #
  8. o3de_pal_dir(include_pal_dir ${CMAKE_CURRENT_LIST_DIR}/Include/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. ly_add_target(
  10. NAME ${gem_name}.Headers HEADERONLY
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. gamestatesamples_headers_files.cmake
  14. INCLUDE_DIRECTORIES
  15. INTERFACE
  16. Include
  17. ${include_pal_dir}
  18. BUILD_DEPENDENCIES
  19. INTERFACE
  20. Gem::GameState
  21. Gem::LocalUser
  22. Gem::LyShine.Clients.API
  23. Gem::SaveData.Static
  24. Gem::MessagePopup.Static
  25. Legacy::CryCommon
  26. )
  27. ly_add_target(
  28. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  29. NAMESPACE Gem
  30. FILES_CMAKE
  31. gamestatesamples_shared_files.cmake
  32. ${include_pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  33. INCLUDE_DIRECTORIES
  34. PRIVATE
  35. Source
  36. BUILD_DEPENDENCIES
  37. PRIVATE
  38. AZ::AzCore
  39. AZ::AzFramework
  40. Gem::LmbrCentral
  41. Gem::${gem_name}.Headers
  42. RUNTIME_DEPENDENCIES
  43. Gem::GameState
  44. Gem::LocalUser
  45. Gem::LmbrCentral
  46. )
  47. # Inject the gem name into the Module source file
  48. ly_add_source_properties(
  49. SOURCES
  50. Source/GameStateSamplesModule.cpp
  51. PROPERTY COMPILE_DEFINITIONS
  52. VALUES
  53. O3DE_GEM_NAME=${gem_name}
  54. O3DE_GEM_VERSION=${gem_version})
  55. # Clients and Servers use the above module, and it contains assets so is needed by builders.
  56. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  57. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  58. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  59. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::UiBasics.Builders Gem::LyShineExamples.Builders)