CMakeLists.txt 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. if(NOT PAL_TRAIT_BUILD_HOST_TOOLS)
  9. return()
  10. endif()
  11. ly_add_target(
  12. NAME ${gem_name}.Static STATIC
  13. NAMESPACE Gem
  14. FILES_CMAKE
  15. testassetbuilder_files.cmake
  16. INCLUDE_DIRECTORIES
  17. PRIVATE
  18. Source
  19. BUILD_DEPENDENCIES
  20. PUBLIC
  21. AZ::AzCore
  22. AZ::AssetBuilderSDK
  23. )
  24. ly_add_target(
  25. NAME ${gem_name}.Editor GEM_MODULE
  26. NAMESPACE Gem
  27. FILES_CMAKE
  28. testassetbuilder_shared_files.cmake
  29. INCLUDE_DIRECTORIES
  30. PRIVATE
  31. Source
  32. BUILD_DEPENDENCIES
  33. PRIVATE
  34. Gem::${gem_name}.Static
  35. )
  36. # Inject the gem name into the Module source file
  37. ly_add_source_properties(
  38. SOURCES
  39. Source/TestAssetBuilderModule.cpp
  40. PROPERTY COMPILE_DEFINITIONS
  41. VALUES
  42. O3DE_GEM_NAME=${gem_name}
  43. O3DE_GEM_VERSION=${gem_version})
  44. # the above module is for use in builders only
  45. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)