forked from qt-creator/qt-creator
GenericProject: Re-introduce variable resolving in include paths
Variable expansion and relative path resolving were accidentally removed in25ff15a1fb
. Relative path resolving was re-added in214968a80b
, which is superseded here. Fixes: QTCREATORBUG-27401 Change-Id: Ida09e7b486765942c43acf55c4ef9c04eb3df12b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -435,17 +435,22 @@ void GenericBuildSystem::parse(RefreshOptions options)
|
||||
|
||||
if (options & Configuration) {
|
||||
m_rawProjectIncludePaths = readLines(m_includesFileName);
|
||||
Utils::FilePaths normalPaths;
|
||||
Utils::FilePaths frameworkPaths;
|
||||
QStringList normalPaths;
|
||||
QStringList frameworkPaths;
|
||||
const auto baseDir = Utils::FilePath::fromString(m_includesFileName).parentDir();
|
||||
for (const QString &rawPath : qAsConst(m_rawProjectIncludePaths)) {
|
||||
if (rawPath.startsWith("-F"))
|
||||
frameworkPaths << baseDir.resolvePath(rawPath.mid(2));
|
||||
frameworkPaths << rawPath.mid(2);
|
||||
else
|
||||
normalPaths << baseDir.resolvePath(rawPath);
|
||||
normalPaths << rawPath;
|
||||
}
|
||||
m_projectIncludePaths = toUserHeaderPaths(normalPaths);
|
||||
m_projectIncludePaths << toFrameworkHeaderPaths(frameworkPaths);
|
||||
const auto expandedPaths = [this](const QStringList &paths) {
|
||||
return Utils::transform(processEntries(paths), [](const auto &pair) {
|
||||
return pair.first;
|
||||
});
|
||||
};
|
||||
m_projectIncludePaths = toUserHeaderPaths(expandedPaths(normalPaths));
|
||||
m_projectIncludePaths << toFrameworkHeaderPaths(expandedPaths(frameworkPaths));
|
||||
m_cxxflags = readFlags(m_cxxflagsFileName);
|
||||
m_cflags = readFlags(m_cflagsFileName);
|
||||
}
|
||||
|
Reference in New Issue
Block a user