summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio8Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio8Generator.cxx55
1 files changed, 45 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx
index be1bedc..39b31a0 100644
--- a/Source/cmGlobalVisualStudio8Generator.cxx
+++ b/Source/cmGlobalVisualStudio8Generator.cxx
@@ -13,32 +13,57 @@
#include "cmGlobalVisualStudio8Generator.h"
#include "cmLocalVisualStudio7Generator.h"
#include "cmMakefile.h"
+#include "cmVisualStudioWCEPlatformParser.h"
#include "cmake.h"
#include "cmGeneratedFileStream.h"
-static const char vs8Win32generatorName[] = "Visual Studio 8 2005";
-static const char vs8Win64generatorName[] = "Visual Studio 8 2005 Win64";
+static const char vs8generatorName[] = "Visual Studio 8 2005";
class cmGlobalVisualStudio8Generator::Factory
: public cmGlobalGeneratorFactory
{
public:
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const {
- if(!strcmp(name, vs8Win32generatorName))
+ if(strstr(name, vs8generatorName) != name)
+ {
+ return 0;
+ }
+
+ const char* p = name + sizeof(vs8generatorName) - 1;
+ if(p[0] == '\0')
{
return new cmGlobalVisualStudio8Generator(
- vs8Win32generatorName, NULL, NULL);
+ name, NULL, NULL);
+ }
+
+ if(p[0] != ' ')
+ {
+ return 0;
}
- if(!strcmp(name, vs8Win64generatorName))
+
+ ++p;
+
+ if(!strcmp(p, "Win64"))
{
return new cmGlobalVisualStudio8Generator(
- vs8Win64generatorName, "x64", "CMAKE_FORCE_WIN64");
+ name, "x64", "CMAKE_FORCE_WIN64");
}
- return 0;
+
+ cmVisualStudioWCEPlatformParser parser(p);
+ parser.ParseVersion("8.0");
+ if (!parser.Found())
+ {
+ return 0;
+ }
+
+ cmGlobalVisualStudio8Generator* ret = new cmGlobalVisualStudio8Generator(
+ name, parser.GetArchitectureFamily(), NULL);
+ ret->WindowsCEVersion = parser.GetOSVersion();
+ return ret;
}
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
- entry.Name = "Visual Studio 8 2005";
+ entry.Name = vs8generatorName;
entry.Brief = "Generates Visual Studio 8 2005 project files.";
entry.Full =
"It is possible to append a space followed by the platform name "
@@ -48,8 +73,18 @@ public:
}
virtual void GetGenerators(std::vector<std::string>& names) const {
- names.push_back(vs8Win32generatorName);
- names.push_back(vs8Win64generatorName); }
+ names.push_back(vs8generatorName);
+ names.push_back(vs8generatorName + std::string(" Win64"));
+ cmVisualStudioWCEPlatformParser parser;
+ parser.ParseVersion("8.0");
+ const std::vector<std::string>& availablePlatforms =
+ parser.GetAvailablePlatforms();
+ for(std::vector<std::string>::const_iterator i =
+ availablePlatforms.begin(); i != availablePlatforms.end(); ++i)
+ {
+ names.push_back("Visual Studio 8 2005 " + *i);
+ }
+ }
};
//----------------------------------------------------------------------------