summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-05-04 13:28:46 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-05-05 10:17:49 +0000
commitfdbff1a8c65030a06c30d6d76fa3da7aaab117b5 (patch)
tree508f73bd4ee8d5570ba13323fc33a6001a1f83f4 /cmake
parent10c51cb53bf699fce0dd04b747cdae0d4db6b756 (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. Change-Id: Ibb28ef757228e1a1176ff70c3ec57b7ca751a636 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> (cherry picked from commit 33ac3cf7664aa08e3455e516c0d44d923b29955d) Reviewed-by: Qt Cherry-pick Bot <cherrypick_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()