qtcreatorcdbext: Improve cross-compilation check

It was failing on x64 since the values are x64 and AMD64 and were
failing the check.

Arm has both values ARM64.

Change-Id: I404b85d9c499464797ece912ee5b83f93c21d04d
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Cristian Adam
2024-08-23 12:41:38 +02:00
parent 6ea2ab3ab7
commit 2568988dab

View File

@@ -140,7 +140,14 @@ if (_library_enabled)
endif()
# Support for cross-compilation for arm64 on a x64 system
if (NOT MSVC_CXX_ARCHITECTURE_ID STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
if (MSVC_CXX_ARCHITECTURE_ID STREQUAL "ARM64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "ARM64")
set(arm64_on_arm64 ON)
endif()
if (MSVC_CXX_ARCHITECTURE_ID STREQUAL "x64" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "AMD64")
set(x64_on_x64 ON)
endif()
if (NOT arm64_on_arm64 AND NOT x64_on_x64)
find_program(dumpbin_executable dumpbin)
find_program(lib_executable lib)