CMakeLists.txt 4.0 KB

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