Ensure that we make case-insensitive comparison of CMAKE_SYSTEM_PROCESSOR

In windows CMAKE_SYSTEM_PROCESSOR can be set to both arm64 and ARM64.
Make the comparison case-insensitive when defining mkspec.

Pick-to: 6.8 6.7 6.5
Fixes: QTBUG-127044
Change-Id: Id0c8f04bc0ec6b70993e400f9c285168d4c1499b
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Alexey Edelev 2024-07-09 15:55:58 +02:00
parent 452aaf340b
commit 7ae19cee1c

View File

@ -33,11 +33,13 @@ macro(qt_internal_setup_platform_definitions_and_mkspec)
set(QT_DEFAULT_MKSPEC win32-clang-g++)
endif()
elseif(MSVC)
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" cmake_system_processor_case_independent)
if(cmake_system_processor_case_independent STREQUAL "arm64")
set(QT_DEFAULT_MKSPEC win32-arm64-msvc)
else()
set(QT_DEFAULT_MKSPEC win32-msvc)
endif()
unset(cmake_system_processor_case_independent)
elseif(MINGW)
set(QT_DEFAULT_MKSPEC win32-g++)
list(APPEND QT_DEFAULT_PLATFORM_DEFINITIONS MINGW_HAS_SECURE_API=1)