|
|
@@ -130,6 +130,7 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
|
|
|
if ((l->second.GetType() != cmTarget::INSTALL_FILES)
|
|
|
&& (l->second.GetType() != cmTarget::INSTALL_PROGRAMS))
|
|
|
{
|
|
|
+ const char* extra_depend = 0;
|
|
|
bool skip = false;
|
|
|
if(l->first == "ALL_BUILD" )
|
|
|
{
|
|
|
@@ -152,6 +153,15 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
|
|
|
{
|
|
|
doneInstall = true;
|
|
|
}
|
|
|
+ // Make the INSTALL target depend on ALL_BUILD unless the
|
|
|
+ // project says to not do so.
|
|
|
+ const char* noall =
|
|
|
+ root->GetMakefile()
|
|
|
+ ->GetDefinition("CMAKE_SKIP_INSTALL_ALL_DEPENDENCY");
|
|
|
+ if(!noall || cmSystemTools::IsOff(noall))
|
|
|
+ {
|
|
|
+ extra_depend = "ALL_BUILD";
|
|
|
+ }
|
|
|
}
|
|
|
if(l->first == "RUN_TESTS")
|
|
|
{
|
|
|
@@ -166,7 +176,8 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(std::ostream& fout,
|
|
|
}
|
|
|
if(!skip)
|
|
|
{
|
|
|
- this->WriteProject(fout, si->c_str(), dir.c_str(),l->second);
|
|
|
+ this->WriteProject(fout, si->c_str(), dir.c_str(),l->second,
|
|
|
+ extra_depend);
|
|
|
}
|
|
|
++si;
|
|
|
}
|
|
|
@@ -225,10 +236,12 @@ void cmGlobalVisualStudio71Generator::WriteSLNFile(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 cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
|
|
- const char* dspname,
|
|
|
- const char* dir,
|
|
|
- const cmTarget& t)
|
|
|
+void
|
|
|
+cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
|
|
+ const char* dspname,
|
|
|
+ const char* dir,
|
|
|
+ const cmTarget& t,
|
|
|
+ const char* extra_depend)
|
|
|
{
|
|
|
std::string d = cmSystemTools::ConvertToOutputPath(dir);
|
|
|
fout << "Project(\"{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}\") = \""
|
|
|
@@ -236,7 +249,7 @@ void cmGlobalVisualStudio71Generator::WriteProject(std::ostream& fout,
|
|
|
<< d << "\\" << dspname << ".vcproj\", \"{"
|
|
|
<< this->GetGUID(dspname) << "}\"\n";
|
|
|
fout << "\tProjectSection(ProjectDependencies) = postProject\n";
|
|
|
- this->WriteProjectDepends(fout, dspname, dir, t);
|
|
|
+ this->WriteProjectDepends(fout, dspname, dir, t, extra_depend);
|
|
|
fout << "\tEndProjectSection\n";
|
|
|
|
|
|
fout <<"EndProject\n";
|
|
|
@@ -247,11 +260,13 @@ void cmGlobalVisualStudio71Generator::WriteProject(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 cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
|
|
|
- const char* dspname,
|
|
|
- const char* ,
|
|
|
- const cmTarget& target
|
|
|
- )
|
|
|
+void
|
|
|
+cmGlobalVisualStudio71Generator
|
|
|
+::WriteProjectDepends(std::ostream& fout,
|
|
|
+ const char* dspname,
|
|
|
+ const char*,
|
|
|
+ const cmTarget& target,
|
|
|
+ const char* extra_depend)
|
|
|
{
|
|
|
// insert Begin Project Dependency Project_Dep_Name project stuff here
|
|
|
if (target.GetType() != cmTarget::STATIC_LIBRARY)
|
|
|
@@ -276,6 +291,13 @@ void cmGlobalVisualStudio71Generator::WriteProjectDepends(std::ostream& fout,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // Add the extra dependency if requested.
|
|
|
+ if(extra_depend)
|
|
|
+ {
|
|
|
+ fout << "\t\t{" << this->GetGUID(extra_depend) << "} = {"
|
|
|
+ << this->GetGUID(extra_depend) << "}\n";
|
|
|
+ }
|
|
|
+
|
|
|
std::set<cmStdString>::const_iterator i, end;
|
|
|
// write utility dependencies.
|
|
|
i = target.GetUtilities().begin();
|