CMakeLists.txt 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  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(PAL_TRAIT_BUILD_HOST_TOOLS)
  9. ly_add_target(
  10. NAME ${gem_name}.Editor.Static STATIC
  11. NAMESPACE Gem
  12. AUTOMOC
  13. FILES_CMAKE
  14. landscapecanvas_editor_static_files.cmake
  15. COMPILE_DEFINITIONS
  16. PRIVATE
  17. LANDSCAPECANVAS_EDITOR
  18. INCLUDE_DIRECTORIES
  19. PRIVATE
  20. .
  21. Source
  22. PUBLIC
  23. Include
  24. BUILD_DEPENDENCIES
  25. PRIVATE
  26. 3rdParty::Qt::Core
  27. 3rdParty::Qt::Gui
  28. 3rdParty::Qt::Widgets
  29. AZ::AzCore
  30. AZ::AzToolsFramework
  31. Legacy::CryCommon
  32. Legacy::Editor.Headers
  33. Legacy::EditorCommon
  34. Gem::GraphModel.Editor.Static
  35. Gem::GradientSignal.Editor
  36. Gem::SurfaceData.Editor
  37. Gem::LmbrCentral.Editor
  38. PUBLIC
  39. Gem::GraphCanvasWidgets
  40. RUNTIME_DEPENDENCIES
  41. Gem::GradientSignal.Editor
  42. Gem::SurfaceData.Editor
  43. Gem::LmbrCentral.Editor
  44. )
  45. ly_add_target(
  46. NAME ${gem_name}.Editor GEM_MODULE
  47. NAMESPACE Gem
  48. FILES_CMAKE
  49. landscapecanvas_editor_files.cmake
  50. COMPILE_DEFINITIONS
  51. PRIVATE
  52. LANDSCAPECANVAS_EDITOR
  53. INCLUDE_DIRECTORIES
  54. PRIVATE
  55. Source
  56. PUBLIC
  57. Include
  58. BUILD_DEPENDENCIES
  59. PRIVATE
  60. AZ::AzCore
  61. AZ::AzToolsFramework
  62. Legacy::Editor.Headers
  63. Gem::GraphModel.Editor.Static
  64. Gem::${gem_name}.Editor.Static
  65. RUNTIME_DEPENDENCIES
  66. Gem::GraphCanvas.Editor
  67. Gem::LmbrCentral.Editor
  68. Gem::GraphModel.Editor
  69. Gem::GradientSignal.Editor
  70. Gem::SurfaceData.Editor
  71. )
  72. # Inject the gem name into the Module source file
  73. ly_add_source_properties(
  74. SOURCES
  75. Source/LandscapeCanvasEditorModule.cpp
  76. PROPERTY COMPILE_DEFINITIONS
  77. VALUES
  78. O3DE_GEM_NAME=${gem_name}
  79. O3DE_GEM_VERSION=${gem_version})
  80. # by default, load the above "Gem::${gem_name}.Editor" module in dev applications
  81. ly_create_alias(NAME ${gem_name}.Builders NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  82. ly_create_alias(NAME ${gem_name}.Tools NAMESPACE Gem TARGETS Gem::${gem_name}.Editor)
  83. endif()
  84. ################################################################################
  85. # Tests
  86. ################################################################################
  87. if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
  88. if(PAL_TRAIT_BUILD_HOST_TOOLS)
  89. ly_add_target(
  90. NAME ${gem_name}.Editor.Tests ${PAL_TRAIT_TEST_TARGET_TYPE}
  91. NAMESPACE Gem
  92. FILES_CMAKE
  93. landscapecanvas_tests_editor_files.cmake
  94. COMPILE_DEFINITIONS
  95. PRIVATE
  96. LANDSCAPECANVAS_EDITOR
  97. INCLUDE_DIRECTORIES
  98. PRIVATE
  99. .
  100. Tests
  101. Source
  102. BUILD_DEPENDENCIES
  103. PRIVATE
  104. AZ::AzTest
  105. AZ::AzFramework
  106. AZ::AzToolsFramework
  107. Gem::GraphModel.Editor.Static
  108. Gem::${gem_name}.Editor.Static
  109. RUNTIME_DEPENDENCIES
  110. Gem::GraphCanvasWidgets
  111. )
  112. ly_add_googletest(
  113. NAME Gem::${gem_name}.Editor.Tests
  114. LABELS REQUIRES_tiaf
  115. )
  116. endif()
  117. endif()