Merge branch 'development' into cmake/SPEC-2513_w4018
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> # Conflicts: # Gems/EMotionFX/Code/EMotionFX/Source/Actor.cpp
This commit is contained in:
@@ -448,11 +448,15 @@ endfunction()
|
||||
function(ly_setup_runtime_dependencies)
|
||||
|
||||
# Common functions used by the bellow code
|
||||
install(CODE
|
||||
if(COMMAND ly_install_code_function_override)
|
||||
ly_install_code_function_override()
|
||||
else()
|
||||
install(CODE
|
||||
"function(ly_copy source_file target_directory)
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
|
||||
endfunction()"
|
||||
)
|
||||
)
|
||||
endif()
|
||||
|
||||
unset(runtime_commands)
|
||||
get_property(all_targets GLOBAL PROPERTY LY_ALL_TARGETS)
|
||||
|
||||
@@ -6,6 +6,34 @@
|
||||
#
|
||||
#
|
||||
|
||||
# This is used to generate a setreg file which will be placed inside the bundle
|
||||
# for targets that request it(eg. AssetProcessor/Editor). This is the relative path
|
||||
# to the bundle from the installed engine's root. This will be used to compute the
|
||||
# absolute path to bundle which may contain dependent dylibs(eg. Gems) used by a project.
|
||||
set(installed_binaries_path_template [[
|
||||
{
|
||||
"Amazon": {
|
||||
"AzCore": {
|
||||
"Runtime": {
|
||||
"FilePaths": {
|
||||
"InstalledBinariesFolder": "bin/Mac/$<CONFIG>"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}]]
|
||||
)
|
||||
|
||||
unset(target_conf_dir)
|
||||
foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES)
|
||||
string(TOUPPER ${conf} UCONF)
|
||||
string(APPEND target_conf_dir $<$<CONFIG:${conf}>:${CMAKE_RUNTIME_OUTPUT_DIRECTORY_${UCONF}}>)
|
||||
endforeach()
|
||||
|
||||
set(installed_binaries_setreg_path ${target_conf_dir}/Registry/installed_binaries_path.setreg)
|
||||
|
||||
file(GENERATE OUTPUT ${installed_binaries_setreg_path} CONTENT ${installed_binaries_path_template})
|
||||
|
||||
#! ly_install_target_override: Mac specific target installation
|
||||
function(ly_install_target_override)
|
||||
|
||||
@@ -49,4 +77,26 @@ function(ly_install_target_override)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
#! ly_install_add_install_path_setreg: Adds the install path setreg file as a dependency
|
||||
function(ly_install_add_install_path_setreg NAME)
|
||||
set_property(TARGET ${NAME} APPEND PROPERTY INTERFACE_LY_TARGET_FILES "${installed_binaries_setreg_path}\nRegistry")
|
||||
endfunction()
|
||||
|
||||
#! ly_install_code_function_override: Mac specific copy function to handle frameworks
|
||||
function(ly_install_code_function_override)
|
||||
|
||||
install(CODE
|
||||
"function(ly_copy source_file target_directory)
|
||||
if(\"\${source_file}\" MATCHES \"\\\\.[Ff]ramework[^\\\\.]\")
|
||||
|
||||
# fixup origin to copy the whole Framework folder
|
||||
string(REGEX REPLACE \"(.*\\\\.[Ff]ramework).*\" \"\\\\1\" source_file \"\${source_file}\")
|
||||
get_filename_component(target_filename \"\${source_file}\" NAME)
|
||||
|
||||
endif()
|
||||
file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS})
|
||||
endfunction()")
|
||||
|
||||
endfunction()
|
||||
|
||||
include(cmake/Platform/Common/Install_common.cmake)
|
||||
|
||||
@@ -11,6 +11,7 @@ function(ly_apply_platform_properties target)
|
||||
|
||||
set_target_properties(${target} PROPERTIES
|
||||
BUILD_RPATH "@executable_path/;@executable_path/../Frameworks"
|
||||
INSTALL_RPATH "@executable_path/;@executable_path/../Frameworks"
|
||||
)
|
||||
|
||||
endfunction()
|
||||
|
||||
Reference in New Issue
Block a user