From 9a6a1ba97a28512e44cb241c55b455d151ae5b0a Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Thu, 2 Sep 2021 18:24:25 -0700 Subject: [PATCH] fixes monolithic release Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../Frontend/Console/Code/CMakeLists.txt | 4 +++ Gems/Atom/Feature/Common/Code/CMakeLists.txt | 4 +-- .../Platform/Windows/platform_windows.cmake | 4 +++ Gems/CrashReporting/Code/CMakeLists.txt | 29 ++++++++++--------- Registry/CMakeLists.txt | 4 +++ cmake/OutputDirectory.cmake | 2 +- cmake/SettingsRegistry.cmake | 5 ++++ 7 files changed, 36 insertions(+), 16 deletions(-) diff --git a/Code/Tools/TestImpactFramework/Frontend/Console/Code/CMakeLists.txt b/Code/Tools/TestImpactFramework/Frontend/Console/Code/CMakeLists.txt index 1aed0aadc6..9c1ccb2255 100644 --- a/Code/Tools/TestImpactFramework/Frontend/Console/Code/CMakeLists.txt +++ b/Code/Tools/TestImpactFramework/Frontend/Console/Code/CMakeLists.txt @@ -6,6 +6,10 @@ # # +if(LY_MONOLITHIC_GAME) + return() +endif() + ly_add_target( NAME TestImpact.Frontend.Console.Static STATIC NAMESPACE AZ diff --git a/Gems/Atom/Feature/Common/Code/CMakeLists.txt b/Gems/Atom/Feature/Common/Code/CMakeLists.txt index 8ed02f2c2f..b8c414dcc6 100644 --- a/Gems/Atom/Feature/Common/Code/CMakeLists.txt +++ b/Gems/Atom/Feature/Common/Code/CMakeLists.txt @@ -39,7 +39,7 @@ ly_add_target( Gem::Atom_Utils.Static Gem::Atom_Feature_Common.Public Gem::ImGui.imguilib - 3rdParty::lux_core + #3rdParty::lux_core # AZ_TRAIT_LUXCORE_SUPPORTED is disabled in every platform, Issue #3915 will remove ) ly_add_target( @@ -87,7 +87,7 @@ ly_add_target( AZ::AzFramework Gem::Atom_Feature_Common.Static Gem::Atom_Feature_Common.Public - 3rdParty::lux_core + #3rdParty::lux_core # AZ_TRAIT_LUXCORE_SUPPORTED is disabled in every platform, Issue #3915 will remove ) if(PAL_TRAIT_BUILD_HOST_TOOLS) diff --git a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows.cmake b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows.cmake index b74260a5de..ecdc7d59ab 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows.cmake +++ b/Gems/Atom/Feature/Common/Code/Source/Platform/Windows/platform_windows.cmake @@ -6,6 +6,10 @@ # # +if(LY_MONOLITHIC_GAME) # Do not use OpenImageIO in monolithic game + return() +endif() + set(LY_BUILD_DEPENDENCIES PRIVATE 3rdParty::OpenImageIO diff --git a/Gems/CrashReporting/Code/CMakeLists.txt b/Gems/CrashReporting/Code/CMakeLists.txt index b12b5d8944..8bcb143d1c 100644 --- a/Gems/CrashReporting/Code/CMakeLists.txt +++ b/Gems/CrashReporting/Code/CMakeLists.txt @@ -35,17 +35,20 @@ ly_add_target( ly_create_alias(NAME CrashReporting.Clients NAMESPACE Gem TARGETS Gem::CrashReporting) ly_create_alias(NAME CrashReporting.Servers NAMESPACE Gem TARGETS Gem::CrashReporting) +if(NOT LY_MONOLITHIC_GAME) -ly_add_target( - NAME CrashReporting.Uploader APPLICATION - NAMESPACE AZ - FILES_CMAKE - game_crash_uploader_files.cmake - Platform/${PAL_PLATFORM_NAME}/game_crash_uploader_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake - INCLUDE_DIRECTORIES - PRIVATE - Include - BUILD_DEPENDENCIES - PRIVATE - AZ::CrashUploaderSupport -) + ly_add_target( + NAME CrashReporting.Uploader APPLICATION + NAMESPACE AZ + FILES_CMAKE + game_crash_uploader_files.cmake + Platform/${PAL_PLATFORM_NAME}/game_crash_uploader_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + Include + BUILD_DEPENDENCIES + PRIVATE + AZ::CrashUploaderSupport + ) + +endif() diff --git a/Registry/CMakeLists.txt b/Registry/CMakeLists.txt index f78df700e7..100867010d 100644 --- a/Registry/CMakeLists.txt +++ b/Registry/CMakeLists.txt @@ -6,6 +6,10 @@ # # +if(LY_MONOLITHIC_GAME) + return() +endif() + ly_install_directory(DIRECTORIES .) cmake_path(RELATIVE_PATH CMAKE_RUNTIME_OUTPUT_DIRECTORY BASE_DIRECTORY ${CMAKE_BINARY_DIR} OUTPUT_VARIABLE runtime_output_directory) diff --git a/cmake/OutputDirectory.cmake b/cmake/OutputDirectory.cmake index c1409bd825..a75b47e818 100644 --- a/cmake/OutputDirectory.cmake +++ b/cmake/OutputDirectory.cmake @@ -15,5 +15,5 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Build dir # be installed together. We also have an exclusion rule in the AP that filters out the # "install" folder to avoid the AP picking it up if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - ly_set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install) + set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE PATH "Install directory" FORCE) endif() diff --git a/cmake/SettingsRegistry.cmake b/cmake/SettingsRegistry.cmake index 58beba089c..f84ecca334 100644 --- a/cmake/SettingsRegistry.cmake +++ b/cmake/SettingsRegistry.cmake @@ -118,6 +118,11 @@ endfunction() # The generated file contains the file to the each dependent targets # This can be used for example to determine which list of gems to load with an application function(ly_delayed_generate_settings_registry) + + if(LY_MONOLITHIC_GAME) # No need to generate setregs for monolithic builds + return() + endif() + get_property(ly_delayed_load_targets GLOBAL PROPERTY LY_DELAYED_LOAD_DEPENDENCIES) foreach(prefix_target ${ly_delayed_load_targets}) string(REPLACE "," ";" prefix_target_list "${prefix_target}")