CMake: Fix nested source groups

Sometimes source groups would start from the root directory rather than
having the correct folder specified in CMake. This was because the
incorrect path was being used to find the relative path. Forward
baseDirectory to the overrideBaseDir parameter of addNestedNodes() to
guarantee the proper directory is used as the base.

Fixes: QTCREATORBUG-23896
Change-Id: I213c02a3fff3c10e4b6a58211600dd16ac257bbc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Aaron Barany
2020-06-21 01:24:25 -07:00
parent 5dd2985a65
commit e5d9cb3779

View File

@@ -525,7 +525,7 @@ void addCompileGroups(ProjectNode *targetRoot,
FolderNode *insertNode = createSourceGroupNode(td.sourceGroups[i], FolderNode *insertNode = createSourceGroupNode(td.sourceGroups[i],
baseDirectory, baseDirectory,
targetRoot); targetRoot);
insertNode->addNestedNodes(std::move(sourceGroupFileNodes[i])); insertNode->addNestedNodes(std::move(current), baseDirectory);
} }
addCMakeVFolder(targetRoot, addCMakeVFolder(targetRoot,