forked from qt-creator/qt-creator
CMakePM: Set proper source directory for targets using FOLDER property
The correct source directory needs to be set as file path for the target node. The value of the FOLDER property was seen as a relative path and the <build-directory>/<FOLDER> was used, which was very wrong. Fixes: QTCREATORBUG-32194 Change-Id: I138b99e391b51fe872f75c6e479ccc34c08ff270 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -72,6 +72,7 @@ public:
|
||||
|
||||
void setVisibleAfterAddFileAction(bool visibleAfterAddFileAction);
|
||||
|
||||
using ProjectExplorer::Node::setFilePath;
|
||||
private:
|
||||
QString m_tooltip;
|
||||
Utils::FilePath m_buildDirectory;
|
||||
|
@@ -825,6 +825,9 @@ static void addTargets(FolderNode *root,
|
||||
folderDir, createSourceGroupNode(td.folderTargetProperty, folderDir, root));
|
||||
|
||||
tNode = createTargetNode(folderNodes, folderDir, t.name);
|
||||
|
||||
// Set the correct source directory, not the FOLDER property value
|
||||
tNode->setFilePath(dir);
|
||||
} else {
|
||||
tNode = createTargetNode(cmakeListsNodes, dir, t.name);
|
||||
}
|
||||
|
Reference in New Issue
Block a user