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>
This commit is contained in:
parent
10c51cb53b
commit
fdbff1a8c6
@ -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…
x
Reference in New Issue
Block a user