summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer.qnx@kdab.com>2012-03-06 18:05:27 +0000
committerQt by Nokia <qt-info@nokia.com>2012-03-12 11:09:24 +0100
commit2dd6f1467fca051e977eeda0369b9b89e25065b1 (patch)
tree795dcdd3ef8ca9a49264e98e37b9918e2d876fc9
parentaed6eaa5b211a4676c15627657f3a7bda6e3866d (diff)
Allow qmake to find features when using mkspecs in nested dirs
Commit 8e5eb1bddcfc introduced the assumtion that mkspecs are immediately below the mkspecs directory itself. This is not true for e.g. unsupported/blackberry-armv7le-qcc. This commit restores qmake's ability to find the "root" of the mkspecs collection no matter how deeply the actual mkspecs are nested. Task-number: QTBUG-24665 Change-Id: I98faaf8e6ae7b8524277aea6c17e685e507e37b3 Reviewed-by: Sean Harmer <sh@theharmers.co.uk> Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
-rw-r--r--qmake/project.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 8b5ed1e2ac..b82b793319 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -579,14 +579,19 @@ QStringList qmake_feature_paths(QMakeProperty *prop=0)
// The spec is already platform-dependent, so no subdirs here.
feature_roots << Option::mkfile::qmakespec + base_concat;
+ // Also check directly under the root directory of the mkspecs collection
QFileInfo specfi(Option::mkfile::qmakespec);
- if (!specfi.isRoot()) {
- QDir specdir(specfi.absolutePath());
- if (specdir.exists(QLatin1String("features"))) {
- for(QStringList::Iterator concat_it = concat.begin();
- concat_it != concat.end(); ++concat_it)
- feature_roots << (specdir.path() + (*concat_it));
+ QDir specrootdir(specfi.absolutePath());
+ while (!specrootdir.isRoot()) {
+ const QString specrootpath = specrootdir.path();
+ if (specrootpath.endsWith(mkspecs_concat)) {
+ if (QFile::exists(specrootpath + base_concat))
+ for (QStringList::Iterator concat_it = concat.begin();
+ concat_it != concat.end(); ++concat_it)
+ feature_roots << (specrootpath + (*concat_it));
+ break;
}
+ specrootdir.cdUp();
}
}
for(QStringList::Iterator concat_it = concat.begin();