CMakeLists.txt 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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. ly_add_target(
  9. NAME ${gem_name}.Static STATIC
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. maestro_static_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PRIVATE
  15. Source
  16. PUBLIC
  17. Include
  18. BUILD_DEPENDENCIES
  19. PRIVATE
  20. Legacy::CryCommon
  21. PUBLIC
  22. Gem::AudioSystem.API
  23. )
  24. ly_add_target(
  25. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  26. NAMESPACE Gem
  27. FILES_CMAKE
  28. maestro_files.cmake
  29. INCLUDE_DIRECTORIES
  30. PRIVATE
  31. Source
  32. PUBLIC
  33. Include
  34. BUILD_DEPENDENCIES
  35. PRIVATE
  36. Legacy::CryCommon
  37. Gem::${gem_name}.Static
  38. RUNTIME_DEPENDENCIES
  39. Gem::LmbrCentral
  40. )
  41. # Inject the gem name into the Module source file
  42. ly_add_source_properties(
  43. SOURCES
  44. Source/MaestroModule.cpp
  45. PROPERTY COMPILE_DEFINITIONS
  46. VALUES
  47. O3DE_GEM_NAME=${gem_name}
  48. O3DE_GEM_VERSION=${gem_version})
  49. # if enabled, "${gem_name}" module is used for Clients and Servers:
  50. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  51. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  52. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  53. if (PAL_TRAIT_BUILD_HOST_TOOLS)
  54. ly_add_target(
  55. NAME ${gem_name}.Editor GEM_MODULE
  56. NAMESPACE Gem
  57. FILES_CMAKE
  58. maestro_files.cmake
  59. maestro_editor_files.cmake
  60. INCLUDE_DIRECTORIES
  61. PRIVATE
  62. Source
  63. PUBLIC
  64. Include
  65. COMPILE_DEFINITIONS
  66. PRIVATE
  67. MAESTRO_EDITOR
  68. BUILD_DEPENDENCIES
  69. PRIVATE
  70. 3rdParty::Qt::Widgets
  71. Legacy::CryCommon
  72. Legacy::Editor.Headers
  73. AZ::AzFramework
  74. AZ::AzToolsFramework
  75. AZ::AssetBuilderSDK
  76. Gem::${gem_name}.Static
  77. RUNTIME_DEPENDENCIES
  78. Gem::LmbrCentral.Editor
  79. )
  80. # the .Editor variant is used in dev tools:
  81. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  82. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  83. endif()
  84. # ${gem_name} is still used by the CrySystem Level System, CSystem::SystemInit and TrackView
  85. ################################################################################
  86. # Tests
  87. ################################################################################
  88. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  89. ly_add_target(
  90. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  91. NAMESPACE Gem
  92. FILES_CMAKE
  93. maestro_tests_files.cmake
  94. INCLUDE_DIRECTORIES
  95. PRIVATE
  96. Tests
  97. Source
  98. BUILD_DEPENDENCIES
  99. PRIVATE
  100. AZ::AzTest
  101. Legacy::CryCommon
  102. Gem::${gem_name}.Static
  103. )
  104. ly_add_googletest(
  105. NAME Gem::${gem_name}.Tests
  106. LABELS REQUIRES_tiaf
  107. )
  108. endif()