search for default spec just like for other ones
that way qtbase will find its spec without hacking .qmake.cache. note that passing "-spec default" on the command line would have already triggered the normal path, so artificial limitation did not even provide safety against abuse (it is arguably pointless/counterproductive for other projects than qtbase to have a default spec). Change-Id: Ib0c3e6498fd70cd6f9561951d72a47165878bb33 Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
This commit is contained in:
parent
054051d91f
commit
c3a1af63ae
@ -1291,26 +1291,12 @@ QMakeProject::read(uchar cmd)
|
|||||||
}
|
}
|
||||||
if (cmd & ReadSetup) { // parse mkspec
|
if (cmd & ReadSetup) { // parse mkspec
|
||||||
QString qmakespec = fixEnvVariables(Option::mkfile::qmakespec);
|
QString qmakespec = fixEnvVariables(Option::mkfile::qmakespec);
|
||||||
QStringList mkspec_roots = qmake_mkspec_paths();
|
if (qmakespec.isEmpty())
|
||||||
debug_msg(2, "Looking for mkspec %s in (%s)", qmakespec.toLatin1().constData(),
|
qmakespec = "default";
|
||||||
mkspec_roots.join("::").toLatin1().constData());
|
|
||||||
if(qmakespec.isEmpty()) {
|
|
||||||
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
|
|
||||||
QString mkspec = (*it) + QLatin1String("/default");
|
|
||||||
QFileInfo default_info(mkspec);
|
|
||||||
if(default_info.exists() && default_info.isDir()) {
|
|
||||||
qmakespec = mkspec;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(qmakespec.isEmpty()) {
|
|
||||||
fprintf(stderr, "QMAKESPEC has not been set, so configuration cannot be deduced.\n");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Option::mkfile::qmakespec = qmakespec;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(QDir::isRelativePath(qmakespec)) {
|
if(QDir::isRelativePath(qmakespec)) {
|
||||||
|
QStringList mkspec_roots = qmake_mkspec_paths();
|
||||||
|
debug_msg(2, "Looking for mkspec %s in (%s)", qmakespec.toLatin1().constData(),
|
||||||
|
mkspec_roots.join("::").toLatin1().constData());
|
||||||
bool found_mkspec = false;
|
bool found_mkspec = false;
|
||||||
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
|
for(QStringList::ConstIterator it = mkspec_roots.begin(); it != mkspec_roots.end(); ++it) {
|
||||||
QString mkspec = (*it) + QLatin1Char('/') + qmakespec;
|
QString mkspec = (*it) + QLatin1Char('/') + qmakespec;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user