CMakeLists.txt 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. #
  2. # Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. #
  4. # SPDX-License-Identifier: Apache-2.0 OR MIT
  5. #
  6. #
  7. o3de_pal_dir(pal_source_dir ${CMAKE_CURRENT_LIST_DIR}/Source/Platform/${PAL_PLATFORM_NAME} "${gem_restricted_path}" "${gem_path}" "${gem_parent_relative_path}")
  8. ly_add_target(
  9. NAME ${gem_name}.Static STATIC
  10. NAMESPACE Gem
  11. FILES_CMAKE
  12. diffuseprobegrid_files.cmake
  13. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  14. INCLUDE_DIRECTORIES
  15. PUBLIC
  16. Include
  17. PRIVATE
  18. Source
  19. ${pal_source_dir}
  20. BUILD_DEPENDENCIES
  21. PUBLIC
  22. AZ::AzCore
  23. AZ::AzFramework
  24. Gem::Atom_RPI.Public
  25. Gem::Atom_Utils.Static
  26. Gem::Atom_Feature_Common
  27. Gem::CommonFeaturesAtom.Static
  28. Gem::LmbrCentral
  29. )
  30. ly_add_target(
  31. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  32. NAMESPACE Gem
  33. FILES_CMAKE
  34. diffuseprobegrid_shared_files.cmake
  35. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  36. INCLUDE_DIRECTORIES
  37. PUBLIC
  38. Include
  39. PRIVATE
  40. Source
  41. ${pal_source_dir}
  42. BUILD_DEPENDENCIES
  43. PRIVATE
  44. Gem::${gem_name}.Static
  45. Gem::LmbrCentral.API
  46. RUNTIME_DEPENDENCIES
  47. Gem::LmbrCentral
  48. )
  49. # Inject the gem name into the Module source file
  50. ly_add_source_properties(
  51. SOURCES
  52. Source/DiffuseProbeGridModule.cpp
  53. PROPERTY COMPILE_DEFINITIONS
  54. VALUES
  55. O3DE_GEM_NAME=${gem_name}
  56. O3DE_GEM_VERSION=${gem_version})
  57. # the above module is for use in all client/server types
  58. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  59. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  60. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  61. # If we are on a host platform add ${gem_name}.Editor which will also depend on ${gem_name}.Static
  62. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  63. ly_add_target(
  64. NAME ${gem_name}.Editor GEM_MODULE
  65. NAMESPACE Gem
  66. AUTOMOC
  67. FILES_CMAKE
  68. diffuseprobegrid_editor_shared_files.cmake
  69. ${pal_source_dir}/platform_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  70. COMPILE_DEFINITIONS
  71. PRIVATE
  72. DIFFUSEPROBEGRID_EDITOR
  73. INCLUDE_DIRECTORIES
  74. PRIVATE
  75. Source
  76. ${pal_source_dir}
  77. PUBLIC
  78. Include
  79. BUILD_DEPENDENCIES
  80. PUBLIC
  81. AZ::AzToolsFramework
  82. Gem::${gem_name}.Static
  83. )
  84. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  85. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  86. endif()