summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio7Generator.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-14 20:58:13 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-14 20:58:13 (GMT)
commit7fa36510d5b246a9c5be5918f5f60fc377f77d00 (patch)
tree31571e5cc6ff9619132570b2bdb92c768638835f /Source/cmGlobalVisualStudio7Generator.cxx
parent6c5b67981e26efd9816ee42393bbafce4c354142 (diff)
downloadCMake-7fa36510d5b246a9c5be5918f5f60fc377f77d00.zip
CMake-7fa36510d5b246a9c5be5918f5f60fc377f77d00.tar.gz
CMake-7fa36510d5b246a9c5be5918f5f60fc377f77d00.tar.bz2
BUG: fix external projects for vc7
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio7Generator.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx
index 9feb3b8..3086987 100644
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -379,7 +379,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
// Write the project into the SLN file
if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0)
{
- cmCustomCommand cc = l->second.GetPreLinkCommands()[0];
+ cmCustomCommand cc = l->second.GetPostBuildCommands()[0];
// dodgy use of the cmCustomCommand's members to store the
// arguments from the INCLUDE_EXTERNAL_MSPROJECT command
@@ -455,7 +455,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
cmTargets::iterator l = tgts.begin();
std::string dir = mf->GetStartDirectory();
for(std::vector<std::string>::iterator si = dspnames.begin();
- l != tgts.end(); ++l)
+ l != tgts.end() && si != dspnames.end(); ++l)
{
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
@@ -482,7 +482,7 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout,
cmTargets::iterator l = tgts.begin();
std::string dir = mf->GetStartDirectory();
for(std::vector<std::string>::iterator si = dspnames.begin();
- l != tgts.end(); ++l)
+ l != tgts.end() && si != dspnames.end(); ++l)
{
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
@@ -591,12 +591,16 @@ cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout,
// Write a dsp file into the SLN file,
// Note, that dependencies from executables to
// the libraries it uses are also done here
-void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& ,
- const char* ,
- const char* ,
+void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout,
+ const char* name,
+ const char* location,
const std::vector<std::string>& )
-{
- cmSystemTools::Error("WriteExternalProject not implemented for Visual Studio 7");
+{
+ std::string d = cmSystemTools::ConvertToOutputPath(location);
+ fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
+ << name << "\", \""
+ << d << "\", \"{"
+ << this->CreateGUID(name) << "}\"\nEndProject\n";
}