CMakeLists.txt 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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}.Editor.Static STATIC
  13. NAMESPACE Gem
  14. FILES_CMAKE
  15. scriptcanvastestingeditor_files.cmake
  16. scriptcanvastesting_autogen_files.cmake
  17. INCLUDE_DIRECTORIES
  18. PRIVATE
  19. Source
  20. .
  21. COMPILE_DEFINITIONS
  22. PRIVATE
  23. SCRIPTCANVAS_EDITOR
  24. SCRIPTCANVAS
  25. SCRIPTCANVAS_ERRORS_ENABLED
  26. ENABLE_EXTENDED_MATH_SUPPORT=0
  27. BUILD_DEPENDENCIES
  28. PUBLIC
  29. Gem::ScriptCanvas
  30. Gem::ScriptCanvas.Editor
  31. Gem::GraphCanvasWidgets
  32. Gem::ScriptEvents.Editor
  33. Gem::ScriptCanvas.Extensions
  34. PRIVATE
  35. AZ::AzCore
  36. AZ::AzFramework
  37. AZ::AzToolsFramework
  38. AZ::AssetBuilderSDK
  39. AUTOGEN_RULES
  40. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h
  41. *.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp
  42. *.ScriptCanvasFunction.xml,ScriptCanvasFunction_Header.jinja,$path/$fileprefix.generated.h
  43. *.ScriptCanvasFunction.xml,ScriptCanvasFunction_Source.jinja,$path/$fileprefix.generated.cpp
  44. RUNTIME_DEPENDENCIES
  45. Gem::ScriptCanvas.Editor
  46. Gem::GraphCanvasWidgets
  47. Gem::ScriptEvents
  48. )
  49. ly_add_target(
  50. NAME ${gem_name}.Editor GEM_MODULE
  51. NAMESPACE Gem
  52. FILES_CMAKE
  53. scriptcanvastestingeditor_shared_files.cmake
  54. INCLUDE_DIRECTORIES
  55. PRIVATE
  56. .
  57. Source
  58. COMPILE_DEFINITIONS
  59. PRIVATE
  60. SCRIPTCANVAS_EDITOR
  61. SCRIPTCANVAS
  62. SCRIPTCANVAS_ERRORS_ENABLED
  63. ENABLE_EXTENDED_MATH_SUPPORT=0
  64. BUILD_DEPENDENCIES
  65. PRIVATE
  66. Gem::${gem_name}.Editor.Static
  67. AZ::AzCore
  68. AZ::AzFramework
  69. AZ::AzToolsFramework
  70. RUNTIME_DEPENDENCIES
  71. Gem::ScriptCanvas.Editor
  72. )
  73. # Inject the gem name into the Module source file
  74. ly_add_source_properties(
  75. SOURCES
  76. Source/ScriptCanvasTestingEditorModule.cpp
  77. PROPERTY COMPILE_DEFINITIONS
  78. VALUES
  79. O3DE_GEM_NAME=${gem_name}
  80. O3DE_GEM_VERSION=${gem_version})
  81. # By default, the above module is used only in tools:
  82. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  83. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  84. ################################################################################
  85. # Tests
  86. ################################################################################
  87. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  88. ly_add_target(
  89. NAME ${gem_name}.Editor.Tests MODULE
  90. NAMESPACE Gem
  91. FILES_CMAKE
  92. scriptcanvastestingeditor_tests_files.cmake
  93. INCLUDE_DIRECTORIES
  94. PRIVATE
  95. .
  96. Source
  97. Tests
  98. COMPILE_DEFINITIONS
  99. PRIVATE
  100. SCRIPTCANVAS_EDITOR
  101. SCRIPTCANVAS
  102. SCRIPTCANVAS_ERRORS_ENABLED
  103. ENABLE_EXTENDED_MATH_SUPPORT=0
  104. BUILD_DEPENDENCIES
  105. PRIVATE
  106. AZ::AzTest
  107. AZ::AzFramework
  108. AZ::AzToolsFramework
  109. Gem::${gem_name}.Editor.Static
  110. Gem::ScriptCanvas.Editor
  111. RUNTIME_DEPENDENCIES
  112. Gem::GraphCanvas.Editor
  113. Gem::ScriptCanvas.Editor
  114. )
  115. ly_add_googletest(
  116. NAME Gem::${gem_name}.Editor.Tests
  117. )
  118. endif()