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>
This commit is contained in:
parent
aed6eaa5b2
commit
2dd6f1467f
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user