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() ...@@ -145,16 +145,13 @@ bool AndroidPackageCreationStep::init()
// Copying // Copying
m_androidDir = AndroidManager::dirPath(target()); m_androidDir = AndroidManager::dirPath(target());
Utils::FileName path = m_androidDir; Utils::FileName path = m_androidDir;
Utils::FileName androidLibPath; QString androidTargetArch = project->rootQt4ProjectNode()->singleVariableValue(Qt4ProjectManager::AndroidArchVar);
QStringList configs = project->rootQt4ProjectNode()->variableValue(Qt4ProjectManager::ConfigVar); if (androidTargetArch.isEmpty()) {
if (configs.contains(QLatin1String("x86"))) raiseError(tr("Cannot create Android package: No ANDROID_TARGET_ARCH set in make spec."));
androidLibPath = path.appendPath(QLatin1String("libs/x86")); return false;
else if (configs.contains(QLatin1String("mips"))) }
androidLibPath = path.appendPath(QLatin1String("libs/mips"));
else if (configs.contains(QLatin1String("armeabi-v7a"))) Utils::FileName androidLibPath = path.appendPath(QLatin1String("libs/") + androidTargetArch);
androidLibPath = path.appendPath(QLatin1String("libs/armeabi-v7a"));
else
androidLibPath = path.appendPath(QLatin1String("libs/armeabi"));
m_gdbServerDestination = androidLibPath.appendPath(QLatin1String("gdbserver")); m_gdbServerDestination = androidLibPath.appendPath(QLatin1String("gdbserver"));
m_gdbServerSource = AndroidGdbServerKitInformation::gdbServer(target()->kit()); m_gdbServerSource = AndroidGdbServerKitInformation::gdbServer(target()->kit());
m_debugBuild = bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild; m_debugBuild = bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild;
......
...@@ -1941,6 +1941,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async) ...@@ -1941,6 +1941,7 @@ void Qt4ProFileNode::applyEvaluate(EvalResult evalResult, bool async)
= m_readerExact->values(QLatin1String("TARGET_VERSION_EXT")); = m_readerExact->values(QLatin1String("TARGET_VERSION_EXT"));
newVarValues[StaticLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_STATICLIB")); newVarValues[StaticLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_STATICLIB"));
newVarValues[ShLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_SHLIB")); newVarValues[ShLibExtensionVar] = m_readerExact->values(QLatin1String("QMAKE_EXTENSION_SHLIB"));
newVarValues[AndroidArchVar] = m_readerExact->values(QLatin1String("ANDROID_TARGET_ARCH"));
m_isDeployable = false; m_isDeployable = false;
if (m_projectType == ApplicationTemplate) { if (m_projectType == ApplicationTemplate) {
......
...@@ -98,7 +98,8 @@ enum Qt4Variable { ...@@ -98,7 +98,8 @@ enum Qt4Variable {
VersionVar, VersionVar,
TargetVersionExtVar, TargetVersionExtVar,
StaticLibExtensionVar, StaticLibExtensionVar,
ShLibExtensionVar ShLibExtensionVar,
AndroidArchVar
}; };
// Import base classes into namespace // 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