diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp index 4cffc351277..e0771d9468b 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp @@ -125,7 +125,12 @@ IProjectManager *AutotoolsProject::projectManager() const QString AutotoolsProject::defaultBuildDirectory() const { - return projectDirectory(); + return defaultBuildDirectory(projectFilePath()); +} + +QString AutotoolsProject::defaultBuildDirectory(const QString &projectPath) +{ + return QFileInfo(projectPath).absolutePath(); } ProjectNode *AutotoolsProject::rootProjectNode() const diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.h b/src/plugins/autotoolsprojectmanager/autotoolsproject.h index 9da7c6a1dd9..a39de5522bc 100644 --- a/src/plugins/autotoolsprojectmanager/autotoolsproject.h +++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.h @@ -77,6 +77,7 @@ public: ProjectExplorer::ProjectNode *rootProjectNode() const; QStringList files(FilesMode fileMode) const; QString defaultBuildDirectory() const; + static QString defaultBuildDirectory(const QString &projectPath); QStringList buildTargets() const; protected: