Android: Correct setting ANDROID_NDK_PLATFORM

Instead of using always just the minimum SDK version
we need to differentiate between SDK and NDK version.

Fixes: QTCREATORBUG-21536
Change-Id: I2f99c9d40ab05ccd2a4b8efeb2cd0300ecf0cf3a
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
This commit is contained in:
Christian Stenger
2018-11-23 10:08:35 +01:00
parent 5e61e0aa73
commit 1d683dcc07
5 changed files with 28 additions and 1 deletions

View File

@@ -123,9 +123,25 @@ QString AndroidQtVersion::targetArch() const
return m_targetArch;
}
int AndroidQtVersion::mininmumNDK() const
{
ensureMkSpecParsed();
return m_minNdk;
}
void AndroidQtVersion::parseMkSpec(ProFileEvaluator *evaluator) const
{
m_targetArch = evaluator->value(QLatin1String("ANDROID_TARGET_ARCH"));
const QString androidPlatform = evaluator->value(QLatin1String("ANDROID_PLATFORM"));
if (!androidPlatform.isEmpty()) {
const QRegExp regex("android-(\\d+)");
if (regex.exactMatch(androidPlatform)) {
bool ok = false;
int tmp = regex.cap(1).toInt(&ok);
if (ok)
m_minNdk = tmp;
}
}
BaseQtVersion::parseMkSpec(evaluator);
}