Reputation: 4021
In QT Creator .pro file done for an Android project I need to include different files based on target architecture (or compiler). In particular, for ARM and x86 architecture I need to include a different manifest.xml file, since I need to specify a different version code, as written in Multiple APK guidelines.
I need something like this:
android_armv7{
DISTFILES += android/arm/AndroidManifest.xml
}
android_x86{
DISTFILES += android/x86/AndroidManifest.xml
}
android_armv7
and android_x86
do not exist.
Moreover, how to check the architecture/compiler in C++ code too?
Upvotes: 2
Views: 1530
Reputation: 335
You can use: (tested with Qt 5.9.2)
equals(QT_ARCH, arm): DISTFILES += android/arm/AndroidManifest.xml
equals(QT_ARCH, i386): DISTFILES += android/x86/AndroidManifest.xml
I'd had the same issue for setting library search paths.
Maybe this can help others when they find this question.
Upvotes: 1