Files
o3de/cmake/Monolithic.cmake
T
lumberyard-employee-dm 9a0b93c9ff Fixed generation of Monolithic builds StaticModules.inl (#947)
* Fixed generation of Monolithic builds StaticModules.inl
A project's gem module RUNTIME_DEPENDENCIES were not visited to
determine any dependent gem modules that needed to load.
Therefore the CreateStaticModules function were missing
CreateModuleClass_* function calls required initialize the gem's AZ::Module
derived class in monolithic builds

* Removed the logic to strip the Gem:: and Project:: prefix from the Server Launcher gem dependencies

When associating gem dependencies with the server target there was CMake logic left over in it to strip the beginning of the target name if it began with "Gem::" or "Project::"
2021-05-26 12:18:26 -05:00

26 lines
1.2 KiB
CMake

#
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or the license accompanying this file. Do not
# remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
set(LY_MONOLITHIC_GAME FALSE CACHE BOOL "Indicates if the game will be built monolithically (other targets are not supported)")
if(LY_MONOLITHIC_GAME)
add_compile_definitions(AZ_MONOLITHIC_BUILD)
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE STATIC)
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE GEM_STATIC)
# Disable targets that are not supported with monolithic
ly_set(PAL_TRAIT_BUILD_HOST_TOOLS FALSE)
ly_set(PAL_TRAIT_BUILD_HOST_GUI_TOOLS FALSE)
ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED FALSE)
ly_set(PAL_TRAIT_BUILD_SERVER_SUPPORTED FALSE)
else()
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_LIBRARY_TYPE SHARED)
ly_set(PAL_TRAIT_MONOLITHIC_DRIVEN_MODULE_TYPE GEM_MODULE)
endif()