BUG: fix VSExternal for visual studio 6

This commit is contained in:
Ken Martin 2004-09-16 10:48:10 -04:00
parent a2c19a4d46
commit cf7893b934
2 changed files with 10 additions and 4 deletions

View File

@ -477,9 +477,9 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
const char* cacheValue const char* cacheValue
= m_CMakeInstance->GetCacheDefinition(libPath.c_str()); = m_CMakeInstance->GetCacheDefinition(libPath.c_str());
if(cacheValue && *cacheValue) if(cacheValue && *cacheValue)
{ {
fout << "Begin Project Dependency\n"; fout << "Begin Project Dependency\n";
fout << "Project_Dep_Name " << j->first << "\n"; fout << "Project_Dep_Name " << j->first.c_str() << "\n";
fout << "End Project Dependency\n"; fout << "End Project Dependency\n";
} }
} }
@ -494,8 +494,14 @@ void cmGlobalVisualStudio6Generator::WriteProject(std::ostream& fout,
{ {
if(*i != dspname) if(*i != dspname)
{ {
std::string depName = *i;
if(strncmp(depName.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
{
depName.erase(depName.begin(), depName.begin() + 27);
}
fout << "Begin Project Dependency\n"; fout << "Begin Project Dependency\n";
fout << "Project_Dep_Name " << *i << "\n"; fout << "Project_Dep_Name " << depName << "\n";
fout << "End Project Dependency\n"; fout << "End Project Dependency\n";
} }
} }

View File

@ -1,7 +1,7 @@
PROJECT(VSExternalInclude) PROJECT(VSExternalInclude)
IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") IF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
SET(PROJECT_EXT dps) SET(PROJECT_EXT dsp)
ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") ELSE(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")
SET(PROJECT_EXT vcproj) SET(PROJECT_EXT vcproj)
ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6") ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio 6")