summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-18 14:19:33 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-07-18 14:19:33 (GMT)
commit27244a1fdef646ea791e28119cefc57c4c967564 (patch)
tree6ed62309ee34fb3e01646a301acf9939c4414b7b /Source
parent0044ce71bce5e9329356d0cb6bc67ea30142b9b2 (diff)
downloadCMake-27244a1fdef646ea791e28119cefc57c4c967564.zip
CMake-27244a1fdef646ea791e28119cefc57c4c967564.tar.gz
CMake-27244a1fdef646ea791e28119cefc57c4c967564.tar.bz2
ENH: build codeblocks generator also on Windows
Alex
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt9
-rw-r--r--Source/cmExtraCodeBlocksGenerator.cxx12
-rw-r--r--Source/cmake.cxx21
3 files changed, 28 insertions, 14 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 574e69d..915097e 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -173,10 +173,13 @@ SET(SRCS
# Kdevelop only works on UNIX and not windows
IF(UNIX)
- SET(SRCS ${SRCS}
- cmGlobalKdevelopGenerator.cxx
- cmExtraCodeBlocksGenerator.cxx)
+ SET(SRCS ${SRCS} cmGlobalKdevelopGenerator.cxx)
ENDIF(UNIX)
+
+IF(NOT CYGWIN)
+ SET(SRCS ${SRCS} cmExtraCodeBlocksGenerator.cxx)
+ENDIF(NOT CYGWIN)
+
# XCode only works on apple
IF(APPLE)
SET(SRCS ${SRCS}
diff --git a/Source/cmExtraCodeBlocksGenerator.cxx b/Source/cmExtraCodeBlocksGenerator.cxx
index f2f0085..945d72a 100644
--- a/Source/cmExtraCodeBlocksGenerator.cxx
+++ b/Source/cmExtraCodeBlocksGenerator.cxx
@@ -37,15 +37,19 @@ void cmExtraCodeBlocksGenerator
"Project files for CodeBlocks will be created in the top directory "
"and in every subdirectory which features a CMakeLists.txt file "
"containing a PROJECT() call. "
- "Additionally a hierarchy of UNIX makefiles is generated into the "
- "build tree. Any "
- "standard UNIX-style make program can build the project through the "
- "default make target. A \"make install\" target is also provided.";
+ "Additionally a hierarchy of makefiles is generated into the "
+ "build tree. The appropriate make program can build the project through "
+ "the default make target. A \"make install\" target is also provided.";
}
cmExtraCodeBlocksGenerator::cmExtraCodeBlocksGenerator()
:cmExternalMakefileProjectGenerator()
{
+#if defined(_WIN32)
+ this->SupportedGlobalGenerators.push_back("NMake Makefiles");
+ this->SupportedGlobalGenerators.push_back("MSYS Makefiles");
+ this->SupportedGlobalGenerators.push_back("MinGW Makefiles");
+#endif
this->SupportedGlobalGenerators.push_back("Unix Makefiles");
}
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 49ce652..2746c38 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -70,9 +70,12 @@
#endif
#include "cmGlobalUnixMakefileGenerator3.h"
+#if !defined(__CYGWIN__) && !defined(CMAKE_BOOT_MINGW)
+# include "cmExtraCodeBlocksGenerator.h"
+#endif
+
#ifdef CMAKE_USE_KDEVELOP
# include "cmGlobalKdevelopGenerator.h"
-# include "cmExtraCodeBlocksGenerator.h"
#endif
#include <stdlib.h> // required for atoi
@@ -1472,15 +1475,17 @@ void cmake::AddExtraGenerator(const char* name,
void cmake::AddDefaultExtraGenerators()
{
+#if defined(CMAKE_BUILD_WITH_CMAKE)
#if defined(_WIN32) && !defined(__CYGWIN__)
-# if !defined(CMAKE_BOOT_MINGW)
- // e.g. codeblocks, kdevelop4 ?
-# endif
+ // e.g. kdevelop4 ?
#endif
-// e.g. eclipse ?
-#ifdef CMAKE_USE_KDEVELOP
- this->AddExtraGenerator(cmExtraCodeBlocksGenerator::GetActualName(),
+
+#if !defined(__CYGWIN__)
+ this->AddExtraGenerator(cmExtraCodeBlocksGenerator::GetActualName(),
&cmExtraCodeBlocksGenerator::New);
+#endif
+
+#ifdef CMAKE_USE_KDEVELOP
this->AddExtraGenerator(cmGlobalKdevelopGenerator::GetActualName(),
&cmGlobalKdevelopGenerator::New);
// for kdevelop also add the generator with just the name of the
@@ -1488,6 +1493,8 @@ void cmake::AddDefaultExtraGenerators()
this->ExtraGenerators[cmGlobalKdevelopGenerator::GetActualName()]
= &cmGlobalKdevelopGenerator::New;
#endif
+
+#endif
}