diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-14 18:05:40 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2004-09-14 18:05:40 (GMT) |
commit | 32fe8caaefba6d0ec8ea183ec87cedad29a660c0 (patch) | |
tree | 6f5f7d23badfe43db3d4870ea0ccf611d989f77d /Source/cmGlobalVisualStudio7Generator.cxx | |
parent | c30e7771ee3678adad173903458d71972d77c1e7 (diff) | |
download | CMake-32fe8caaefba6d0ec8ea183ec87cedad29a660c0.zip CMake-32fe8caaefba6d0ec8ea183ec87cedad29a660c0.tar.gz CMake-32fe8caaefba6d0ec8ea183ec87cedad29a660c0.tar.bz2 |
bug fixes for external projects
Diffstat (limited to 'Source/cmGlobalVisualStudio7Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio7Generator.cxx | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 97fef56..cda991b 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -477,8 +477,16 @@ 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) - && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) + if (strncmp(l->first.c_str(), "INCLUDE_EXTERNAL_MSPROJECT", 26) == 0) + { + cmCustomCommand cc = l->second.GetPostBuildCommands()[0]; + // dodgy use of the cmCustomCommand's members to store the + // arguments from the INCLUDE_EXTERNAL_MSPROJECT command + std::vector<std::string> stuff = cc.GetDepends(); + this->WriteProjectConfigurations(fout, stuff[0].c_str(), l->second.IsInAll()); + } + else if ((l->second.GetType() != cmTarget::INSTALL_FILES) + && (l->second.GetType() != cmTarget::INSTALL_PROGRAMS)) { this->WriteProjectDepends(fout, si->c_str(), dir.c_str(),l->second); ++si; @@ -614,13 +622,33 @@ cmGlobalVisualStudio7Generator::WriteProjectConfigurations(std::ostream& fout, void cmGlobalVisualStudio7Generator::WriteExternalProject(std::ostream& fout, const char* name, const char* location, - const std::vector<std::string>& ) + const std::vector<std::string>& depends) { std::string d = cmSystemTools::ConvertToOutputPath(location); fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \"" << name << "\", \"" << d << "\", \"{" - << this->GetGUID(name) << "}\"\nEndProject\n"; + << this->GetGUID(name) + << "}\"\n"; + + if(!depends.empty()) + { + fout << "\tProjectSection(ProjectDependencies) = postProject\n"; + std::vector<std::string>::const_iterator it; + for(it = depends.begin(); it != depends.end(); ++it) + { + if(it->size() > 0) + { + fout << "\t\t{" + << this->GetGUID(it->c_str()) + << "} = {" + << this->GetGUID(it->c_str()) + << "}\n"; + } + } + fout << "\tEndProjectSection\n"; + } + fout << "EndProject\n"; } |