From 22b72a6f7a8f6b056f1ab9c3c7806ae87bfefd8a Mon Sep 17 00:00:00 2001 From: Oliver Wolff Date: Tue, 15 Sep 2020 13:14:37 +0200 Subject: [PATCH] win: Set correct target mkspec for qmake builds for arm64 builds As there is no other way of obtaining information about Qt's paths at the moment, windeployqt is still querying qmake for these information. For a cross compiled Qt, the proper target mkspec has to be set in this case. Change-Id: I0b7b7719c9055d432576185ac4f7572a5ba1dd6b Reviewed-by: Alexandru Croitor Reviewed-by: Joerg Bornemann --- cmake/QtBuild.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 6579aae37a..e0cad89cb9 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -277,7 +277,11 @@ if(WIN32) list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS WIN64 _WIN64) endif() if(MSVC) - set(QT_DEFAULT_MKSPEC win32-msvc) + if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64") + set(QT_DEFAULT_MKSPEC win32-arm64-msvc) + else() + set(QT_DEFAULT_MKSPEC win32-msvc) + endif() elseif(CLANG AND MINGW) set(QT_DEFAULT_MKSPEC win32-clang-g++) elseif(MINGW)