Implicitly detect macOS cross-compilation in case the value of CMAKE_OSX_ARCHITECTURES is a single arch that is different from the real host macOS architecture. In that case, the build system will implicitly set both -DCMAKE_SYSTEM_NAME=Darwin and -DCMAKE_CROSSCOMPILING=TRUE. It will also set those variables in the qt generated toolchain file, otherwise user projects might not be built with the correct architecture depending on the arch of the host machine where the user project is built. For such a cross-compilation scenario, as usual, a host Qt needs to be specified during configuration, for usage of its host tools. Which means that if cross-compiling to x86_64 from arm64, we will not try to build and use the x86_64 tools via Rosetta. Fixes: QTBUG-121322 Change-Id: Ib484af445b3fc6eb676b0ee174ac81d63f2f450f Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> (cherry picked from commit fc2fa92de02e8b57472058a8281c24775e97d9eb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
…
…
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%