summaryrefslogtreecommitdiffstats
path: root/Source/QtDialog/QCMake.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/QtDialog/QCMake.cxx')
-rw-r--r--Source/QtDialog/QCMake.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx
index 8d63f6d..9a87416 100644
--- a/Source/QtDialog/QCMake.cxx
+++ b/Source/QtDialog/QCMake.cxx
@@ -238,10 +238,16 @@ void QCMake::configure()
#ifdef Q_OS_WIN
UINT lastErrorMode = SetErrorMode(0);
#endif
-
- this->CMakeInstance->SetHomeDirectory(this->SourceDirectory.toStdString());
+ // Apply the same transformations that the command-line invocation does
+ auto sanitizePath = [](QString const& value) -> std::string {
+ std::string path = cmSystemTools::CollapseFullPath(value.toStdString());
+ cmSystemTools::ConvertToUnixSlashes(path);
+ return path;
+ };
+
+ this->CMakeInstance->SetHomeDirectory(sanitizePath(this->SourceDirectory));
this->CMakeInstance->SetHomeOutputDirectory(
- this->BinaryDirectory.toStdString());
+ sanitizePath(this->BinaryDirectory));
this->CMakeInstance->SetGlobalGenerator(
this->CMakeInstance->CreateGlobalGenerator(
this->Generator.toStdString()));