BUG: Tweak VS8 generator to keep VS8 happy. The .vcproj files need their own GUIDs in a ProjectGUID attribute. The top level .sln file needs a special comment at the top to allow it to be opened with double-click in explorer.

This commit is contained in:
Brad King 2005-11-22 13:37:42 -05:00
parent abebb974aa
commit d952f68738
3 changed files with 12 additions and 4 deletions

View File

@ -74,13 +74,14 @@ public:
*/
std::vector<std::string> *GetConfigurations();
///! Create a GUID
///! Create a GUID or get an existing one.
void CreateGUID(const char* name);
std::string GetGUID(const char* name);
///! do configure step
virtual void Configure();
protected:
std::string GetGUID(const char* name);
virtual void OutputSLNFile(cmLocalGenerator* root,
std::vector<cmLocalGenerator*>& generators);
virtual void WriteSLNFile(std::ostream& fout, cmLocalGenerator* root,

View File

@ -43,6 +43,7 @@ cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator()
void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout)
{
fout << "Microsoft Visual Studio Solution File, Format Version 9.00\n";
fout << "# Visual Studio 2005\n";
}
//----------------------------------------------------------------------------

View File

@ -1352,8 +1352,14 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout,
{
keyword = "Win32Proj";
}
fout << "\tName=\"" << projLabel << "\"\n"
<< "\tSccProjectName=\"\"\n"
cmGlobalVisualStudio7Generator* gg =
static_cast<cmGlobalVisualStudio7Generator *>(m_GlobalGenerator);
fout << "\tName=\"" << projLabel << "\"\n";
if(m_Version == 8)
{
fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n";
}
fout << "\tSccProjectName=\"\"\n"
<< "\tSccLocalPath=\"\"\n"
<< "\tKeyword=\"" << keyword << "\">\n"
<< "\t<Platforms>\n"