forked from qt-creator/qt-creator
CMake: Add Android Multi ABI support
Change-Id: Ia5b3fcda29705fefca85833ebc28b4154defba5f Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
committed by
BogDan Vatra
parent
afd22a75c1
commit
e3904f3b13
@@ -393,6 +393,10 @@ void AndroidBuildApkStep::doRun()
|
||||
if (!node)
|
||||
return false;
|
||||
|
||||
FilePath deploymentSettingsFile = FilePath::fromString(node->data(Android::Constants::AndroidDeploySettingsFile).toString());
|
||||
if (deploymentSettingsFile.exists())
|
||||
return true; // cmake creates this file for us
|
||||
|
||||
auto targets = node->data(Android::Constants::AndroidTargets).toStringList();
|
||||
if (targets.isEmpty())
|
||||
return true; // qmake does this job for us
|
||||
@@ -449,7 +453,7 @@ void AndroidBuildApkStep::doRun()
|
||||
qmlRootPath = target()->project()->rootProjectDirectory().toString();
|
||||
deploySettings["qml-root-path"] = qmlRootPath;
|
||||
|
||||
QFile f{bc->buildDirectory().pathAppended("android_deployment_settings.json").toString()};
|
||||
QFile f{deploymentSettingsFile.toString()};
|
||||
if (!f.open(QIODevice::WriteOnly))
|
||||
return false;
|
||||
f.write(QJsonDocument{deploySettings}.toJson());
|
||||
@@ -518,6 +522,8 @@ QVariant AndroidBuildApkStep::data(Core::Id id) const
|
||||
return AndroidConfigurations::currentConfig().bestNdkPlatformMatch(AndroidManager::minimumSDK(target())).mid(8);
|
||||
if (id == Constants::NdkLocation)
|
||||
return QVariant::fromValue(AndroidConfigurations::currentConfig().ndkLocation());
|
||||
if (id == Constants::SdkLocation)
|
||||
return QVariant::fromValue(AndroidConfigurations::currentConfig().sdkLocation());
|
||||
if (id == Constants::AndroidABIs)
|
||||
return AndroidManager::applicationAbis(target());
|
||||
|
||||
|
||||
@@ -82,6 +82,7 @@ const char AndroidManifest[] = "Android.Manifest"; // QStringList
|
||||
|
||||
const char AndroidNdkPlatform[] = "AndroidNdkPlatform"; //QString
|
||||
const char NdkLocation[] = "NdkLocation"; // FileName
|
||||
const char SdkLocation[] = "SdkLocation"; // FileName
|
||||
const char AndroidABIs[] = "AndroidABIs"; // QString
|
||||
|
||||
} // namespace Constants;
|
||||
|
||||
Reference in New Issue
Block a user