diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index b5dc7a30ef..fb3a7b1b09 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -159,15 +159,15 @@ function(ly_generate_target_config_file NAME) elseif(target_type STREQUAL MODULE_LIBRARY) string(APPEND target_location "\"\${LY_ROOT_FOLDER}/${library_output_directory}/${PAL_PLATFORM_NAME}/$/${target_library_output_subdirectory}/$\"") elseif(target_type STREQUAL SHARED_LIBRARY) - string(APPEND target_location "\"\${LY_ROOT_FOLDER}/${archive_output_directory}/${PAL_PLATFORM_NAME}/$/$\"") + string(APPEND target_location "\"\${LY_ROOT_FOLDER}/${archive_output_directory}/${PAL_PLATFORM_NAME}/$/$\"") string(APPEND target_file_contents "ly_add_dependencies(${NAME} \"\${LY_ROOT_FOLDER}/${library_output_directory}/${PAL_PLATFORM_NAME}/$/${target_library_output_subdirectory}/$\")\n") else() # STATIC_LIBRARY, OBJECT_LIBRARY, INTERFACE_LIBRARY string(APPEND target_location "\"\${LY_ROOT_FOLDER}/${archive_output_directory}/${PAL_PLATFORM_NAME}/$/$\"") endif() - string(APPEND target_file_contents + string(APPEND target_file_contents "set(target_location ${target_location}) -set_target_properties(${NAME} +set_target_properties(${NAME} PROPERTIES $<$:IMPORTED_LOCATION \"\${target_location}\"> IMPORTED_LOCATION_$> \"\${target_location}\" @@ -327,11 +327,18 @@ function(ly_setup_others) COMPONENT ${LY_DEFAULT_INSTALL_COMPONENT} ) - # Gem Source Assets + # Gem Source Assets and Registry # Find all gem directories relative to the CMake Source Dir - file(GLOB_RECURSE gems_assets_path RELATIVE ${CMAKE_SOURCE_DIR} "Gems/*/Assets") - foreach (gem_assets_path ${gems_assets_path}) + file( + GLOB_RECURSE + gems_assets_path + LIST_DIRECTORIES TRUE + RELATIVE "${CMAKE_SOURCE_DIR}/" + "Gems/*" + ) + list(FILTER gems_assets_path INCLUDE REGEX "/(Assets|Registry)$") + foreach (gem_assets_path ${gems_assets_path}) set(gem_abs_assets_path ${CMAKE_SOURCE_DIR}/${gem_assets_path}/) if (EXISTS ${gem_abs_assets_path}) # The trailing slash is IMPORTANT here as that is needed to prevent