Added detection of gems which are not directly under an external subdirectory root (#1841)
* Added proper detection of the list of Gems in the Project Templates enabled_gems.cmake file Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Added a CMake alias target for the Atom Gem and the AtomLyIntegration Both of those targets just aliases the Atom_AtomBridge gem Therefore they turn on Atom Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Replacing the Atom_AtomBridge gem in the project template with the Atom gem The Atom gem is just an alias to the Atom_AtomBridge gem Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> * Updated the manifest.py gem gathering logic to recurse through the external subdirecotories locating gem.json files to discover all gems in a subdirectory Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d4e4ebc2a7
commit
d73a98aa2f
+17
-13
@@ -31,25 +31,29 @@ function(ly_create_alias)
|
||||
"Make sure the target wasn't copy and pasted here or elsewhere.")
|
||||
endif()
|
||||
|
||||
# easy version - if its juts one target, we can directly get the target, and make both aliases,
|
||||
# easy version - if its just one target and it exist at the time of this call,
|
||||
# we can directly get the target, and make both aliases,
|
||||
# the namespaced and non namespaced one, point at it.
|
||||
list(LENGTH ly_create_alias_TARGETS number_of_targets)
|
||||
if (number_of_targets EQUAL 1)
|
||||
ly_de_alias_target(${ly_create_alias_TARGETS} de_aliased_target_name)
|
||||
add_library(${ly_create_alias_NAMESPACE}::${ly_create_alias_NAME} ALIAS ${de_aliased_target_name})
|
||||
if (NOT TARGET ${ly_create_alias_NAME})
|
||||
add_library(${ly_create_alias_NAME} ALIAS ${de_aliased_target_name})
|
||||
if(TARGET ${ly_create_alias_TARGETS})
|
||||
ly_de_alias_target(${ly_create_alias_TARGETS} de_aliased_target_name)
|
||||
add_library(${ly_create_alias_NAMESPACE}::${ly_create_alias_NAME} ALIAS ${de_aliased_target_name})
|
||||
if (NOT TARGET ${ly_create_alias_NAME})
|
||||
add_library(${ly_create_alias_NAME} ALIAS ${de_aliased_target_name})
|
||||
endif()
|
||||
# Store off the arguments needed used ly_create_alias into a DIRECTORY property
|
||||
# This will be used to re-create the calls in the generated CMakeLists.txt in the INSTALL step
|
||||
string(REPLACE ";" " " create_alias_args "${ly_create_alias_NAME},${ly_create_alias_NAMESPACE},${ly_create_alias_TARGETS}")
|
||||
set_property(DIRECTORY APPEND PROPERTY LY_CREATE_ALIAS_ARGUMENTS "${ly_create_alias_NAME},${ly_create_alias_NAMESPACE},${ly_create_alias_TARGETS}")
|
||||
return()
|
||||
endif()
|
||||
# Store off the arguments needed used ly_create_alias into a DIRECTORY property
|
||||
# This will be used to re-create the calls in the generated CMakeLists.txt in the INSTALL step
|
||||
string(REPLACE ";" " " create_alias_args "${ly_create_alias_NAME},${ly_create_alias_NAMESPACE},${ly_create_alias_TARGETS}")
|
||||
set_property(DIRECTORY APPEND PROPERTY LY_CREATE_ALIAS_ARGUMENTS "${ly_create_alias_NAME},${ly_create_alias_NAMESPACE},${ly_create_alias_TARGETS}")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# more complex version - one alias to multiple targets. To actually achieve this
|
||||
# we have to create an interface library with those dependencies, then we have to create an alias to that target.
|
||||
# by convention we create one without a namespace then alias the namespaced one.
|
||||
# more complex version - one alias to multiple targets or the alias is being made to a TARGET that doesn't exist yet.
|
||||
# To actually achieve this we have to create an interface library with those dependencies,
|
||||
# then we have to create an alias to that target.
|
||||
# By convention we create one without a namespace then alias the namespaced one.
|
||||
|
||||
if(TARGET ${ly_create_alias_NAME})
|
||||
message(FATAL_ERROR "Internal alias target already exists, cannot create an alias for it: ${ly_create_alias_NAME}\n"
|
||||
|
||||
Reference in New Issue
Block a user