CMakeLists.txt 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. textureatlas_files.cmake
  13. INCLUDE_DIRECTORIES
  14. PUBLIC
  15. Include
  16. BUILD_DEPENDENCIES
  17. PRIVATE
  18. Legacy::CryCommon
  19. AZ::AzFramework
  20. PUBLIC
  21. Gem::Atom_RPI.Public
  22. AZ::AtomCore
  23. )
  24. ly_add_target(
  25. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  26. NAMESPACE Gem
  27. FILES_CMAKE
  28. textureatlas_module_files.cmake
  29. INCLUDE_DIRECTORIES
  30. PUBLIC
  31. Include
  32. BUILD_DEPENDENCIES
  33. PRIVATE
  34. Legacy::CryCommon
  35. Gem::${gem_name}.Static
  36. )
  37. # Inject the gem name into the Module source file
  38. ly_add_source_properties(
  39. SOURCES
  40. Source/TextureAtlasModule.cpp
  41. PROPERTY COMPILE_DEFINITIONS
  42. VALUES
  43. O3DE_GEM_NAME=${gem_name}
  44. O3DE_GEM_VERSION=${gem_version})
  45. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  46. ly_add_target(
  47. NAME ${gem_name}.Editor GEM_MODULE
  48. NAMESPACE Gem
  49. FILES_CMAKE
  50. textureatlas_module_files.cmake
  51. textureatlas_builder_files.cmake
  52. COMPILE_DEFINITIONS
  53. PRIVATE
  54. TEXTUREATLAS_EDITOR
  55. INCLUDE_DIRECTORIES
  56. PUBLIC
  57. Include
  58. BUILD_DEPENDENCIES
  59. PRIVATE
  60. Legacy::CryCommon
  61. AZ::AzCore
  62. AZ::AzFramework
  63. AZ::AssetBuilderSDK
  64. Gem::${gem_name}.Static
  65. Gem::ImageProcessingAtom.Headers
  66. )
  67. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  68. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  69. endif()
  70. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  71. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  72. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})