forked from qt-creator/qt-creator
iOS/CMake: Fix building for iOS device
Fix detection if a kit is an iOS kit.
iOS device kits do not have a device set, if no device is currently
connected. So we would end up with the normal desktop macOS CMake
configuration instead of the special iOS one.
Just check for the device type like before, and guard the else branch
with its own check for macOS target device.
Amends a71d725e46
Change-Id: I829e549e5743ec2b358713f2df6d9cd5e32f6b70
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
@@ -959,7 +959,6 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const IDevice::ConstPtr device = DeviceKitAspect::device(k);
|
const IDevice::ConstPtr device = DeviceKitAspect::device(k);
|
||||||
if (device && device->osType() == Utils::OsTypeMac) {
|
|
||||||
if (isIos(k)) {
|
if (isIos(k)) {
|
||||||
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||||
if (qt && qt->qtVersion().majorVersion >= 6) {
|
if (qt && qt->qtVersion().majorVersion >= 6) {
|
||||||
@@ -982,11 +981,9 @@ CMakeBuildConfiguration::CMakeBuildConfiguration(Target *target, Id id)
|
|||||||
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
|
initialArgs.append("%{" + QLatin1String(DEVELOPMENT_TEAM_FLAG) + "}");
|
||||||
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
|
initialArgs.append("%{" + QLatin1String(PROVISIONING_PROFILE_FLAG) + "}");
|
||||||
}
|
}
|
||||||
} else {
|
} else if (device && device->osType() == Utils::OsTypeMac) {
|
||||||
// macOS
|
|
||||||
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
|
initialArgs.append("%{" + QLatin1String(CMAKE_OSX_ARCHITECTURES_FLAG) + "}");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (isWebAssembly(k) || isQnx(k)) {
|
if (isWebAssembly(k) || isQnx(k)) {
|
||||||
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
const QtSupport::BaseQtVersion *qt = QtSupport::QtKitAspect::qtVersion(k);
|
||||||
|
|||||||
Reference in New Issue
Block a user