diff --git a/Gems/LyShine/Code/CMakeLists.txt b/Gems/LyShine/Code/CMakeLists.txt index fe5e2e77df..905228e414 100644 --- a/Gems/LyShine/Code/CMakeLists.txt +++ b/Gems/LyShine/Code/CMakeLists.txt @@ -63,7 +63,6 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) AUTORCC FILES_CMAKE lyshine_uicanvaseditor_files.cmake - lyshine_editor_builder_files.cmake INCLUDE_DIRECTORIES PRIVATE . @@ -78,7 +77,6 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) 3rdParty::Qt::Widgets AZ::AzCore AZ::AzToolsFramework - AZ::AssetBuilderSDK Legacy::EditorCommon Legacy::EditorCore Gem::LyShine.Static @@ -98,7 +96,6 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( NAME LyShine.Editor GEM_MODULE - NAMESPACE Gem FILES_CMAKE lyshine_common_module_files.cmake @@ -115,17 +112,72 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) BUILD_DEPENDENCIES PRIVATE Legacy::CryCommon - AZ::AssetBuilderSDK + AZ::AzToolsFramework Gem::LyShine.Editor.Static Gem::LmbrCentral.Editor Gem::TextureAtlas.Editor RUNTIME_DEPENDENCIES Gem::LmbrCentral.Editor Gem::TextureAtlas.Editor -) + ) + + # by naming this target LyShine.Builders it ensures that it is loaded + # in any pipeline tools (Like Asset Processor, AssetBuilder, etc) + ly_add_target( + NAME LyShine.Builders.Static STATIC + NAMESPACE Gem + FILES_CMAKE + lyshine_editor_builder_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + . + Source + PUBLIC + Include + BUILD_DEPENDENCIES + PRIVATE + AZ::AzCore + AZ::AzToolsFramework + AZ::AssetBuilderSDK + Gem::LyShine.Static + Legacy::CryCommon + Gem::LmbrCentral.Editor + Gem::TextureAtlas.Editor + Gem::AtomToolsFramework.Static + Gem::AtomToolsFramework.Editor + ${additional_dependencies} + PUBLIC + Gem::Atom_RPI.Public + Gem::Atom_Utils.Static + Gem::Atom_Bootstrap.Headers + ) + + ly_add_target( + NAME LyShine.Builders GEM_MODULE + NAMESPACE Gem + OUTPUT_NAME Gem.LyShine.Builders + FILES_CMAKE + lyshine_common_module_files.cmake + COMPILE_DEFINITIONS + PRIVATE + LYSHINE_BUILDER + INCLUDE_DIRECTORIES + PRIVATE + . + Source + Editor + PUBLIC + Include + BUILD_DEPENDENCIES + PRIVATE + Legacy::CryCommon + AZ::AssetBuilderSDK + Gem::LyShine.Builders.Static + Gem::LmbrCentral.Editor + Gem::TextureAtlas.Editor + ) # by default, load the above "Gem::LyShine.Editor" module in dev tools: - ly_create_alias(NAME LyShine.Builders NAMESPACE Gem TARGETS Gem::LyShine.Editor) ly_create_alias(NAME LyShine.Tools NAMESPACE Gem TARGETS Gem::LyShine.Editor) endif() @@ -169,6 +221,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) COMPILE_DEFINITIONS PRIVATE LYSHINE_EDITOR + LYSHINE_BUILDER INCLUDE_DIRECTORIES PRIVATE Tests @@ -182,6 +235,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) Legacy::CryCommon AZ::AssetBuilderSDK Gem::LyShine.Editor.Static + Gem::LyShine.Builders.Static Gem::LmbrCentral.Editor Gem::TextureAtlas RUNTIME_DEPENDENCIES diff --git a/Gems/LyShine/Code/Source/LyShineModule.cpp b/Gems/LyShine/Code/Source/LyShineModule.cpp index 011bb9f203..64ce61b07a 100644 --- a/Gems/LyShine/Code/Source/LyShineModule.cpp +++ b/Gems/LyShine/Code/Source/LyShineModule.cpp @@ -52,9 +52,9 @@ #include "World/UiCanvasProxyRefComponent.h" #include "World/UiCanvasOnMeshComponent.h" -#if defined (LYSHINE_EDITOR) -# include "Pipeline/LyShineBuilder/LyShineBuilderComponent.h" -#endif // LYSHINE_EDITOR +#if defined(LYSHINE_BUILDER) +#include "Pipeline/LyShineBuilder/LyShineBuilderComponent.h" +#endif // LYSHINE_BUILDER namespace LyShine { @@ -64,7 +64,7 @@ namespace LyShine // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here. m_descriptors.insert(m_descriptors.end(), { LyShineSystemComponent::CreateDescriptor(), -#if defined (LYSHINE_EDITOR) +#if defined(LYSHINE_EDITOR) LyShineEditor::LyShineEditorSystemComponent::CreateDescriptor(), #endif UiCanvasAssetRefComponent::CreateDescriptor(), @@ -103,7 +103,7 @@ namespace LyShine UiRadioButtonComponent::CreateDescriptor(), UiRadioButtonGroupComponent::CreateDescriptor(), UiParticleEmitterComponent::CreateDescriptor(), - #if defined(LYSHINE_EDITOR) + #if defined(LYSHINE_BUILDER) // Builder LyShineBuilder::LyShineBuilderComponent::CreateDescriptor(), #endif @@ -123,7 +123,7 @@ namespace LyShine { return AZ::ComponentTypeList{ azrtti_typeid(), - #if defined (LYSHINE_EDITOR) + #if defined(LYSHINE_EDITOR) azrtti_typeid(), #endif #if AZ_LOADSCREENCOMPONENT_ENABLED diff --git a/Gems/LyShine/Code/lyshine_common_module_files.cmake b/Gems/LyShine/Code/lyshine_common_module_files.cmake index e725112e53..38d01eb181 100644 --- a/Gems/LyShine/Code/lyshine_common_module_files.cmake +++ b/Gems/LyShine/Code/lyshine_common_module_files.cmake @@ -8,4 +8,6 @@ set(FILES Source/LyShineModule.cpp Source/LyShineModule.h + Source/LyShineSystemComponent.cpp + Source/LyShineSystemComponent.h ) diff --git a/Gems/LyShine/Code/lyshine_static_files.cmake b/Gems/LyShine/Code/lyshine_static_files.cmake index 8c2275ab92..749ce06125 100644 --- a/Gems/LyShine/Code/lyshine_static_files.cmake +++ b/Gems/LyShine/Code/lyshine_static_files.cmake @@ -26,8 +26,6 @@ set(FILES Source/EditorPropertyTypes.h Source/LyShineLoadScreen.cpp Source/LyShineLoadScreen.h - Source/LyShineSystemComponent.cpp - Source/LyShineSystemComponent.h Source/RenderGraph.cpp Source/RenderGraph.h Source/TextMarkup.cpp