Merge branch 'ly-as-sdk/LYN-2948-phistere' of https://github.com/aws-lumberyard-dev/o3de into ly-as-sdk/LYN-2948-phistere
This commit is contained in:
@@ -20,33 +20,46 @@ if(json_error)
|
||||
message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}")
|
||||
endif()
|
||||
|
||||
# Read the list of paths from ~.o3de/o3de_manifest.json
|
||||
file(TO_CMAKE_PATH "$ENV{USERPROFILE}" home_directory) # Windows
|
||||
if((NOT home_directory) OR (NOT EXISTS ${home_directory}))
|
||||
file(TO_CMAKE_PATH "$ENV{HOME}" home_directory)# Unix
|
||||
if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE})
|
||||
set(manifest_path $ENV{USERPROFILE}/.o3de/o3de_manifest.json) # Windows
|
||||
else()
|
||||
set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix
|
||||
endif()
|
||||
|
||||
if (NOT home_directory)
|
||||
message(FATAL_ERROR "Cannot find user home directory, the o3de manifest cannot be found")
|
||||
endif()
|
||||
# Set manifest path to path in the user home directory
|
||||
set(manifest_path ${home_directory}/.o3de/o3de_manifest.json)
|
||||
|
||||
# Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object.
|
||||
# Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path.
|
||||
if(EXISTS ${manifest_path})
|
||||
file(READ ${manifest_path} manifest_json)
|
||||
string(JSON engines_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines)
|
||||
|
||||
string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path)
|
||||
if(json_error)
|
||||
message(FATAL_ERROR "Unable to read key 'engines' from '${manifest_path}', error: ${json_error}")
|
||||
message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}")
|
||||
endif()
|
||||
|
||||
math(EXPR engines_count "${engines_count}-1")
|
||||
foreach(engine_path_index RANGE ${engines_count})
|
||||
string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines ${engine_path_index})
|
||||
if(${json_error})
|
||||
message(FATAL_ERROR "Unable to read engines[${engine_path_index}] '${manifest_path}', error: ${json_error}")
|
||||
string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path)
|
||||
if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT")
|
||||
message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}")
|
||||
endif()
|
||||
|
||||
math(EXPR engines_path_count "${engines_path_count}-1")
|
||||
foreach(engine_path_index RANGE ${engines_path_count})
|
||||
string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index})
|
||||
if(json_error)
|
||||
message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}")
|
||||
endif()
|
||||
if(engine_path)
|
||||
list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
|
||||
|
||||
if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name)
|
||||
string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name})
|
||||
if(json_error)
|
||||
message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}")
|
||||
endif()
|
||||
|
||||
if(engine_path)
|
||||
list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
else()
|
||||
message(FATAL_ERROR "Engine registration is required before configuring a project. Please register an engine by running 'scripts/o3de register --this-engine'")
|
||||
endif()
|
||||
|
||||
@@ -129,6 +129,8 @@ ly_add_target(
|
||||
3rdParty::AWSNativeSDK::Core
|
||||
3rdParty::Qt::Network
|
||||
Legacy::EditorCore
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AtomViewportDisplayInfo
|
||||
)
|
||||
ly_add_source_properties(
|
||||
SOURCES CryEdit.cpp
|
||||
@@ -243,7 +245,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
Legacy::CryCommon
|
||||
AZ::AzToolsFramework
|
||||
Legacy::EditorLib
|
||||
Gem::LmbrCentral
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Legacy::EditorLib.Tests
|
||||
|
||||
@@ -35,7 +35,9 @@ ly_add_target(
|
||||
AZ::AzToolsFramework
|
||||
Legacy::CryCommon
|
||||
Legacy::EditorLib
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Editor
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
|
||||
ly_add_dependencies(Editor ComponentEntityEditorPlugin)
|
||||
@@ -65,7 +67,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzToolsFrameworkTestCommon
|
||||
Legacy::CryCommon
|
||||
Legacy::EditorLib
|
||||
Gem::LmbrCentral
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Legacy::ComponentEntityEditorPlugin.Tests
|
||||
|
||||
@@ -29,6 +29,9 @@ ly_add_target(
|
||||
Gem::HttpRequestor
|
||||
3rdParty::AWSNativeSDK::AWSClientAuth
|
||||
3rdParty::AWSNativeSDK::Core
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AWSCore
|
||||
Gem::HttpRequestor
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -44,11 +47,13 @@ ly_add_target(
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Gem::AWSCore
|
||||
Gem::HttpRequestor
|
||||
3rdParty::AWSNativeSDK::AWSClientAuth
|
||||
3rdParty::AWSNativeSDK::Core
|
||||
PUBLIC
|
||||
Gem::AWSClientAuth.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AWSCore
|
||||
Gem::HttpRequestor
|
||||
)
|
||||
|
||||
################################################################################
|
||||
@@ -71,10 +76,11 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
3rdParty::AWSNativeSDK::AWSClientAuth
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Gem::AWSCore
|
||||
Gem::AWSClientAuth.Static
|
||||
AZ::AWSNativeSDKInit
|
||||
Gem::HttpRequestor
|
||||
RUNTIUME_DEPENDENCIES
|
||||
Gem::AWSCore
|
||||
AZ::AWSNativeSDKInit
|
||||
Gem::HttpRequestor
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::AWSClientAuth.Tests
|
||||
|
||||
@@ -23,6 +23,7 @@ ly_add_target(
|
||||
PRIVATE
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
PUBLIC
|
||||
Gem::AWSCore
|
||||
)
|
||||
|
||||
@@ -40,8 +41,9 @@ ly_add_target(
|
||||
PRIVATE
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Gem::AWSCore
|
||||
Gem::AWSMetrics.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AWSCore
|
||||
)
|
||||
|
||||
################################################################################
|
||||
@@ -63,8 +65,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzTest
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Gem::AWSCore
|
||||
Gem::AWSMetrics.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AWSCore
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::AWSMetrics.Tests
|
||||
|
||||
@@ -205,7 +205,8 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
PUBLIC
|
||||
AZ::AssetBuilderSDK
|
||||
Gem::AudioEngineWwise.Static
|
||||
Gem::AudioSystem.Editor
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::AudioSystem.Editor
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -101,7 +101,8 @@ if (PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzFramework
|
||||
Legacy::CryCommon
|
||||
Gem::AudioSystem.Static
|
||||
Gem::LmbrCentral
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::AudioSystem.Tests
|
||||
|
||||
@@ -23,7 +23,7 @@ ly_add_target(
|
||||
PUBLIC
|
||||
AZ::AzCore
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -36,7 +36,7 @@ ly_add_target(
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
PUBLIC
|
||||
AZ::AtomCore
|
||||
Gem::Atom_RPI.Public
|
||||
|
||||
@@ -23,7 +23,7 @@ ly_add_target(
|
||||
PUBLIC
|
||||
Legacy::CryCommon
|
||||
Gem::GradientSignal
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -44,4 +44,8 @@ ly_add_target(
|
||||
AZ::AzFramework
|
||||
Gem::LmbrCentral
|
||||
Gem::GameStateSamples.Headers
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::GameState
|
||||
Gem::LocalUser
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
|
||||
@@ -22,7 +22,7 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
Gem::SurfaceData
|
||||
Gem::ImageProcessingAtom.Headers
|
||||
)
|
||||
@@ -44,7 +44,6 @@ ly_add_target(
|
||||
Gem::ImageProcessingAtom.Headers # Atom/ImageProcessing/PixelFormats.h is part of a header in Includes
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
Gem::SurfaceData
|
||||
)
|
||||
|
||||
if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
@@ -67,10 +66,11 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
3rdParty::Qt::Widgets
|
||||
Legacy::CryCommon
|
||||
AZ::AzToolsFramework
|
||||
Gem::LmbrCentral
|
||||
Gem::SurfaceData
|
||||
AZ::AssetBuilderSDK
|
||||
Gem::GradientSignal.Static
|
||||
Gem::SurfaceData
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -89,7 +89,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Gem::GradientSignal.Editor.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
Gem::SurfaceData.Editor
|
||||
)
|
||||
|
||||
endif()
|
||||
|
||||
@@ -51,7 +51,6 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
|
||||
ly_add_target(
|
||||
NAME GraphCanvas.Editor GEM_MODULE
|
||||
|
||||
NAMESPACE Gem
|
||||
AUTOMOC
|
||||
AUTORCC
|
||||
|
||||
@@ -53,6 +53,8 @@ ly_add_target(
|
||||
PUBLIC
|
||||
Gem::ImGui.imguilib
|
||||
Legacy::CryCommon
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ImGui.imguilib
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -70,7 +72,7 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Gem::ImGui.ImGuiLYUtils
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -35,16 +35,21 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Legacy::CryCommon
|
||||
Legacy::Editor.Headers
|
||||
Legacy::EditorCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::GraphCanvasWidgets
|
||||
Gem::GraphModel.Editor.Static
|
||||
Gem::GradientSignal.Editor
|
||||
Gem::SurfaceData.Editor
|
||||
Gem::Vegetation.Editor
|
||||
Gem::LmbrCentral.Editor
|
||||
PUBLIC
|
||||
Gem::GraphCanvasWidgets
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::GradientSignal.Editor
|
||||
Gem::SurfaceData.Editor
|
||||
Gem::Vegetation.Editor
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
ly_add_target(
|
||||
NAME LandscapeCanvas.Editor GEM_MODULE
|
||||
|
||||
NAMESPACE Gem
|
||||
FILES_CMAKE
|
||||
landscapecanvas_editor_files.cmake
|
||||
@@ -61,7 +66,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
AZ::AzCore
|
||||
AZ::AzToolsFramework
|
||||
Legacy::Editor.Headers
|
||||
Gem::GraphCanvasWidgets
|
||||
Gem::GraphModel.Editor.Static
|
||||
Gem::LandscapeCanvas.Editor.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
@@ -97,9 +101,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzTest
|
||||
AZ::AzFramework
|
||||
AZ::AzToolsFramework
|
||||
Gem::GraphCanvasWidgets
|
||||
Gem::GraphModel.Editor.Static
|
||||
Gem::LandscapeCanvas.Editor.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::GraphCanvasWidgets
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::LandscapeCanvas.Editor.Tests
|
||||
|
||||
@@ -26,13 +26,13 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
PUBLIC
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Utils.Static
|
||||
Gem::Atom_Bootstrap.Headers
|
||||
Gem::AtomFont
|
||||
Gem::LmbrCentral.Static
|
||||
Gem::TextureAtlas
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -49,8 +49,6 @@ ly_add_target(
|
||||
PRIVATE
|
||||
Gem::LyShine.Static
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
@@ -85,7 +83,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Legacy::EditorCore
|
||||
Gem::LyShine.Static
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Editor.Static
|
||||
Gem::TextureAtlas
|
||||
Gem::AtomToolsFramework.Static
|
||||
Gem::AtomToolsFramework.Editor
|
||||
@@ -94,6 +92,8 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Utils.Static
|
||||
Gem::Atom_Bootstrap.Headers
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::TextureAtlas
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -117,7 +117,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Legacy::CryCommon
|
||||
AZ::AssetBuilderSDK
|
||||
Gem::LyShine.Editor.Static
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Editor
|
||||
Gem::TextureAtlas
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
@@ -145,8 +145,9 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzTest
|
||||
Gem::LyShine.Static
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::LyShine.Tests
|
||||
@@ -175,9 +176,10 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
AZ::AzTest
|
||||
Legacy::CryCommon
|
||||
AZ::AssetBuilderSDK
|
||||
Gem::LmbrCentral
|
||||
Gem::TextureAtlas
|
||||
Gem::LyShine.Editor.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
Gem::TextureAtlas
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::LyShine.Editor.Tests
|
||||
|
||||
@@ -22,7 +22,7 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
Gem::LyShine.Static
|
||||
)
|
||||
|
||||
@@ -39,4 +39,6 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Gem::LyShineExamples.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
|
||||
@@ -22,7 +22,6 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -39,7 +38,6 @@ ly_add_target(
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::Maestro.Static
|
||||
Gem::LmbrCentral
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral
|
||||
)
|
||||
@@ -69,7 +67,6 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
AZ::AzToolsFramework
|
||||
AZ::AssetBuilderSDK
|
||||
Gem::Maestro.Static
|
||||
Gem::LmbrCentral
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::LmbrCentral.Editor
|
||||
)
|
||||
|
||||
@@ -46,7 +46,7 @@ ly_add_target(
|
||||
AZ::AzCore
|
||||
AZ::AzFramework
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -107,7 +107,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
AZ::SceneCore
|
||||
AZ::SceneData
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Editor.Static
|
||||
Gem::PhysX.NumericalMethods
|
||||
Gem::PhysX.Static
|
||||
Gem::AtomLyIntegration_CommonFeatures.Static
|
||||
|
||||
@@ -66,9 +66,9 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Legacy::CryCommon
|
||||
Legacy::Editor.Headers
|
||||
AZ::AzToolsFramework
|
||||
Gem::PhysX
|
||||
Gem::PhysX.Editor
|
||||
Gem::ImGui.imguilib
|
||||
Gem::ImGui
|
||||
Gem::ImGui.Editor
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::PhysX.Editor
|
||||
Gem::ImGui.Editor
|
||||
|
||||
@@ -84,7 +84,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
BUILD_DEPENDENCIES
|
||||
PRIVATE
|
||||
AZ::AzTest
|
||||
Gem::SceneProcessing
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::SceneProcessing
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::SceneProcessing.Tests
|
||||
|
||||
@@ -81,6 +81,8 @@ ly_add_target(
|
||||
*.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Source.jinja,$path/$fileprefix.generated.cpp
|
||||
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h
|
||||
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvasDebugger
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -170,6 +172,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Gem::ExpressionEvaluation.Static
|
||||
PRIVATE
|
||||
Legacy::EditorCore
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvas
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
@@ -228,7 +232,8 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED)
|
||||
PRIVATE
|
||||
AZ::AzTest
|
||||
AZ::AzFramework
|
||||
Gem::ScriptCanvas
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvas
|
||||
)
|
||||
ly_add_googletest(
|
||||
NAME Gem::ScriptCanvas.Tests
|
||||
|
||||
@@ -81,5 +81,6 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS)
|
||||
Gem::GraphCanvasWidgets
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvas.Editor
|
||||
Gem::GraphCanvasWidgets
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -36,6 +36,8 @@ ly_add_target(
|
||||
PRIVATE
|
||||
Legacy::CryCommon
|
||||
Gem::ScriptCanvasPhysics.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvas
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -45,6 +45,11 @@ ly_add_target(
|
||||
*.ScriptCanvasGrammar.xml,ScriptCanvasGrammar_Source.jinja,$path/$fileprefix.generated.cpp
|
||||
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Header.jinja,$path/$fileprefix.generated.h
|
||||
*.ScriptCanvasNodeable.xml,ScriptCanvasNodeable_Source.jinja,$path/$fileprefix.generated.cpp
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::ScriptCanvas
|
||||
Gem::ScriptCanvasEditor
|
||||
Gem::GraphCanvasWidgets
|
||||
Gem::ScriptEvents
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -23,7 +23,7 @@ ly_add_target(
|
||||
PRIVATE
|
||||
AZ::AzCore
|
||||
Gem::CameraFramework.Static
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
Legacy::CryCommon
|
||||
)
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ ly_add_target(
|
||||
PUBLIC
|
||||
Gem::Atom_RPI.Public
|
||||
Gem::Atom_Feature_Common.Static
|
||||
Gem::LmbrCentral
|
||||
Gem::LmbrCentral.Static
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -29,6 +29,8 @@ ly_add_target(
|
||||
AZ::AzCore
|
||||
Gem::HttpRequestor
|
||||
3rdParty::AWSNativeSDK::Core
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::HttpRequestor
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
@@ -26,10 +26,11 @@ ly_add_target(
|
||||
BUILD_DEPENDENCIES
|
||||
PUBLIC
|
||||
Legacy::CryCommon
|
||||
Gem::LmbrCentral
|
||||
Gem::GradientSignal
|
||||
Gem::LmbrCentral.Static
|
||||
Gem::SurfaceData.Static
|
||||
Gem::AtomLyIntegration_CommonFeatures.Static
|
||||
RUNTIME_DEPENDENCIES
|
||||
Gem::GradientSignal
|
||||
)
|
||||
|
||||
ly_add_target(
|
||||
|
||||
+15
-17
@@ -100,22 +100,27 @@ function(ly_add_target)
|
||||
ly_include_cmake_file_list(${file_cmake})
|
||||
endforeach()
|
||||
|
||||
set(linking_options)
|
||||
set(linking_count)
|
||||
unset(linking_options)
|
||||
unset(linking_count)
|
||||
unset(target_type_options)
|
||||
if(ly_add_target_STATIC)
|
||||
set(linking_options STATIC)
|
||||
set(target_type_options STATIC)
|
||||
set(linking_count "${linking_count}1")
|
||||
endif()
|
||||
if(ly_add_target_SHARED)
|
||||
set(linking_options SHARED)
|
||||
set(target_type_options SHARED)
|
||||
set(linking_count "${linking_count}1")
|
||||
endif()
|
||||
if(ly_add_target_MODULE)
|
||||
set(linking_options ${PAL_LINKOPTION_MODULE})
|
||||
set(target_type_options ${PAL_LINKOPTION_MODULE})
|
||||
set(linking_count "${linking_count}1")
|
||||
endif()
|
||||
if(ly_add_target_HEADERONLY)
|
||||
set(linking_options INTERFACE)
|
||||
set(target_type_options INTERFACE)
|
||||
set(linking_count "${linking_count}1")
|
||||
endif()
|
||||
if(ly_add_target_EXECUTABLE)
|
||||
@@ -130,7 +135,7 @@ function(ly_add_target)
|
||||
message(FATAL_ERROR "More than one of the following options [STATIC | SHARED | MODULE | HEADERONLY | EXECUTABLE | APPLICATION ] was specified and they are mutually exclusive")
|
||||
endif()
|
||||
if(ly_add_target_IMPORTED)
|
||||
list(APPEND linking_options IMPORTED GLOBAL)
|
||||
list(APPEND target_type_options IMPORTED GLOBAL)
|
||||
endif()
|
||||
|
||||
if(ly_add_target_NAMESPACE)
|
||||
@@ -141,7 +146,8 @@ function(ly_add_target)
|
||||
|
||||
set(project_NAME ${ly_add_target_NAME})
|
||||
if(ly_add_target_EXECUTABLE)
|
||||
add_executable(${ly_add_target_NAME}
|
||||
add_executable(${ly_add_target_NAME}
|
||||
${target_type_options}
|
||||
${ALLFILES} ${ly_add_target_GENERATED_FILES}
|
||||
)
|
||||
ly_apply_platform_properties(${ly_add_target_NAME})
|
||||
@@ -149,7 +155,8 @@ function(ly_add_target)
|
||||
set_target_properties(${ly_add_target_NAME} PROPERTIES LINKER_LANGUAGE CXX)
|
||||
endif()
|
||||
elseif(ly_add_target_APPLICATION)
|
||||
add_executable(${ly_add_target_NAME}
|
||||
add_executable(${ly_add_target_NAME}
|
||||
${target_type_options}
|
||||
${PAL_EXECUTABLE_APPLICATION_FLAG}
|
||||
${ALLFILES} ${ly_add_target_GENERATED_FILES}
|
||||
)
|
||||
@@ -159,12 +166,12 @@ function(ly_add_target)
|
||||
endif()
|
||||
elseif(ly_add_target_HEADERONLY)
|
||||
add_library(${ly_add_target_NAME}
|
||||
${linking_options}
|
||||
${target_type_options}
|
||||
${ALLFILES} ${ly_add_target_GENERATED_FILES}
|
||||
)
|
||||
else()
|
||||
add_library(${ly_add_target_NAME}
|
||||
${linking_options}
|
||||
${target_type_options}
|
||||
${ALLFILES} ${ly_add_target_GENERATED_FILES}
|
||||
)
|
||||
ly_apply_platform_properties(${ly_add_target_NAME})
|
||||
@@ -302,7 +309,7 @@ function(ly_add_target)
|
||||
set_property(GLOBAL APPEND PROPERTY LY_ALL_TARGETS ${interface_name})
|
||||
|
||||
set(runtime_dependencies_list SHARED MODULE EXECUTABLE APPLICATION)
|
||||
if(linking_options IN_LIST runtime_dependencies_list)
|
||||
if(NOT ly_add_target_IMPORTED AND linking_options IN_LIST runtime_dependencies_list)
|
||||
|
||||
add_custom_command(TARGET ${ly_add_target_NAME} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/runtime_dependencies/$<CONFIG>/${ly_add_target_NAME}.cmake
|
||||
@@ -372,16 +379,9 @@ function(ly_delayed_target_link_libraries)
|
||||
list(APPEND CMAKE_MODULE_PATH ${additional_module_paths})
|
||||
|
||||
get_property(delayed_targets GLOBAL PROPERTY LY_DELAYED_LINK_TARGETS)
|
||||
|
||||
foreach(target ${delayed_targets})
|
||||
|
||||
get_property(delayed_link GLOBAL PROPERTY LY_DELAYED_LINK_${target})
|
||||
|
||||
# Cache off the original MANUALLY_ADDED_DEPENDENCIES that were associated with the target
|
||||
# via previous ly_add_dependencies() calls either explicitly or through RUNTIME_DEPENDENCIES
|
||||
get_target_property(target_orig_manually_added_dependencies ${target} MANUALLY_ADDED_DEPENDENCIES)
|
||||
set_property(TARGET ${target} PROPERTY LY_ORIGINAL_MANUALLY_ADDED_DEPENDENCIES ${target_orig_manually_added_dependencies})
|
||||
|
||||
if(delayed_link)
|
||||
|
||||
cmake_parse_arguments(ly_delayed_target_link_libraries "" "" "${visibilities}" ${delayed_link})
|
||||
@@ -400,8 +400,6 @@ function(ly_delayed_target_link_libraries)
|
||||
target_link_libraries(${target} ${visibility} $<TARGET_PROPERTY:${item},INTERFACE_LINK_LIBRARIES>)
|
||||
target_compile_definitions(${target} ${visibility} $<TARGET_PROPERTY:${item},INTERFACE_COMPILE_DEFINITIONS>)
|
||||
target_compile_options(${target} ${visibility} $<TARGET_PROPERTY:${item},INTERFACE_COMPILE_OPTIONS>)
|
||||
# Add it also as a manual dependency so runtime_dependencies walks it through
|
||||
ly_add_dependencies(${target} ${item})
|
||||
else()
|
||||
ly_parse_third_party_dependencies(${item})
|
||||
target_link_libraries(${target} ${visibility} ${item})
|
||||
|
||||
@@ -125,7 +125,7 @@ function(ly_setup_target ALIAS_TARGET_NAME)
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
get_target_property(RUNTIME_DEPENDENCIES_PLACEHOLDER ${TARGET_NAME} LY_ORIGINAL_MANUALLY_ADDED_DEPENDENCIES)
|
||||
get_target_property(RUNTIME_DEPENDENCIES_PLACEHOLDER ${TARGET_NAME} MANUALLY_ADDED_DEPENDENCIES)
|
||||
if(RUNTIME_DEPENDENCIES_PLACEHOLDER) # not found properties return the name of the variable with a "-NOTFOUND" at the end, here we set it to empty if not found
|
||||
string(REPLACE ";" "\n" RUNTIME_DEPENDENCIES_PLACEHOLDER "${RUNTIME_DEPENDENCIES_PLACEHOLDER}")
|
||||
else()
|
||||
|
||||
@@ -170,7 +170,12 @@ function(ly_delayed_generate_settings_registry)
|
||||
|
||||
list(JOIN target_gem_dependencies_names ",\n" target_gem_dependencies_names)
|
||||
string(CONFIGURE ${gems_json_template} gem_json @ONLY)
|
||||
set(dependencies_setreg $<TARGET_FILE_DIR:${target}>/Registry/cmake_dependencies.${specialization_name}.setreg)
|
||||
if(prefix)
|
||||
set(target_dir $<TARGET_FILE_DIR:${prefix}>)
|
||||
else()
|
||||
set(target_dir $<TARGET_FILE_DIR:${target}>)
|
||||
endif()
|
||||
set(dependencies_setreg ${target_dir}/Registry/cmake_dependencies.${specialization_name}.setreg)
|
||||
file(GENERATE OUTPUT ${dependencies_setreg} CONTENT ${gem_json})
|
||||
set_property(TARGET ${target} APPEND PROPERTY INTERFACE_LY_TARGET_FILES "${dependencies_setreg}\nRegistry")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user