CMakeProjectManager: Fix shadowbuild directory naming

When autocreating the name for a shadowbuild directory
the project directory name should be used instead of
the project file name. Otherwise CMakeLists.txt will be
used instead of the real project name.

Change-Id: If657b1527bfc5345243b8934d25fa4324580bebc
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Benjamin Zeller
2015-03-09 11:54:57 +01:00
parent e2c073f41e
commit d65d84f7b9

View File

@@ -62,7 +62,7 @@ static FileName shadowBuildDirectory(const FileName &projectFilePath, const Kit
if (projectFilePath.isEmpty())
return FileName();
const QString projectName = projectFilePath.fileName();
const QString projectName = projectFilePath.parentDir().fileName();
ProjectMacroExpander expander(projectName, k, bcName);
QDir projectDir = QDir(Project::projectDirectory(projectFilePath).toString());
QString buildPath = expander.expand(Core::DocumentManager::buildDirectory());