summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-10-29 12:43:43 +0100
committerOswald Buddenhagen <oswald.buddenhagen@digia.com>2012-11-06 14:01:44 +0100
commit074daa41ff8bb0834ce207c36efeaa2563e0cf86 (patch)
tree72354dedeeace661d32525f3c5429e5433925557
parent7ab1f974195134c229af8c826f141ce58ab64533 (diff)
downloadqt-creator-074daa41ff8bb0834ce207c36efeaa2563e0cf86.tar.gz
rewrite default spec handling
instead of symlinking (on unix) or creating a forwarding spec (on windows), just put the default specs into (the bootstrapped) QLibraryInfo. Change-Id: I595500ef7399f77cb8ec117c4303bc0a2ffe505f (cherry picked from qttools/0e75115e557b4cf1c737e3e5524f876a6b85a39e) (cherry picked from qttools/769fa282ac8a4b98698dada6969452363e0eb415) Reviewed-by: Daniel Teske <daniel.teske@digia.com>
-rw-r--r--src/shared/proparser/qmakeevaluator.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/shared/proparser/qmakeevaluator.cpp b/src/shared/proparser/qmakeevaluator.cpp
index be62a8b45a..dd82e3d72b 100644
--- a/src/shared/proparser/qmakeevaluator.cpp
+++ b/src/shared/proparser/qmakeevaluator.cpp
@@ -1051,20 +1051,23 @@ bool QMakeEvaluator::loadSpecInternal()
evalError(fL1S("Could not read qmake configuration file %1.").arg(spec));
return false;
}
-#ifdef Q_OS_UNIX
+#ifndef QT_BUILD_QMAKE
+ // Legacy support for Qt4 default specs
+# ifdef Q_OS_UNIX
if (m_qmakespec.endsWith(QLatin1String("/default-host"))
|| m_qmakespec.endsWith(QLatin1String("/default"))) {
QString rspec = QFileInfo(m_qmakespec).readLink();
if (!rspec.isEmpty())
m_qmakespec = QDir::cleanPath(QDir(m_qmakespec).absoluteFilePath(rspec));
}
-#else
+# else
// We can't resolve symlinks as they do on Unix, so configure.exe puts
// the source of the qmake.conf at the end of the default/qmake.conf in
// the QMAKESPEC_ORIGINAL variable.
const ProString &orig_spec = first(ProKey("QMAKESPEC_ORIGINAL"));
if (!orig_spec.isEmpty())
m_qmakespec = orig_spec.toQString();
+# endif
#endif
valuesRef(ProKey("QMAKESPEC")) << ProString(m_qmakespec);
m_qmakespecName = IoUtils::fileName(m_qmakespec).toString();
@@ -1109,7 +1112,12 @@ bool QMakeEvaluator::loadSpec()
updateMkspecPaths();
if (qmakespec.isEmpty())
+ qmakespec = propertyValue(ProKey(m_hostBuild ? "QMAKE_SPEC" : "QMAKE_XSPEC")).toQString();
+#ifndef QT_BUILD_QMAKE
+ // Legacy support for Qt4 qmake in Qt Creator, etc.
+ if (qmakespec.isEmpty())
qmakespec = m_hostBuild ? QLatin1String("default-host") : QLatin1String("default");
+#endif
if (IoUtils::isRelativePath(qmakespec)) {
foreach (const QString &root, m_mkspecPaths) {
QString mkspec = root + QLatin1Char('/') + qmakespec;