summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index a6cd1ed..c089ed6 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -14,6 +14,13 @@
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
+// include these first, otherwise there will be problems on Windows
+// with GetCurrentDirectory() being redefined
+#ifdef CMAKE_BUILD_WITH_CMAKE
+#include "cmDynamicLoader.h"
+#include "cmDocumentation.h"
+#endif
+
#include "cmake.h"
#include "cmCacheManager.h"
#include "cmListFileCache.h"
@@ -24,9 +31,6 @@
#include "cmMakefile.h"
#ifdef CMAKE_BUILD_WITH_CMAKE
-#include "cmDynamicLoader.h"
-#include "cmDocumentation.h"
-
//----------------------------------------------------------------------------
static const cmDocumentationEntry cmDocumentationName[] =
{