diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-15 17:03:19 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-15 17:03:19 (GMT) |
commit | e192b45f4b8ac8640778422f16023c1fa3e019db (patch) | |
tree | 5b48bc5a5182cd0214e0c6f7cfd4c4682e9667a4 /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | 5001eed8a577f997be5f2ad50e0c8eb0999eb83f (diff) | |
download | CMake-e192b45f4b8ac8640778422f16023c1fa3e019db.zip CMake-e192b45f4b8ac8640778422f16023c1fa3e019db.tar.gz CMake-e192b45f4b8ac8640778422f16023c1fa3e019db.tar.bz2 |
ENH: fix for vs 70 generator
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index e667ede..8f93d0e 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -475,14 +475,9 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, for(std::vector<std::string>::iterator si = dspnames.begin(); l != tgts.end() && si != dspnames.end(); ++l) { - if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) - { - cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; - std::string project = cc.GetCommand(); - this->WriteProjectConfigurations(fout, project.c_str(), l->second.IsInAll()); - } - else if ((l->second.GetType() != cmTarget::INSTALL_FILES) - && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) + if ((l->second.GetType() != cmTarget::INSTALL_FILES) + && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS) + && (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) != 0) ) { this->WriteProjectDepends(fout, si->c_str(), dir.c_str(),l->second); ++si; @@ -508,7 +503,13 @@ void cmGlobalVisualStudio7Generator::WriteSLNFile(std::ostream& fout, for(std::vector<std::string>::iterator si = dspnames.begin(); l != tgts.end() && si != dspnames.end(); ++l) { - if ((l->second.GetType() != cmTarget::INSTALL_FILES) + if(strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; + std::string name = cc.GetCommand(); + this->WriteProjectConfigurations(fout, name.c_str(), l->second.IsInAll()); + } + else if ((l->second.GetType() != cmTarget::INSTALL_FILES) && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) { this->WriteProjectConfigurations(fout, si->c_str(), l->second.IsInAll()); @@ -582,8 +583,19 @@ void cmGlobalVisualStudio7Generator::WriteProjectDepends(std::ostream& fout, { if(*i != dspname) { + std::string name = *i; + if(strncmp(name.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + // kind of weird removing the first 27 letters. + // my recommendatsions: + // use cmCustomCommand::GetCommand() to get the project name + // or get rid of the target name starting with "INCLUDE_EXTERNAL_MSPROJECT_" and use another + // indicator/flag somewhere. These external project names shouldn't conflict with cmake + // target names anyways. + name.erase(name.begin(), name.begin() + 27); + } fout << "\t\t{" << this->GetGUID(dspname) << "}." << depcount << " = {" - << this->GetGUID(i->c_str()) << "}\n"; + << this->GetGUID(name.c_str()) << "}\n"; depcount++; } } |