Skip to content
Snippets Groups Projects
Commit d6d98836 authored by dt's avatar dt
Browse files

Make qmakestep even smarter about not running.

Use the mkspec of the qt version if none is specified in the additional
arguments. Also if given a relative path, try the source directory
first.
parent ae634437
No related branches found
No related tags found
No related merge requests found
...@@ -156,17 +156,24 @@ bool QMakeStep::init(const QString &name) ...@@ -156,17 +156,24 @@ bool QMakeStep::init(const QString &name)
// we have to compare without the spec/platform cmd argument // we have to compare without the spec/platform cmd argument
// and compare that on its own // and compare that on its own
QString actualSpec = extractSpecFromArgumentList(value(name, "qmakeArgs").toStringList()); QString actualSpec = extractSpecFromArgumentList(value(name, "qmakeArgs").toStringList());
if (actualSpec.isEmpty())
actualSpec = m_pro->qtVersion(name)->mkspec();
QString parsedSpec = extractSpecFromArgumentList(result.second); QString parsedSpec = extractSpecFromArgumentList(result.second);
// Now to convert the actualSpec to a absolute path, we go through a few hops // Now to convert the actualSpec to a absolute path, we go through a few hops
if (QFileInfo(actualSpec).isRelative()) { if (QFileInfo(actualSpec).isRelative()) {
QString path = qtVersion->versionInfo().value("QMAKE_MKSPECS") + "/" + actualSpec; QString path = qtVersion->sourcePath() + "/mkspecs/" + actualSpec;
if (QFileInfo(path).exists()) { if (QFileInfo(path).exists()) {
actualSpec = QDir::cleanPath(path); actualSpec = QDir::cleanPath(path);
} else { } else {
QString path = workingDirectory + "/" + actualSpec; path = qtVersion->versionInfo().value("QMAKE_MKSPECS") + "/" + actualSpec;
if (QFileInfo(path).exists()) if (QFileInfo(path).exists()) {
actualSpec = QDir::cleanPath(path); actualSpec = QDir::cleanPath(path);
} else {
path = workingDirectory + "/" + actualSpec;
if (QFileInfo(path).exists())
actualSpec = QDir::cleanPath(path);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment