From daacd25fc9a8a225176475a9074f7a8d9c2ef05b Mon Sep 17 00:00:00 2001 From: pappeste Date: Tue, 15 Jun 2021 19:24:13 -0700 Subject: [PATCH] change STREQUAL to cmake_path(COMPARE --- cmake/Platform/Common/runtime_dependencies_common.cmake.in | 5 ++++- cmake/Platform/Mac/runtime_dependencies_mac.cmake.in | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cmake/Platform/Common/runtime_dependencies_common.cmake.in b/cmake/Platform/Common/runtime_dependencies_common.cmake.in index b476b7d401..032a6726bd 100644 --- a/cmake/Platform/Common/runtime_dependencies_common.cmake.in +++ b/cmake/Platform/Common/runtime_dependencies_common.cmake.in @@ -9,9 +9,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of "if(NOT ${same_location})" + function(ly_copy source_file target_directory) get_filename_component(target_filename "${source_file}" NAME) - if(NOT "${source_file}" STREQUAL "${target_directory}/${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + if(NOT ${same_location}) if(NOT EXISTS "${target_directory}") file(MAKE_DIRECTORY "${target_directory}") endif() diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index f7e267eb2f..0a5ab59823 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -65,7 +65,8 @@ function(ly_copy source_file target_directory) endif() - if(NOT "${source_file}" STREQUAL "${target_directory}/${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + if(NOT ${same_location}) if(NOT EXISTS "${target_directory}") file(MAKE_DIRECTORY "${target_directory}") endif()