aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-05-13 11:39:59 +0200
committerEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>2013-05-13 13:45:05 +0200
commit5624232c619a25a2a3750e21d113b797a0e4e26f (patch)
tree73783c98bee51298162a8aeeb1d151ed927c8fec
parent1d792a9a15d32b0fd9fa47903a00cdba3fb22281 (diff)
Bundle libgnustl_shared.so directly from Android NDK
We need the logic from 78aa64e06b60bac232fddf87dea3509d1e08c1c0 in the bundle deployment as well. This will ignore libgnustl_shared.so if the Qt installation contains it (for compatibility mostly) and it will copy it from the NDK into the bundle. Task-number: QTCREATORBUG-9291 Change-Id: I5ab59602a3dc64d728a58dd1ee70153c09deac72 Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/plugins/android/androidpackagecreationstep.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp
index b38f5897df..0464011980 100644
--- a/src/plugins/android/androidpackagecreationstep.cpp
+++ b/src/plugins/android/androidpackagecreationstep.cpp
@@ -487,7 +487,23 @@ void AndroidPackageCreationStep::collectFiles(QList<DeployItem> *deployList,
+ qtLib
+ QLatin1String(".so");
- DeployItem deployItem(fullPath, 0, destinationPath, true);
+ // If the Qt lib/ folder contains libgnustl_shared.so, don't deploy it from there, since
+ // it will be deployed directly from the NDK instead.
+ if (qtLib != QLatin1String("gnustl_shared")) {
+ DeployItem deployItem(fullPath, 0, destinationPath, true);
+ deployList->append(deployItem);
+ }
+ }
+
+ if (!androidTargetArch.isEmpty()) {
+ ProjectExplorer::ToolChain *tc = ProjectExplorer::ToolChainKitInformation::toolChain(target()->kit());
+ if (tc->type() != QLatin1String(Constants::ANDROID_TOOLCHAIN_TYPE))
+ return;
+
+ AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
+
+ QString libgnustl = AndroidManager::libGnuStl(androidTargetArch, atc->ndkToolChainVersion());
+ DeployItem deployItem(libgnustl, 0, androidLibPath + QLatin1String("/libgnustl_shared.so"), false);
deployList->append(deployItem);
}