forked from qt-creator/qt-creator
CMake: Don't build apk by default with CMake's ALL target
From Qt 6.1, Qt 6.1 builds the apk directly with ALL step if it's not a Qt build. Change-Id: Ib8573399a1ed509852a973e84405353191e80f86 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -948,6 +948,9 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
||||
auto sdkLocation = bs->data(Android::Constants::SdkLocation).value<FilePath>();
|
||||
|
||||
if (qt && qt->qtVersion() >= QtSupport::QtVersionNumber{6, 0, 0}) {
|
||||
// Don't build apk under ALL target because Qt Creator will handle it
|
||||
if (qt->qtVersion() >= QtSupport::QtVersionNumber{6, 1, 0})
|
||||
initialArgs.append("-DQT_NO_GLOBAL_APK_TARGET_PART_OF_ALL:BOOL=ON");
|
||||
initialArgs.append("-DQT_HOST_PATH:PATH=%{Qt:QT_HOST_PREFIX}");
|
||||
initialArgs.append("-DANDROID_SDK_ROOT:PATH=" + sdkLocation.path());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user