Issues/2045 3rdParty runtime dependencies copied multiple times (#2058)
* 3rdParty runtime dependencies copied multiple times Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * 3rdParty to update timestamps when uncompressing to provoke copy of runtime dependencies Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> * typo fix Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -529,6 +529,12 @@ function(ly_force_download_package package_name)
|
||||
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xf ${temp_download_target}
|
||||
WORKING_DIRECTORY ${final_folder} COMMAND_ECHO STDOUT OUTPUT_VARIABLE unpack_result)
|
||||
|
||||
# For the runtime dependencies cases, we need the timestamps of the files coming from 3rdParty to be newer than the ones
|
||||
# from the output so the new versions get copied over. The untar from the previous step preserves timestamps so they
|
||||
# can produce binaries with older timestamps to the ones that are in the build output.
|
||||
file(GLOB_RECURSE package_files LIST_DIRECTORIES false ${final_folder}/*)
|
||||
file(TOUCH_NOCREATE ${package_files})
|
||||
|
||||
if (NOT ${unpack_result} EQUAL 0)
|
||||
message(SEND_ERROR "ly_package: required package {package_name} could not be unpacked. Compile may fail! Enable LY_PACKAGE_DEBUG to debug.")
|
||||
return()
|
||||
|
||||
@@ -15,6 +15,7 @@ function(ly_copy source_file target_directory)
|
||||
if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}")
|
||||
message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...")
|
||||
file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN)
|
||||
file(TOUCH_NOCREATE ${target_directory}/${target_filename})
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -125,7 +125,7 @@ function(ly_copy source_file target_directory)
|
||||
file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300)
|
||||
endif()
|
||||
file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN)
|
||||
file(TOUCH ${target_directory}/${target_filename})
|
||||
file(TOUCH_NOCREATE ${target_directory}/${target_filename})
|
||||
set(anything_new TRUE PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user