aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/reference/modules/android-ndk-module.qdoc4
-rw-r--r--share/qbs/imports/qbs/Probes/AndroidNdkProbe.qbs4
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs2
-rw-r--r--share/qbs/modules/Android/ndk/ndk.qbs12
4 files changed, 14 insertions, 8 deletions
diff --git a/doc/reference/modules/android-ndk-module.qdoc b/doc/reference/modules/android-ndk-module.qdoc
index d5145a67b..e3a7ca22d 100644
--- a/doc/reference/modules/android-ndk-module.qdoc
+++ b/doc/reference/modules/android-ndk-module.qdoc
@@ -104,5 +104,7 @@
The versioned platform name.
- \defaultvalue \c{"android-16"}
+ \defaultvalue \c{"android-16"} for 32 bit arm ABIs
+ and \c{"android-21"} for all 64 bit ABIs and x86.
+ x86 ABI has broken wstring support in android-16 to android-19.
*/
diff --git a/share/qbs/imports/qbs/Probes/AndroidNdkProbe.qbs b/share/qbs/imports/qbs/Probes/AndroidNdkProbe.qbs
index f7abce388..4a86ee935 100644
--- a/share/qbs/imports/qbs/Probes/AndroidNdkProbe.qbs
+++ b/share/qbs/imports/qbs/Probes/AndroidNdkProbe.qbs
@@ -63,7 +63,6 @@ PathProbe {
property var hostArch
property stringList toolchains: []
property string ndkVersion
- property string ndkPlatform
configure: {
function readFileContent(filePath) {
@@ -93,9 +92,6 @@ PathProbe {
for (j in platforms) {
if (File.exists(FileInfo.joinPaths(allPaths[i], "prebuilt", platforms[j]))) {
path = allPaths[i];
- var ndkPlatforms = AndroidUtils.availablePlatforms(path);
- if (ndkPlatforms.length > 0)
- ndkPlatform = ndkPlatforms[ndkPlatforms.length - 1];
if (File.exists(FileInfo.joinPaths(path, "samples")))
samplesDir = FileInfo.joinPaths(path, "samples"); // removed in r11
hostArch = platforms[j];
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index d11f8707a..43d9b52b4 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -40,7 +40,7 @@ Module {
java._tagJniHeaders: false // prevent rule cycle
}
Properties {
- condition: _enableNdkSupport && Android.ndk.abi === "armeabi-v7a"
+ condition: _enableNdkSupport && (Android.ndk.abi === "armeabi-v7a" || Android.ndk.abi === "x86")
cpp.defines: "ANDROID_HAS_WSTRING"
}
diff --git a/share/qbs/modules/Android/ndk/ndk.qbs b/share/qbs/modules/Android/ndk/ndk.qbs
index d639fcb91..15cfb8f72 100644
--- a/share/qbs/modules/Android/ndk/ndk.qbs
+++ b/share/qbs/modules/Android/ndk/ndk.qbs
@@ -63,8 +63,16 @@ Module {
property string hostArch: ndkProbe.hostArch
property string ndkDir: ndkProbe.path
property string ndkSamplesDir: ndkProbe.samplesDir
- property string platform: ndkProbe.ndkPlatform
-
+ property string platform: {
+ switch (abi) {
+ case "armeabi":
+ case "armeabi-v7a":
+ // case "x86": // x86 has broken wstring support
+ return "android-19";
+ default:
+ return "android-21";
+ }
+ }
property int platformVersion: {
if (platform) {