CMakeLists.txt 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  1. #
  2. # All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. # its licensors.
  4. #
  5. # For complete copyright and license terms please see the LICENSE at the root of this
  6. # distribution (the "License"). All use of this software is governed by the License,
  7. # or, if provided, by the license below or the license accompanying this file. Do not
  8. # remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. #
  11. ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME})
  12. ly_add_target(
  13. NAME AtomSampleViewer.Lib.Static STATIC
  14. NAMESPACE Gem
  15. FILES_CMAKE
  16. atomsampleviewergem_lib_files.cmake
  17. INCLUDE_DIRECTORIES
  18. PUBLIC
  19. Include
  20. Lib
  21. BUILD_DEPENDENCIES
  22. PUBLIC
  23. AZ::AzGameFramework
  24. Gem::Atom_AtomBridge.Static
  25. Gem::Atom_RPI.Public
  26. Gem::Atom_Utils.Static
  27. )
  28. ly_add_target(
  29. NAME AtomSampleViewer.Private.Static STATIC
  30. NAMESPACE Gem
  31. FILES_CMAKE
  32. atomsampleviewergem_private_files.cmake
  33. ${pal_dir}/atomsampleviewer_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  34. INCLUDE_DIRECTORIES
  35. PUBLIC
  36. Include
  37. Lib
  38. Source
  39. ${pal_dir}
  40. BUILD_DEPENDENCIES
  41. PUBLIC
  42. AZ::AzGameFramework
  43. Gem::Atom_AtomBridge.Static
  44. Gem::Atom_Feature_Common.Static
  45. Gem::Atom_Component_DebugCamera.Static
  46. Gem::AtomSampleViewer.Lib.Static
  47. )
  48. ly_add_target(
  49. NAME AtomSampleViewer ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  50. NAMESPACE Gem
  51. OUTPUT_NAME Gem.AtomSampleViewerGem.2114099d7a8940c2813e93b8b417277e.v0.1.0
  52. FILES_CMAKE
  53. atomsampleviewergem_private_shared_files.cmake
  54. ../../atomsampleviewer_asset_files.cmake
  55. INCLUDE_DIRECTORIES
  56. PUBLIC
  57. Include
  58. PLATFORM_INCLUDE_FILES
  59. ${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_runtime_library.cmake
  60. BUILD_DEPENDENCIES
  61. PRIVATE
  62. AZ::AzGameFramework
  63. Gem::Atom_AtomBridge.Static
  64. Gem::AtomSampleViewer.Private.Static
  65. Gem::ImGui.imguilib
  66. )
  67. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  68. ly_add_target(
  69. NAME AtomSampleViewer.Tools.Static STATIC
  70. NAMESPACE Gem
  71. FILES_CMAKE
  72. atomsampleviewergem_tools_files.cmake
  73. INCLUDE_DIRECTORIES
  74. PUBLIC
  75. Include
  76. .
  77. Tools
  78. BUILD_DEPENDENCIES
  79. PRIVATE
  80. AZ::AzGameFramework
  81. Gem::Atom_AtomBridge.Static
  82. Gem::AtomSampleViewer.Lib.Static
  83. PUBLIC
  84. Gem::Atom_RPI.Edit
  85. )
  86. ly_add_target(
  87. NAME AtomSampleViewer.Tools MODULE
  88. NAMESPACE Gem
  89. OUTPUT_NAME Gem.AtomSampleViewerGem.Tools.2114099d7a8940c2813e93b8b417277e.v0.1.0
  90. FILES_CMAKE
  91. atomsampleviewergem_tools_shared_files.cmake
  92. COMPILE_DEFINITIONS
  93. PUBLIC
  94. INCLUDE_DIRECTORIES
  95. PRIVATE
  96. .
  97. Source
  98. Source/Platform/${PAL_PLATFORM_NAME}
  99. PUBLIC
  100. Include
  101. BUILD_DEPENDENCIES
  102. PUBLIC
  103. AZ::AzCore
  104. Gem::AtomSampleViewer.Tools.Static
  105. )
  106. endif()
  107. ################################################################################
  108. # Gem dependencies
  109. ################################################################################
  110. ly_add_project_dependencies(
  111. PROJECT_NAME
  112. AtomSampleViewer
  113. TARGETS
  114. AtomSampleViewer.GameLauncher
  115. DEPENDENCIES_FILES runtime_dependencies.cmake
  116. )
  117. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  118. ly_add_project_dependencies(
  119. PROJECT_NAME
  120. AtomSampleViewer
  121. TARGETS
  122. AssetBuilder
  123. AssetProcessor
  124. AssetProcessorBatch
  125. Editor
  126. DEPENDENCIES_FILES tool_dependencies.cmake
  127. )
  128. endif()
  129. if(PAL_TRAIT_BUILD_SUPPORTS_SERVER)
  130. ly_add_project_dependencies(
  131. PROJECT_NAME
  132. AtomSampleViewer
  133. TARGETS
  134. AtomSampleViewerServer
  135. DEPENDENCIES_FILES runtime_dependencies.cmake
  136. )
  137. endif()
  138. ################################################################################
  139. # Tests
  140. ################################################################################
  141. if(PAL_TRAIT_BUILD_SUPPORTS_TESTS)
  142. ly_add_target(
  143. NAME AtomSampleViewer.Tests MODULE
  144. NAMESPACE Gem
  145. FILES_CMAKE
  146. atomsampleviewer_tests_files.cmake
  147. INCLUDE_DIRECTORIES
  148. PRIVATE
  149. Tests
  150. BUILD_DEPENDENCIES
  151. PRIVATE
  152. AZ::AzTest
  153. Gem::AtomSampleViewer
  154. )
  155. ly_add_googletest(
  156. NAME Gem::AtomSampleViewer.Tests
  157. TARGET Gem::AtomSampleViewer.Tests
  158. )
  159. endif()