CMakeLists.txt 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  9. set(common_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/Common)
  10. ly_add_target(
  11. NAME AtomLyIntegration_CommonFeatures.Public HEADERONLY
  12. NAMESPACE Gem
  13. FILES_CMAKE
  14. atomlyintegration_commonfeatures_public_files.cmake
  15. INCLUDE_DIRECTORIES
  16. INTERFACE
  17. Include
  18. BUILD_DEPENDENCIES
  19. INTERFACE
  20. Gem::Atom_Feature_Common.Public
  21. Gem::AtomImGuiTools.Public
  22. )
  23. ly_add_target(
  24. NAME AtomLyIntegration_CommonFeatures.Static STATIC
  25. NAMESPACE Gem
  26. FILES_CMAKE
  27. atomlyintegration_commonfeatures_files.cmake
  28. INCLUDE_DIRECTORIES
  29. PRIVATE
  30. .
  31. Source
  32. PUBLIC
  33. Include
  34. BUILD_DEPENDENCIES
  35. PUBLIC
  36. AZ::AzCore
  37. AZ::AzFramework
  38. Gem::AtomLyIntegration_CommonFeatures.Public
  39. Gem::LmbrCentral.Static
  40. Gem::GradientSignal.Static
  41. Gem::SurfaceData.Static
  42. Gem::Atom_Feature_Common.Static
  43. Gem::Atom_Bootstrap.Headers
  44. )
  45. ly_add_target(
  46. NAME AtomLyIntegration_CommonFeatures ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  47. NAMESPACE Gem
  48. FILES_CMAKE
  49. atomlyintegration_commonfeatures_shared_files.cmake
  50. INCLUDE_DIRECTORIES
  51. PRIVATE
  52. Source
  53. PUBLIC
  54. Include
  55. BUILD_DEPENDENCIES
  56. PRIVATE
  57. Gem::AtomLyIntegration_CommonFeatures.Static
  58. RUNTIME_DEPENDENCIES
  59. Gem::Atom_RPI.Private
  60. )
  61. # The AtomLyIntegration_CommonFeatures module is used for Clients and Servers
  62. ly_create_alias(NAME AtomLyIntegration_CommonFeatures.Clients NAMESPACE Gem
  63. TARGETS
  64. Gem::AtomLyIntegration_CommonFeatures
  65. Gem::GradientSignal.Clients
  66. )
  67. ly_create_alias(NAME AtomLyIntegration_CommonFeatures.Servers NAMESPACE Gem
  68. TARGETS
  69. Gem::AtomLyIntegration_CommonFeatures
  70. Gem::GradientSignal.Servers
  71. )
  72. ly_create_alias(NAME AtomLyIntegration_CommonFeatures.Unified NAMESPACE Gem
  73. TARGETS
  74. Gem::AtomLyIntegration_CommonFeatures
  75. Gem::GradientSignal.Unified
  76. )
  77. # Add aliases that references the real name of the gem "CommonFeaturesAtom"
  78. # that reference the names Gem variants of "AtomLyIntegration_CommonFeatures"
  79. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem
  80. TARGETS
  81. Gem::AtomLyIntegration_CommonFeatures.Clients
  82. )
  83. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem
  84. TARGETS
  85. Gem::AtomLyIntegration_CommonFeatures.Servers
  86. )
  87. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem
  88. TARGETS
  89. Gem::AtomLyIntegration_CommonFeatures.Unified
  90. )
  91. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  92. ly_add_target(
  93. NAME AtomLyIntegration_CommonFeatures.Editor.Static STATIC
  94. NAMESPACE Gem
  95. AUTOUIC
  96. AUTOMOC
  97. AUTORCC
  98. FILES_CMAKE
  99. atomlyintegration_commonfeatures_editor_files.cmake
  100. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  101. PLATFORM_INCLUDE_FILES
  102. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  103. INCLUDE_DIRECTORIES
  104. PRIVATE
  105. .
  106. Source
  107. PUBLIC
  108. Include
  109. COMPILE_DEFINITIONS
  110. PRIVATE
  111. ATOMLYINTEGRATION_FEATURE_COMMON_EDITOR
  112. BUILD_DEPENDENCIES
  113. PUBLIC
  114. Gem::AtomLyIntegration_CommonFeatures.Static
  115. Gem::Atom_RPI.Edit
  116. Gem::AtomToolsFramework.Static
  117. Gem::AtomToolsFramework.Editor
  118. AZ::SceneCore
  119. AZ::SceneData
  120. Legacy::Editor.Headers
  121. Legacy::EditorCommon
  122. Legacy::CryCommon
  123. RUNTIME_DEPENDENCIES
  124. 3rdParty::OpenImageIO::Tools::Binaries
  125. 3rdParty::OpenImageIO::Tools::PythonPlugins
  126. )
  127. ly_add_target(
  128. NAME AtomLyIntegration_CommonFeatures.Editor GEM_MODULE
  129. NAMESPACE Gem
  130. FILES_CMAKE
  131. atomlyintegration_commonfeatures_shared_files.cmake
  132. INCLUDE_DIRECTORIES
  133. PRIVATE
  134. Source
  135. PUBLIC
  136. Include
  137. COMPILE_DEFINITIONS
  138. PRIVATE
  139. ATOMLYINTEGRATION_FEATURE_COMMON_EDITOR
  140. BUILD_DEPENDENCIES
  141. PRIVATE
  142. Gem::AtomLyIntegration_CommonFeatures.Editor.Static
  143. RUNTIME_DEPENDENCIES
  144. Legacy::EditorCommon
  145. )
  146. # The AtomLyIntegration_CommonFeatures.Editor module is used for Builders and Tools
  147. ly_create_alias(NAME AtomLyIntegration_CommonFeatures.Builders NAMESPACE Gem
  148. TARGETS
  149. Gem::AtomLyIntegration_CommonFeatures.Editor
  150. Gem::Atom_Feature_Common.Builders
  151. Gem::Atom_RPI.Builders
  152. Gem::GradientSignal.Builders
  153. )
  154. ly_create_alias(NAME AtomLyIntegration_CommonFeatures.Tools NAMESPACE Gem
  155. TARGETS
  156. Gem::AtomLyIntegration_CommonFeatures.Editor
  157. Gem::GradientSignal.Tools
  158. )
  159. # Add aliases that references the real name of the gem "CommonFeaturesAtom"
  160. # Tools and Builders variants
  161. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem
  162. TARGETS
  163. Gem::AtomLyIntegration_CommonFeatures.Builders
  164. )
  165. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem
  166. TARGETS
  167. Gem::AtomLyIntegration_CommonFeatures.Tools
  168. )
  169. ################################################################################
  170. # Tests
  171. ################################################################################
  172. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  173. ly_add_target(
  174. NAME AtomLyIntegration_CommonFeatures.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  175. NAMESPACE Gem
  176. FILES_CMAKE
  177. atomlyintegration_commonfeatures_editor_test_files.cmake
  178. INCLUDE_DIRECTORIES
  179. PRIVATE
  180. Tests
  181. Source
  182. BUILD_DEPENDENCIES
  183. PRIVATE
  184. AZ::AzTest
  185. AZ::AzTestShared
  186. AZ::AzToolsFramework
  187. AZ::AzToolsFrameworkTestCommon
  188. Gem::AtomLyIntegration_CommonFeatures.Static
  189. Gem::AtomLyIntegration_CommonFeatures.Editor.Static
  190. RUNTIME_DEPENDENCIES
  191. Gem::LmbrCentral.Editor
  192. )
  193. ly_add_googletest(
  194. NAME Gem::AtomLyIntegration_CommonFeatures.Editor.Tests
  195. LABELS REQUIRES_tiaf
  196. )
  197. endif()
  198. endif()
  199. # AtomLyIntegration_CommonFeatures gem targets are required as part of the Editor and AssetProcessor
  200. # due to the AZ::Render::EditorDirectionalLightComponent, AZ::Render::EditorMeshComponent,
  201. # AZ::Render::EditorGridComponent, AZ::Render::EditorHDRiSkyboxComponent,
  202. # AZ::Render::EditorImageBasedLightComponent being saved as part of the DefaultLevel.prefab