summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Cotty <raphael.cotty@gmail.com>2020-10-16 20:43:40 +0200
committerRaphaël Cotty <raphael.cotty@gmail.com>2020-10-23 10:28:37 +0000
commitcdc3802e6b51f05d2b80237fdade617c90d0cd45 (patch)
tree656373597cf777a846b9b04e09de8a8936863bde
parent6d6fe0c5ef3631f5538782ff153bd96531459c36 (diff)
downloadqbs-cdc3802e6b51f05d2b80237fdade617c90d0cd45.tar.gz
Android: Remove targetName suffix from QtApplication
From Qt 5.14 target suffix is required for the multi arch packaging. This only affects android applications using Qt. The suffix can't be applied in QtApplication because a project using CppApplication and depending on Qt.core won't have it. Beside using targetName is error prone as the user can change it. So instead of using targetName for the suffix this patch adds the suffix when deploying the "android.nativelibrary" for packaging and only for Qt applications. Fixes: QBS-1608 Change-Id: I0704d5433c8a1d513dfdef71cecbc99ea5458181 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r--share/qbs/imports/qbs/base/QtApplication.qbs4
-rw-r--r--share/qbs/module-providers/Qt/templates/android_support.qbs5
-rw-r--r--share/qbs/modules/Android/sdk/sdk.qbs4
-rw-r--r--tests/auto/blackbox/tst_blackboxandroid.cpp2
4 files changed, 7 insertions, 8 deletions
diff --git a/share/qbs/imports/qbs/base/QtApplication.qbs b/share/qbs/imports/qbs/base/QtApplication.qbs
index b6776dca0..32800d294 100644
--- a/share/qbs/imports/qbs/base/QtApplication.qbs
+++ b/share/qbs/imports/qbs/base/QtApplication.qbs
@@ -30,8 +30,4 @@
CppApplication {
Depends { name: "Qt.core" }
- Properties {
- condition: isForAndroid && Qt.android_support._multiAbi
- targetName: name + "_" + Android.ndk.abi
- }
}
diff --git a/share/qbs/module-providers/Qt/templates/android_support.qbs b/share/qbs/module-providers/Qt/templates/android_support.qbs
index b1165dab5..1deedb0a7 100644
--- a/share/qbs/module-providers/Qt/templates/android_support.qbs
+++ b/share/qbs/module-providers/Qt/templates/android_support.qbs
@@ -189,7 +189,7 @@ Module {
} else {
f.writeLine('"stdcpp-path": "' + product.Android.sdk.ndkDir +
'/toolchains/llvm/prebuilt/' + hostArch + '/sysroot/usr/lib/",');
- f.writeLine('"application-binary": "' + theBinary.product.name + '"');
+ f.writeLine('"application-binary": "' + theBinary.product.targetName + '"');
}
f.writeLine("}");
f.close();
@@ -296,7 +296,8 @@ Module {
FileInfo.joinPaths(product.Qt.android_support._deployQtOutDir,
"libs",
input.Android.ndk.abi,
- input.fileName));
+ input.baseName + "_" + input.Android.ndk.abi +
+ ".so"));
}
}
};
diff --git a/share/qbs/modules/Android/sdk/sdk.qbs b/share/qbs/modules/Android/sdk/sdk.qbs
index 563483410..32aae89d9 100644
--- a/share/qbs/modules/Android/sdk/sdk.qbs
+++ b/share/qbs/modules/Android/sdk/sdk.qbs
@@ -476,7 +476,9 @@ Module {
inputs: product.aggregate ? [] : inputTags
Artifact {
filePath: FileInfo.joinPaths(product.Android.sdk.packageContentsDir, "lib",
- input.Android.ndk.abi, input.fileName)
+ input.Android.ndk.abi, product.Android.sdk._archInName ?
+ input.baseName + "_" + input.Android.ndk.abi + ".so" :
+ input.fileName)
fileTags: "android.nativelibrary_deployed"
}
prepare: {
diff --git a/tests/auto/blackbox/tst_blackboxandroid.cpp b/tests/auto/blackbox/tst_blackboxandroid.cpp
index bfdf916ba..c465c36a9 100644
--- a/tests/auto/blackbox/tst_blackboxandroid.cpp
+++ b/tests/auto/blackbox/tst_blackboxandroid.cpp
@@ -604,7 +604,7 @@ void TestBlackboxAndroid::android_data()
"lib/${ARCH}/libqmlapp_${ARCH}.so"}, generateAab);
if (version < qbs::Version(5, 15))
expectedFile << expandArchs(ndkArchsForQt, {
- "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so"}, generateAab);
+ "lib/${ARCH}/libQt5QuickParticles_${ARCH}.so"}, generateAab);
if (version >= qbs::Version(5, 15))
expectedFile << expandArchs(ndkArchsForQt, {
"lib/${ARCH}/libqml_QtQml_StateMachine_qtqmlstatemachine_${ARCH}.so",