summaryrefslogtreecommitdiffstats
path: root/Source/MFCDialog/CMakeSetupDialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/MFCDialog/CMakeSetupDialog.cpp')
-rw-r--r--Source/MFCDialog/CMakeSetupDialog.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/Source/MFCDialog/CMakeSetupDialog.cpp b/Source/MFCDialog/CMakeSetupDialog.cpp
index 0775857..2a01d2c 100644
--- a/Source/MFCDialog/CMakeSetupDialog.cpp
+++ b/Source/MFCDialog/CMakeSetupDialog.cpp
@@ -6,7 +6,7 @@
#include "CMakeSetupDialog.h"
#include "../cmDSWMakefile.h"
#include "../cmWindowsConfigure.h"
-
+#include "../cmMSProjectGenerator.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
@@ -269,19 +269,21 @@ void CMakeSetupDialog::OnOK()
}
- cmDSWMakefile builder;
- // Set the ITK home directory
- builder.SetHomeDirectory(m_WhereSource);
- // Set the CMakeLists.txt file
- CString makefileIn = m_WhereSource;
- makefileIn += "/CMakeLists.txt";
- builder.ReadMakefile(makefileIn);
+ cmMakefile mf;
+ mf.SetMakefileGenerator(new cmMSProjectGenerator);
+ mf.SetHomeDirectory(m_WhereSource);
+
// Set the output directory
- builder.SetOutputDirectory(m_WhereBuild);
+ mf.SetOutputDirectory(m_WhereBuild);
// set the directory which contains the CMakeLists.txt
- builder.SetCurrentDirectory(m_WhereSource);
+ mf.SetCurrentDirectory(m_WhereSource);
// Create the master DSW file and all children dsp files for ITK
- builder.OutputDSWFile();
+ // Set the CMakeLists.txt file
+ CString makefileIn = m_WhereSource;
+ makefileIn += "/CMakeLists.txt";
+ mf.ReadMakefile(makefileIn);
+ // Move this to the cache editor
+ mf.GenerateMakefile();
CDialog::OnOK();
this->SaveToRegistry();
}