Adds support for creating an SDK layout from a Monolithic build (#4097)

Adds support for creating an SDK layout from a Monolithic build and have the same install prefix used between monolithic and non-monolithic

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
Esteban Papp
2021-09-14 15:11:11 -07:00
committed by GitHub
parent 4e8d4c0c51
commit 2c066a81da
4 changed files with 82 additions and 37 deletions
+10 -1
View File
@@ -15,7 +15,16 @@ include_guard(GLOBAL)
set(CMAKE_CONFIGURATION_TYPES "" CACHE STRING "" FORCE)
# For the SDK case, we want to only define the confiuguration types that have been added to the SDK
file(GLOB configuration_type_files "cmake/ConfigurationTypes_*.cmake")
# We need to redeclare LY_BUILD_PERMUTATION because Configurations is one of the first things included by the
# root CMakeLists.txt. Even LY_MONOLITHIC_GAME is declared after, but since is a passed cache variable, and
# default is the same as undeclared, we can use it at this point.
if(LY_MONOLITHIC_GAME)
set(LY_BUILD_PERMUTATION Monolithic)
else()
set(LY_BUILD_PERMUTATION Default)
endif()
file(GLOB configuration_type_files "cmake/Platform/${PAL_PLATFORM_NAME}/${LY_BUILD_PERMUTATION}/ConfigurationTypes_*.cmake")
foreach(configuration_type_file ${configuration_type_files})
include(${configuration_type_file})
endforeach()