forked from qt-creator/qt-creator
Android: Set correct ANDROID_NDK_PLATFORM
Introduce the class AndroidQmakeBuildConfiguration whose purpose is to set the environment variable. Modify the Factory to create buildconfigurations of that type and fix restore/clone to also take the factories' priorities into account. Change-Id: Icb377fa9211cd3564c36b60cf7c5f7dd84fcab50 Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
@@ -103,24 +103,10 @@ QList<Abi> AndroidQtVersion::detectQtAbis() const
|
||||
|
||||
void AndroidQtVersion::addToEnvironment(const Kit *k, Utils::Environment &env) const
|
||||
{
|
||||
Q_UNUSED(k);
|
||||
// this env vars are used by qmake mkspecs to generate makefiles (check QTDIR/mkspecs/android-g++/qmake.conf for more info)
|
||||
env.set(QLatin1String("ANDROID_NDK_HOST"), AndroidConfigurations::currentConfig().toolchainHost());
|
||||
env.set(QLatin1String("ANDROID_NDK_ROOT"), AndroidConfigurations::currentConfig().ndkLocation().toUserOutput());
|
||||
|
||||
Project *project = ProjectTree::currentProject();
|
||||
if (!project || !project->activeTarget()
|
||||
|| QtSupport::QtKitInformation::qtVersion(k)->type() != QLatin1String(Constants::ANDROIDQT))
|
||||
return;
|
||||
|
||||
Target *target = project->activeTarget();
|
||||
if (DeviceTypeKitInformation::deviceTypeId(target->kit()) != Constants::ANDROID_DEVICE_TYPE)
|
||||
return;
|
||||
if (AndroidConfigurations::currentConfig().ndkLocation().isEmpty()
|
||||
|| AndroidConfigurations::currentConfig().sdkLocation().isEmpty())
|
||||
return;
|
||||
|
||||
env.set(QLatin1String("ANDROID_NDK_PLATFORM"),
|
||||
AndroidConfigurations::currentConfig().bestNdkPlatformMatch(AndroidManager::minimumSDK(target)));
|
||||
}
|
||||
|
||||
Utils::Environment AndroidQtVersion::qmakeRunEnvironment() const
|
||||
|
||||
Reference in New Issue
Block a user