forked from qt-creator/qt-creator
ProParser: Prefix mkspecs with remote roots
When needed. Change-Id: Ibb159ce2513eb0d4023565dd11bc4c7dff5d0ec2 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -1480,8 +1480,9 @@ void QMakeEvaluator::updateMkspecPaths()
|
|||||||
if (!m_sourceRoot.isEmpty())
|
if (!m_sourceRoot.isEmpty())
|
||||||
ret << m_sourceRoot + concat;
|
ret << m_sourceRoot + concat;
|
||||||
|
|
||||||
ret << m_option->propertyValue(ProKey("QT_HOST_DATA/get")) + concat;
|
const QString root = m_option->deviceRoot();
|
||||||
ret << m_option->propertyValue(ProKey("QT_HOST_DATA/src")) + concat;
|
ret << root + m_option->propertyValue(ProKey("QT_HOST_DATA/get")) + concat;
|
||||||
|
ret << root + m_option->propertyValue(ProKey("QT_HOST_DATA/src")) + concat;
|
||||||
|
|
||||||
ret.removeDuplicates();
|
ret.removeDuplicates();
|
||||||
m_mkspecPaths = ret;
|
m_mkspecPaths = ret;
|
||||||
|
@@ -225,6 +225,20 @@ void QMakeGlobals::setDirectories(const QString &input_dir, const QString &outpu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString QMakeGlobals::deviceRoot() const
|
||||||
|
{
|
||||||
|
static const QString specialRoot = QDir::rootPath() + "__qtc_devices__/";
|
||||||
|
if (!build_root.startsWith(specialRoot))
|
||||||
|
return {};
|
||||||
|
int pos = build_root.indexOf('/', specialRoot.size());
|
||||||
|
if (pos == -1)
|
||||||
|
return {};
|
||||||
|
pos = build_root.indexOf('/', pos + 1);
|
||||||
|
if (pos == -1)
|
||||||
|
return {};
|
||||||
|
return build_root.left(pos + 1);
|
||||||
|
}
|
||||||
|
|
||||||
QString QMakeGlobals::shadowedPath(const QString &fileName) const
|
QString QMakeGlobals::shadowedPath(const QString &fileName) const
|
||||||
{
|
{
|
||||||
if (source_root.isEmpty())
|
if (source_root.isEmpty())
|
||||||
|
@@ -120,6 +120,7 @@ public:
|
|||||||
QString expandEnvVars(const QString &str) const;
|
QString expandEnvVars(const QString &str) const;
|
||||||
QString shadowedPath(const QString &fileName) const;
|
QString shadowedPath(const QString &fileName) const;
|
||||||
QStringList splitPathList(const QString &value) const;
|
QStringList splitPathList(const QString &value) const;
|
||||||
|
QString deviceRoot() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString getEnv(const QString &) const;
|
QString getEnv(const QString &) const;
|
||||||
|
Reference in New Issue
Block a user