CMakeLists.txt 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 ${gem_name}.API HEADERONLY
  11. NAMESPACE Gem
  12. FILES_CMAKE
  13. scriptautomation_header_files.cmake
  14. INCLUDE_DIRECTORIES
  15. INTERFACE
  16. Include
  17. )
  18. ly_add_target(
  19. NAME ${gem_name}.Static STATIC
  20. NAMESPACE Gem
  21. FILES_CMAKE
  22. scriptautomation_files.cmake
  23. ${pal_dir}/scriptautomation_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake
  24. INCLUDE_DIRECTORIES
  25. PRIVATE
  26. Source
  27. ${pal_dir}
  28. BUILD_DEPENDENCIES
  29. PUBLIC
  30. AZ::AzCore
  31. AZ::AzFramework
  32. Gem::${gem_name}.API
  33. Gem::Atom_Feature_Common.Public
  34. Gem::Atom_RPI.Public
  35. )
  36. ly_add_target(
  37. NAME ${gem_name} ${PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE}
  38. NAMESPACE Gem
  39. FILES_CMAKE
  40. scriptautomation_shared_files.cmake
  41. INCLUDE_DIRECTORIES
  42. PUBLIC
  43. Include
  44. PRIVATE
  45. Source
  46. BUILD_DEPENDENCIES
  47. PRIVATE
  48. Gem::${gem_name}.Static
  49. )
  50. # Inject the gem name into the Module source file
  51. ly_add_source_properties(
  52. SOURCES
  53. Source/ScriptAutomationModule.cpp
  54. PROPERTY COMPILE_DEFINITIONS
  55. VALUES
  56. O3DE_GEM_NAME=${gem_name}
  57. O3DE_GEM_VERSION=${gem_version})
  58. ly_create_alias(NAME ${gem_name}.Servers NAMESPACE Gem TARGETS Gem::${gem_name})
  59. ly_create_alias(NAME ${gem_name}.Unified NAMESPACE Gem TARGETS Gem::${gem_name})
  60. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name})
  61. ly_create_alias(NAME ${gem_name}.Clients NAMESPACE Gem TARGETS Gem::${gem_name})
  62. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name})
  63. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  64. ly_add_target(
  65. NAME ${gem_name}.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  66. NAMESPACE Gem
  67. FILES_CMAKE
  68. scriptautomation_tests_files.cmake
  69. INCLUDE_DIRECTORIES
  70. PRIVATE
  71. Include
  72. Tests
  73. BUILD_DEPENDENCIES
  74. PRIVATE
  75. AZ::AzTest
  76. AZ::AzFramework
  77. Gem::${gem_name}.Static
  78. RUNTIME_DEPENDENCIES
  79. Gem::${gem_name}
  80. )
  81. ly_add_googletest(
  82. NAME Gem::${gem_name}.Tests
  83. LABELS REQUIRES_tiaf
  84. )
  85. endif()