Read ANDROID_TARGET_ARCH instead of CONFIG

Instead of adding single archs like x86 to the general CONFIG
variable, we can read the ANDROID_TARGET_ARCH directly in
Qt Creator.

Change-Id: Idc4c4524d0f277aad8e129ca622d64d505a5ac95
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: default avatarBogDan Vatra <bogdan@kde.org>
parent 0c0319ea
......@@ -145,16 +145,13 @@ bool AndroidPackageCreationStep::init()
// Copying
m_androidDir = AndroidManager::dirPath(target());
Utils::FileName path = m_androidDir;
Utils::FileName androidLibPath;
QStringList configs = project->rootQt4ProjectNode()->variableValue(Qt4ProjectManager::ConfigVar);
if (configs.contains(QLatin1String("x86")))
androidLibPath = path.appendPath(QLatin1String("libs/x86"));
else if (configs.contains(QLatin1String("mips")))
androidLibPath = path.appendPath(QLatin1String("libs/mips"));
else if (configs.contains(QLatin1String("armeabi-v7a")))
androidLibPath = path.appendPath(QLatin1String("libs/armeabi-v7a"));
else
androidLibPath = path.appendPath(QLatin1String("libs/armeabi"));
QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(Qt4ProjectManager::AndroidArchVar);
if (androidTargetArch.isEmpty()) {
raiseError(tr("Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec."));
return false;
}
Utils::FileName androidLibPath = path.appendPath(QLatin1String("libs/") + androidTargetArch);
m_gdbServerDestination = androidLibPath.appendPath(QLatin1String("gdbserver"));
m_gdbServerSource = AndroidGdbServerKitInformation::gdbServer(target()->kit());
m_debugBuild = bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild;
......
......@@ -1941,6 +1941,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
= m_readerExact->values(QLatin1String("TARGET_VERSION_EXT"));
newVarValues[StaticLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_STATICLIB"));
newVarValues[ShLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_SHLIB"));
newVarValues[AndroidArchVar] = m_readerExact->values(QLatin1String("ANDROID_TARGET_ARCH"));
m_isDeployable = false;
if (m_projectType == ApplicationTemplate) {
......
......@@ -98,7 +98,8 @@ enum Qt4Variable {
VersionVar,
TargetVersionExtVar,
StaticLibExtensionVar,
ShLibExtensionVar
ShLibExtensionVar,
AndroidArchVar
};
// Import base classes into namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment