From 33ac3cf7664aa08e3455e516c0d44d923b29955d Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 4 May 2021 13:28:46 +0200 Subject: [PATCH] Fix Windows build with CMake < 3.19 file(REAL_PATH) was introduced in CMake 3.19. Use get_file_name_component(... REALPATH) instead that is available in older CMake versions. This amends commit b226e99c71c. Pick-to: 6.1 Change-Id: Ibb28ef757228e1a1176ff70c3ec57b7ca751a636 Reviewed-by: Alexandru Croitor Reviewed-by: Qt CI Bot --- cmake/QtBuildInternalsExtra.cmake.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtBuildInternalsExtra.cmake.in b/cmake/QtBuildInternalsExtra.cmake.in index 5d5195e022..d623835144 100644 --- a/cmake/QtBuildInternalsExtra.cmake.in +++ b/cmake/QtBuildInternalsExtra.cmake.in @@ -28,8 +28,8 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND # Make sure we use exactly the original prefix if it points to the same directory as the new # one. This is needed for the case where the original prefix is passed without drive letter # to support installing with DESTDIR set. - file(REAL_PATH "${qtbi_orig_prefix}" qtbi_real_orig_prefix) - file(REAL_PATH "${qtbi_new_prefix}" qtbi_real_new_prefix) + get_filename_component(qtbi_real_orig_prefix "${qtbi_orig_prefix}" REALPATH) + get_filename_component(qtbi_real_new_prefix "${qtbi_new_prefix}" REALPATH) if(qtbi_real_orig_prefix STREQUAL qtbi_real_new_prefix) set(qtbi_new_prefix "${qtbi_orig_prefix}") endif()