CMakeLists.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. camera_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PRIVATE
  15. Source
  16. BUILD_DEPENDENCIES
  17. PUBLIC
  18. Gem::Atom_RPI.Public
  19. AZ::AtomCore
  20. AZ::AzCore
  21. AZ::AzFramework
  22. )
  23. ly_add_target(
  24. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  25. NAMESPACE Gem
  26. FILES_CMAKE
  27. camera_shared_files.cmake
  28. INCLUDE_DIRECTORIES
  29. PRIVATE
  30. Source
  31. BUILD_DEPENDENCIES
  32. PRIVATE
  33. Gem::${gem_name}.Static
  34. )
  35. # Inject the gem name into the Module source file
  36. ly_add_source_properties(
  37. SOURCES
  38. Source/CameraGem.cpp
  39. PROPERTY COMPILE_DEFINITIONS
  40. VALUES
  41. O3DE_GEM_NAME=${gem_name}
  42. O3DE_GEM_VERSION=${gem_version})
  43. # clients and servers use the above module:
  44. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  45. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  46. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  47. if (PAL_TRAIT_BUILD_HOST_TOOLS)
  48. ly_add_target(
  49. NAME ${gem_name}.Editor GEM_MODULE
  50. NAMESPACE Gem
  51. FILES_CMAKE
  52. camera_editor_files.cmake
  53. COMPILE_DEFINITIONS
  54. PRIVATE
  55. CAMERA_EDITOR
  56. INCLUDE_DIRECTORIES
  57. PRIVATE
  58. Source
  59. BUILD_DEPENDENCIES
  60. PRIVATE
  61. AZ::AzToolsFramework
  62. Gem::${gem_name}.Static
  63. Gem::AtomToolsFramework.Static
  64. RUNTIME_DEPENDENCIES
  65. Legacy::EditorCommon
  66. )
  67. # tools and builders use the above module.
  68. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  69. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  70. endif()
  71. # The DefaultPrefab contains an Editor${gem_name}Component which makes this gem required