Avoid hardcoding the crosscompilation requirements when building WoA

Pick-to: 6.10
Change-Id: Id725bb5ab404d9fb7f644896434ae1afc4ca4ef2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2025-08-07 15:44:40 +02:00
parent 4f44f43332
commit 26e0396381
1 changed files with 17 additions and 4 deletions

View File

@ -34,10 +34,23 @@ set(__qt_chainload_toolchain_file \"\${__qt_initially_configured_toolchain_file}
set(init_vcpkg "") set(init_vcpkg "")
endif() endif()
if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" AND CMAKE_SYSTEM_VERSION STREQUAL "10") if(CMAKE_SYSTEM_NAME STREQUAL "Windows" AND CMAKE_CROSSCOMPILING)
list(APPEND init_platform "set(CMAKE_SYSTEM_NAME Windows CACHE STRING \"\")") list(APPEND init_platform
list(APPEND init_platform "set(CMAKE_SYSTEM_VERSION 10 CACHE STRING \"\")") "string(TOUPPER \"${CMAKE_SYSTEM_PROCESSOR}\" _qt_orig_target_system_processor_upper)"
list(APPEND init_platform "set(CMAKE_SYSTEM_PROCESSOR arm64 CACHE STRING \"\")") "string(TOUPPER \"\${CMAKE_HOST_SYSTEM_PROCESSOR}\" _qt_host_system_processor_upper)"
"if(NOT _qt_orig_target_system_processor_upper STREQUAL _qt_host_system_processor_upper"
" OR NOT CMAKE_HOST_SYSTEM_VERSION MATCHES \"^${CMAKE_SYSTEM_VERSION}(\\\\..+|$)\""
" OR QT_FORCE_CROSSCOMPILING)"
""
" set(CMAKE_SYSTEM_NAME \"${CMAKE_SYSTEM_NAME}\" CACHE STRING \"\")"
" set(CMAKE_SYSTEM_VERSION \"${CMAKE_SYSTEM_VERSION}\" CACHE STRING \"\")"
" set(CMAKE_SYSTEM_PROCESSOR \"${CMAKE_SYSTEM_PROCESSOR}\" CACHE STRING \"\")"
"else()"
" set(QT_REQUIRE_HOST_PATH_CHECK FALSE)"
"endif()"
"unset(_qt_host_system_processor_upper)"
"unset(_qt_orig_host_system_processor_upper)"
)
endif() endif()
if(QT_QMAKE_TARGET_MKSPEC) if(QT_QMAKE_TARGET_MKSPEC)