summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@theqtcompany.com>2015-08-04 12:07:46 +0200
committerEike Ziller <eike.ziller@theqtcompany.com>2015-08-04 11:09:10 +0000
commitaa8998cfb38f6227891ce104de23b1e62bd7bbcf (patch)
treeb65477a84f6071a29fc5cf2ca8ecd2ef1ff780c4
parentdcab956dc83dc77e7170cefeaf0a163b55779e6d (diff)
downloadqt-creator-aa8998cfb38f6227891ce104de23b1e62bd7bbcf.tar.gz
iOS: Fix kit creation with Xcode 7
Xcode 7's platform plist does not specify a concrete version for the SDK in the SDK name anymore. So, if we do not find an SDK with the same name, look for an SDK with a version that matches the platform's 'Version' setting. Trying to figure out from the settings looks inherently fragile to me though, and we might be better off just using xcrun -sdk <sdk> --show-sdk-path Change-Id: Ief45f03aa7cd5193f6c24b087eb635d3f5ba5298 Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
-rw-r--r--src/plugins/ios/iosprobe.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/plugins/ios/iosprobe.cpp b/src/plugins/ios/iosprobe.cpp
index 25e7d98132..49634dcfbc 100644
--- a/src/plugins/ios/iosprobe.cpp
+++ b/src/plugins/ios/iosprobe.cpp
@@ -146,6 +146,8 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco
continue;
}
+ const QString platformSdkVersion = infoSettings.value(QLatin1String("Version")).toString();
+
// prepare default platform properties
QVariantMap defaultProp = infoSettings.value(QLatin1String("DefaultProperties"))
.toMap();
@@ -225,6 +227,7 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco
if (defaultProp.contains(QLatin1String("SDKROOT")))
sdkName = defaultProp.value(QLatin1String("SDKROOT")).toString();
QString sdkPath;
+ QString sdkPathWithSameVersion;
QDir sdks(fInfo.absoluteFilePath() + QLatin1String("/Developer/SDKs"));
QString maxVersion;
foreach (const QFileInfo &sdkDirInfo, sdks.entryInfoList(QDir::Dirs
@@ -249,11 +252,15 @@ void IosProbe::setupDefaultToolchains(const QString &devPath, const QString &xco
}
} else if (currentSdkName == sdkName) {
sdkPath = sdkDirInfo.canonicalFilePath();
- }
+ } else if (currentSdkName.toString().startsWith(sdkName) /*if sdkName doesn't contain version*/
+ && compareVersions(platformSdkVersion, versionStr) == 0)
+ sdkPathWithSameVersion = sdkDirInfo.canonicalFilePath();
}
- if (!sdkPath.isEmpty())
+ if (sdkPath.isEmpty())
+ sysRoot = sdkPathWithSameVersion;
+ else
sysRoot = sdkPath;
- else if (!sdkName.isEmpty())
+ if (sysRoot.isEmpty() && !sdkName.isEmpty())
qCDebug(probeLog) << indent << QString::fromLatin1("Failed to find sysroot %1").arg(sdkName);
}
if (hasClang && !sysRoot.isEmpty()) {