forked from qt-creator/qt-creator
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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user