CMakeLists.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}")
  9. ly_add_target(
  10. NAME AtomSampleViewer.Private.Static STATIC
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. atomsampleviewergem_private_files.cmake
  14. ${pal_dir}/atomsampleviewer_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  15. PLATFORM_INCLUDE_FILES
  16. ${pal_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}.cmake
  17. INCLUDE_DIRECTORIES
  18. PUBLIC
  19. Lib
  20. Source
  21. ${pal_dir}
  22. BUILD_DEPENDENCIES
  23. PUBLIC
  24. AZ::AzGameFramework
  25. Gem::Atom_AtomBridge.Static
  26. Gem::Atom_Feature_Common.Static
  27. Gem::Atom_Component_DebugCamera.Static
  28. Gem::Profiler.Static
  29. Gem::DiffuseProbeGrid.Static
  30. )
  31. ly_add_target(
  32. NAME AtomSampleViewer ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  33. NAMESPACE Gem
  34. FILES_CMAKE
  35. atomsampleviewergem_private_shared_files.cmake
  36. ../../atomsampleviewer_asset_files.cmake
  37. PLATFORM_INCLUDE_FILES
  38. ${pal_dir}/additional_${PAL_PLATFORM_NAME_LOWERCASE}_runtime_library.cmake
  39. BUILD_DEPENDENCIES
  40. PRIVATE
  41. AZ::AzGameFramework
  42. Gem::Atom_AtomBridge.Static
  43. Gem::AtomSampleViewer.Private.Static
  44. Gem::ImGui.imguilib
  45. )
  46. # if enabled, AtomSampleViewer is used by the Client and ServerLauncher
  47. ly_create_alias(NAME AtomSampleViewer.Clients NAMESPACE Gem TARGETS Gem::AtomSampleViewer)
  48. ly_create_alias(NAME AtomSampleViewer.Servers NAMESPACE Gem TARGETS Gem::AtomSampleViewer)
  49. ly_create_alias(NAME AtomSampleViewer.Unified NAMESPACE Gem TARGETS Gem::AtomSampleViewer)
  50. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  51. ly_add_target(
  52. NAME AtomSampleViewer.Tools.Static STATIC
  53. NAMESPACE Gem
  54. FILES_CMAKE
  55. atomsampleviewergem_tools_files.cmake
  56. INCLUDE_DIRECTORIES
  57. PUBLIC
  58. .
  59. Tools
  60. BUILD_DEPENDENCIES
  61. PRIVATE
  62. AZ::AzGameFramework
  63. Gem::Atom_AtomBridge.Static
  64. PUBLIC
  65. Gem::Atom_RPI.Edit
  66. )
  67. ly_add_target(
  68. NAME AtomSampleViewer.Tools GEM_MODULE
  69. NAMESPACE Gem
  70. FILES_CMAKE
  71. atomsampleviewergem_tools_shared_files.cmake
  72. COMPILE_DEFINITIONS
  73. PUBLIC
  74. INCLUDE_DIRECTORIES
  75. PRIVATE
  76. .
  77. Source
  78. Source/Platform/${PAL_PLATFORM_NAME}
  79. BUILD_DEPENDENCIES
  80. PUBLIC
  81. AZ::AzCore
  82. Gem::AtomSampleViewer.Tools.Static
  83. RUNTIME_DEPENDENCIES
  84. Gem::AtomSampleViewer
  85. )
  86. # The AtomSampleViewer.Tools target is the real GEM_MODULE target made above, but the AssetBuilder/AssetProcessor
  87. # also needs that target, so alias the "Builders" variant to it
  88. ly_create_alias(NAME AtomSampleViewer.Builders NAMESPACE Gem TARGETS Gem::AtomSampleViewer.Tools)
  89. endif()
  90. ################################################################################
  91. # Tests
  92. ################################################################################
  93. if(PAL_TRAIT_BUILD_SUPPORTS_TESTS)
  94. ly_add_target(
  95. NAME AtomSampleViewer.Tests MODULE
  96. NAMESPACE Gem
  97. FILES_CMAKE
  98. atomsampleviewer_tests_files.cmake
  99. INCLUDE_DIRECTORIES
  100. PRIVATE
  101. Tests
  102. BUILD_DEPENDENCIES
  103. PRIVATE
  104. AZ::AzTest
  105. Gem::AtomSampleViewer
  106. )
  107. ly_add_googletest(
  108. NAME Gem::AtomSampleViewer.Tests
  109. TARGET Gem::AtomSampleViewer.Tests
  110. )
  111. endif()
  112. # If we build a server, then apply the gems to the server
  113. if(PAL_TRAIT_BUILD_SERVER_SUPPORTED)
  114. set_property(GLOBAL APPEND PROPERTY LY_LAUNCHER_SERVER_PROJECTS AtomSampleViewer)
  115. endif()