diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio8Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio8Generator.cxx | 55 |
1 files changed, 54 insertions, 1 deletions
diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 17f1c37..7aad9b2 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -16,11 +16,64 @@ #include "cmake.h" #include "cmGeneratedFileStream.h" +static const char vs8Win32generatorName[] = "Visual Studio 8 2005"; +static const char vs8Win64generatorName[] = "Visual Studio 8 2005 Win64"; + +class cmGlobalVisualStudio8Generator::Factory + : public cmGlobalGeneratorFactory +{ +public: + virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const { + if(!strcmp(name, vs8Win32generatorName)) + { + return new cmGlobalVisualStudio8Generator( + vs8Win32generatorName, NULL, NULL); + } + if(!strcmp(name, vs8Win64generatorName)) + { + return new cmGlobalVisualStudio8Generator( + vs8Win64generatorName, "x64", "CMAKE_FORCE_WIN64"); + } + return 0; + } + + virtual void GetDocumentation(cmDocumentationEntry& entry) const { + entry.Name = "Visual Studio 8 2005"; + entry.Brief = "Generates Visual Studio 8 2005 project files."; + entry.Full = + "It is possible to append a space followed by the platform name " + "to create project files for a specific target platform. E.g. " + "\"Visual Studio 8 2005 Win64\" will create project files for " + "the x64 processor."; + } + + virtual void GetGenerators(std::vector<std::string>& names) const { + names.push_back(vs8Win32generatorName); + names.push_back(vs8Win64generatorName); } +}; + +//---------------------------------------------------------------------------- +cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory() +{ + return new Factory; +} + //---------------------------------------------------------------------------- -cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator() +cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator( + const char* name, const char* architectureId, + const char* additionalPlatformDefinition) { this->FindMakeProgramFile = "CMakeVS8FindMake.cmake"; this->ProjectConfigurationSectionName = "ProjectConfigurationPlatforms"; + this->Name = name; + if (architectureId) + { + this->ArchitectureId = architectureId; + } + if (additionalPlatformDefinition) + { + this->AdditionalPlatformDefinition = additionalPlatformDefinition; + } } //---------------------------------------------------------------------------- |