forked from qt-creator/qt-creator
Android: fix passing ANDROID_SDK_ROOT for CMake
Task-number: QTBUG-87991 Change-Id: I70ed0709caf339324af8c233f311a2db2945006e Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
This commit is contained in:
@@ -171,19 +171,15 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Utils::Id id)
|
|||||||
QString::fromLatin1("-DCMAKE_FIND_ROOT_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}"));
|
QString::fromLatin1("-DCMAKE_FIND_ROOT_PATH:PATH=%{Qt:QT_INSTALL_PREFIX}"));
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||||
QString androidSdkKey = "-DANDROID_SDK";
|
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
||||||
|
|
||||||
if (qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
if (qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
||||||
initialArgs.append(
|
initialArgs.append(
|
||||||
QString::fromLatin1("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}"));
|
QString::fromLatin1("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}"));
|
||||||
|
|
||||||
androidSdkKey.append("_ROOT");
|
initialArgs.append(QString("-DANDROID_SDK_ROOT:PATH=%1").arg(sdkLocation.toString()));
|
||||||
}
|
} else {
|
||||||
|
initialArgs.append(QString("-DANDROID_SDK:PATH=%1").arg(sdkLocation.toString()));
|
||||||
if (qt && qt->supportsMultipleQtAbis()) {
|
|
||||||
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
|
||||||
initialArgs.append(
|
|
||||||
QString("%1:PATH=%2").arg(androidSdkKey).arg(sdkLocation.toString()));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user