summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-05-04 13:28:46 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-05-05 09:41:18 +0200
commit33ac3cf7664aa08e3455e516c0d44d923b29955d (patch)
tree3e93a2a21950b75f6ba6d178daaf592a084a331e /cmake
parent9f8d5bceb47eafa79fdd9c2a5186e6a86be7fecb (diff)
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 <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtBuildInternalsExtra.cmake.in4
1 files 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()