Browse Source
It seems that `QT_ARCH` has gone out of favor at some point [[0](https://bugreports.qt.io/browse/QTBUG-21224)] [[1](https://bugreports.qt.io/browse/QTBUG-80582)]. It's not even [a documented qmake variable](https://doc.qt.io/qt-5/qmake-variable-reference.html). When compiling with a `message(QT_ARCH)`, the message would be empty. So it would always load up the x86 (32-bit) headers and then get compiler errors for some static asserts about pointer size assumptions. A little bit of digging found [`ANDROID_ABIS`](https://doc.qt.io/qt-5/qmake-variable-reference.html#android-abis) which is a list of the ABIs selected on the project panel in Qt Creator. That's better but not helpful for a multi-arch build where each arch needs to look at a different set of headers. @keith-bennett-airmap found Android documents the [`TARGET_ARCH`](https://developer.android.com/ndk/guides/android_mk#target_arch) and made an educated guess that it might be `ANDROID_TARGET_ARCH`. Seems to work though I'm 100% sure where the variable is getting set -- @keith-bennett-airmap assumes it's set by qmake while it iterates through `ANDROID_ABIS` since it's not in the build environment list on the project pane. While writing this comment, @keith-bennett-airmap found [this](https://stackoverflow.com/a/2658176) which is probably a more canonical answer for a more general (non-Android) solution: to use `QMAKE_TARGET.arch`QGC4.4
3 changed files with 15 additions and 12 deletions
Loading…
Reference in new issue