CMake: Replace usage of WIN32 with CMAKE_HOST_WIN32 in qconfig.cpp

The workaround of adding a drive letter to
QT_CONFIGURE_PREFIX_PATH_STR should be done when running on any
Windows host, not only when targeting Windows.

Amends 59c3be711728ab0aa644bfdf50e91a1b020f95bb

Task-number: QTBUG-87580
Change-Id: Ic6ca50aa58a4a54fb483e90fe61a907fe86cb002
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
(cherry picked from commit 6ef3d070a8bad0cfba98fa241a8676401f21371f)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2021-08-13 13:26:09 +02:00 committed by Qt Cherry-pick Bot
parent e8add0a655
commit 4d0db58c20

View File

@ -103,7 +103,7 @@ function(qt_generate_qconfig_cpp)
# C:/work/qt/install
# so it includes a drive letter and forward slashes.
set(QT_CONFIGURE_PREFIX_PATH_STR "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}")
if(WIN32)
if(CMAKE_HOST_WIN32)
get_filename_component(
QT_CONFIGURE_PREFIX_PATH_STR
"${QT_CONFIGURE_PREFIX_PATH_STR}" REALPATH)