From 02dd2138cb36a69689863346eb764030dc55ee62 Mon Sep 17 00:00:00 2001 From: Esteban Papp Date: Mon, 14 Jun 2021 13:46:51 -0700 Subject: [PATCH] improving the check so it doesnt have to be "FALSE" (and can be 0/Off/etc) --- cmake/Platform/Mac/runtime_dependencies_mac.cmake.in | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 58bac188fd..e67702e902 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -24,7 +24,7 @@ function(ly_copy source_file target_directory) # If source_file is a Framework and target_directory is a bundle if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]" AND "${target_directory}" MATCHES "\\.app/Contents/MacOS") - if("@LY_BUILD_FIXUP_BUNDLE@" STREQUAL FALSE) + if(NOT @LY_BUILD_FIXUP_BUNDLE@) return() endif() @@ -38,7 +38,7 @@ function(ly_copy source_file target_directory) elseif("${source_file}" MATCHES "qt/plugins" AND "${target_directory}" MATCHES "\\.app/Contents/MacOS") - if("@LY_BUILD_FIXUP_BUNDLE@" STREQUAL FALSE) + if(NOT @LY_BUILD_FIXUP_BUNDLE@) return() endif() @@ -68,8 +68,10 @@ function(ly_copy source_file target_directory) if(NOT EXISTS "${target_directory}") file(MAKE_DIRECTORY "${target_directory}") endif() - if(NOT EXISTS "${target_directory}/${target_filename}" OR "${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") - file(LOCK "${CMAKE_BINARY_DIR}/runtimedependencies.lock" GUARD FUNCTION TIMEOUT 30) + if(IS_DIRECTORY ${source_file}) + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + elseif(NOT EXISTS "${target_directory}/${target_filename}" OR "${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 ${target_directory}/${target_filename}) @@ -80,7 +82,7 @@ endfunction() @LY_COPY_COMMANDS@ -if("@LY_BUILD_FIXUP_BUNDLE@" STREQUAL FALSE) +if(NOT @LY_BUILD_FIXUP_BUNDLE@) return() endif()