forked from qt-creator/qt-creator
CMake: Fix crash with Android when no Qt version is set
Change-Id: I4090add40d621251b795dc090b43ca5f6acb3015 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
@@ -947,7 +947,7 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
|||||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||||
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
||||||
|
|
||||||
if (qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
if (qt && qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
||||||
initialArgs.append("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}");
|
initialArgs.append("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}");
|
||||||
initialArgs.append("-DANDROID_SDK_ROOT:PATH=" + sdkLocation.path());
|
initialArgs.append("-DANDROID_SDK_ROOT:PATH=" + sdkLocation.path());
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user