summaryrefslogtreecommitdiffstats
path: root/qmake/project.cpp
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2012-02-23 17:16:03 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-29 00:05:38 +0100
commit65b42dd4c8e6aed6ad84dbd4063da3961a779433 (patch)
treeff587f071e2bc6eff8760824c58e2b66d6f17a15 /qmake/project.cpp
parente05d5c36beb1116657e87d0088ee6153115f320a (diff)
look for mkspecs in the project root, not next to every project
qmake would look for mkspecs/ in the directory containing the current project file. this makes completely no sense with recursive projects: a) nobody would make per-project specs and b) specs meant to be global would not be found. consequently, we look for a project root when starting qmake and use only that directory. if .qmake.cache is found/set, we assume that to be the project root. otherwise, we search for mkspecs/ the same way we search for the cache - just to up until we find one or hit the root. if we are shadow-building, search the build dir as well. Change-Id: Ie66b189a40c21203d956e681cbef44a89f98cd17 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Diffstat (limited to 'qmake/project.cpp')
-rw-r--r--qmake/project.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmake/project.cpp b/qmake/project.cpp
index 1179812b1b..0e0ac93c5a 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -607,6 +607,9 @@ QStringList qmake_mkspec_paths()
for(QStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it)
ret << ((*it) + concat);
}
+ ret << Option::mkfile::project_build_root + concat;
+ if (!Option::mkfile::project_root.isEmpty())
+ ret << Option::mkfile::project_root + concat;
ret << QLibraryInfo::location(QLibraryInfo::DataPath) + concat;
return ret;
@@ -1307,11 +1310,6 @@ QMakeProject::read(uchar cmd)
}
if(QDir::isRelativePath(qmakespec)) {
- if (QFile::exists(Option::output_dir+"/"+qmakespec+"/qmake.conf")) {
- qmakespec = Option::mkfile::qmakespec = QFileInfo(Option::output_dir+"/"+qmakespec).absoluteFilePath();
- } else if (QFile::exists(qmakespec+"/qmake.conf")) {
- Option::mkfile::qmakespec = QFileInfo(Option::mkfile::qmakespec).absoluteFilePath();
- } else {
bool found_mkspec = false;
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
QString mkspec = (*it) + QLatin1Char('/') + qmakespec;
@@ -1326,7 +1324,6 @@ QMakeProject::read(uchar cmd)
qmakespec.toLatin1().constData(), mkspec_roots.join("\n\t").toLatin1().constData());
return false;
}
- }
}
// parse qmake configuration