You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
CMake
41 lines
1.4 KiB
CMake
#
|
|
# Copyright (c) Contributors to the Open 3D Engine Project.
|
|
# For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0 OR MIT
|
|
#
|
|
#
|
|
|
|
# Generated by O3DE
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
|
|
# This will be called from within the installed engine's CMakeLists.txt
|
|
macro(ly_find_o3de_packages)
|
|
if(LY_MONOLITHIC_GAME)
|
|
set(monolithic_file "${LY_ROOT_FOLDER}/Platform/${PAL_PLATFORM_NAME}/Monolithic/o3de_subdirectories_${PAL_PLATFORM_NAME_LOWERCASE}.cmake")
|
|
if(NOT EXISTS ${monolithic_file})
|
|
message(FATAL_ERROR "O3DE SDK was not generated to support monolithic builds")
|
|
endif()
|
|
include("${monolithic_file}")
|
|
else()
|
|
include("cmake/Platform/${PAL_PLATFORM_NAME}/Default/o3de_subdirectories_${PAL_PLATFORM_NAME_LOWERCASE}.cmake")
|
|
endif()
|
|
find_package(LauncherGenerator)
|
|
endmacro()
|
|
|
|
|
|
function(o3de_current_file_path path)
|
|
set(${path} ${CMAKE_CURRENT_FUNCTION_LIST_DIR} PARENT_SCOPE)
|
|
endfunction()
|
|
|
|
|
|
# We are using the engine's CMakeLists.txt to handle initialization/importing targets
|
|
# Since this is external to the project's source, we need to specify an output directory
|
|
# even though we don't build
|
|
macro(o3de_initialize)
|
|
set(INSTALLED_ENGINE TRUE)
|
|
set(LY_PROJECTS ${CMAKE_SOURCE_DIR})
|
|
o3de_current_file_path(current_path)
|
|
add_subdirectory(${current_path}/.. o3de)
|
|
endmacro() |