summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-08-19 12:17:20 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2013-08-19 16:43:28 +0200
commit8bfdf493adff7279adcd60ecb83234e9d0b374de (patch)
tree36ce3779d6a4ccbca2d87c882ca6e060b7e330f5 /src
parent9e276307efb7cdf1bdd63f2c92c6df39ebdd99b3 (diff)
downloadqbs-8bfdf493adff7279adcd60ecb83234e9d0b374de.tar.gz
fix setup-qt for Qt 5.2
The location of the mkspec is in the source dir for developer builds. Change-Id: I3374763fae041568b989865dbad24fd6c7932e02 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/app/qbs-setup-qt/setupqt.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/app/qbs-setup-qt/setupqt.cpp b/src/app/qbs-setup-qt/setupqt.cpp
index 885b1e34c..a74e48bfd 100644
--- a/src/app/qbs-setup-qt/setupqt.cpp
+++ b/src/app/qbs-setup-qt/setupqt.cpp
@@ -178,10 +178,13 @@ QtEnvironment SetupQt::fetchEnvironment(const QString &qmakePath)
const Version qtVersion = extractVersion(qtEnvironment.qtVersion);
QByteArray mkspecsBasePath;
- if (qtVersion.majorVersion >= 5)
+ QByteArray mkspecsBaseSrcPath;
+ if (qtVersion.majorVersion >= 5) {
mkspecsBasePath = queryOutput.value("QT_HOST_DATA") + "/mkspecs";
- else
+ mkspecsBaseSrcPath = queryOutput.value("QT_HOST_DATA/src") + "/mkspecs";
+ } else {
mkspecsBasePath = queryOutput.value("QT_INSTALL_DATA") + "/mkspecs";
+ }
if (!QFile::exists(mkspecsBasePath))
throw ErrorInfo(tr("Cannot extract the mkspecs directory."));
@@ -199,6 +202,8 @@ QtEnvironment SetupQt::fetchEnvironment(const QString &qmakePath)
if (qtVersion.majorVersion >= 5) {
const QString mkspecName = queryOutput.value("QMAKE_XSPEC");
qtEnvironment.mkspecPath = mkspecsBasePath + QLatin1Char('/') + mkspecName;
+ if (!mkspecsBaseSrcPath.isEmpty() && !QFile::exists(qtEnvironment.mkspecPath))
+ qtEnvironment.mkspecPath = mkspecsBaseSrcPath + QLatin1Char('/') + mkspecName;
} else {
if (HostOsInfo::isWindowsHost()) {
const QByteArray fileContent = readFileContent(mkspecsBasePath + "/default/qmake.conf");