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 b226e99c71
.
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>
This commit is contained in:
parent
9f8d5bceb4
commit
33ac3cf766
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user