forked from qt-creator/qt-creator
use real qmakespec as basis for finding features
follow suit with qmake ... Change-Id: Ibc5a97703af1c5f57149b6a5feab16215bc7f9e7 Reviewed-by: Daniel Teske <daniel.teske@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
@@ -173,6 +173,7 @@ void QMakeEvaluator::initFrom(const QMakeEvaluator &other)
|
|||||||
m_functionDefs = other.m_functionDefs;
|
m_functionDefs = other.m_functionDefs;
|
||||||
m_valuemapStack = other.m_valuemapStack;
|
m_valuemapStack = other.m_valuemapStack;
|
||||||
m_qmakespec = other.m_qmakespec;
|
m_qmakespec = other.m_qmakespec;
|
||||||
|
m_qmakespecFull = other.m_qmakespecFull;
|
||||||
m_qmakespecName = other.m_qmakespecName;
|
m_qmakespecName = other.m_qmakespecName;
|
||||||
m_featureRoots = other.m_featureRoots;
|
m_featureRoots = other.m_featureRoots;
|
||||||
}
|
}
|
||||||
@@ -1072,15 +1073,15 @@ bool QMakeEvaluator::loadSpec()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#ifdef Q_OS_UNIX
|
#ifdef Q_OS_UNIX
|
||||||
QString real_spec = QFileInfo(m_qmakespec).canonicalFilePath();
|
m_qmakespecFull = QFileInfo(m_qmakespec).canonicalFilePath();
|
||||||
#else
|
#else
|
||||||
// We can't resolve symlinks as they do on Unix, so configure.exe puts
|
// We can't resolve symlinks as they do on Unix, so configure.exe puts
|
||||||
// the source of the qmake.conf at the end of the default/qmake.conf in
|
// the source of the qmake.conf at the end of the default/qmake.conf in
|
||||||
// the QMAKESPEC_ORIGINAL variable.
|
// the QMAKESPEC_ORIGINAL variable.
|
||||||
const ProString &orig_spec = first(ProString("QMAKESPEC_ORIGINAL"));
|
const ProString &orig_spec = first(ProString("QMAKESPEC_ORIGINAL"));
|
||||||
QString real_spec = orig_spec.isEmpty() ? m_qmakespec : orig_spec.toQString();
|
m_qmakespecFull = orig_spec.isEmpty() ? m_qmakespec : orig_spec.toQString();
|
||||||
#endif
|
#endif
|
||||||
m_qmakespecName = IoUtils::fileName(real_spec).toString();
|
m_qmakespecName = IoUtils::fileName(m_qmakespecFull).toString();
|
||||||
if (!evaluateFeatureFile(QLatin1String("spec_post.prf")))
|
if (!evaluateFeatureFile(QLatin1String("spec_post.prf")))
|
||||||
return false;
|
return false;
|
||||||
// The spec extends the feature search path, so invalidate the cache.
|
// The spec extends the feature search path, so invalidate the cache.
|
||||||
@@ -1266,12 +1267,12 @@ QStringList QMakeEvaluator::qmakeFeaturePaths() const
|
|||||||
foreach (const QString &item, m_option->getPathListEnv(QLatin1String("QMAKEPATH")))
|
foreach (const QString &item, m_option->getPathListEnv(QLatin1String("QMAKEPATH")))
|
||||||
feature_bases << (item + mkspecs_concat);
|
feature_bases << (item + mkspecs_concat);
|
||||||
|
|
||||||
if (!m_qmakespec.isEmpty()) {
|
if (!m_qmakespecFull.isEmpty()) {
|
||||||
// The spec is already platform-dependent, so no subdirs here.
|
// The spec is already platform-dependent, so no subdirs here.
|
||||||
feature_roots << (m_qmakespec + features_concat);
|
feature_roots << (m_qmakespecFull + features_concat);
|
||||||
|
|
||||||
// Also check directly under the root directory of the mkspecs collection
|
// Also check directly under the root directory of the mkspecs collection
|
||||||
QDir specdir(m_qmakespec);
|
QDir specdir(m_qmakespecFull);
|
||||||
while (!specdir.isRoot() && specdir.cdUp()) {
|
while (!specdir.isRoot() && specdir.cdUp()) {
|
||||||
const QString specpath = specdir.path();
|
const QString specpath = specdir.path();
|
||||||
if (specpath.endsWith(mkspecs_concat)) {
|
if (specpath.endsWith(mkspecs_concat)) {
|
||||||
|
@@ -199,6 +199,7 @@ public:
|
|||||||
|
|
||||||
int m_listCount;
|
int m_listCount;
|
||||||
QString m_qmakespec;
|
QString m_qmakespec;
|
||||||
|
QString m_qmakespecFull;
|
||||||
QString m_qmakespecName;
|
QString m_qmakespecName;
|
||||||
QString m_superfile;
|
QString m_superfile;
|
||||||
QString m_conffile;
|
QString m_conffile;
|
||||||
|
Reference in New Issue
Block a user