ENH: Do not generate install target unless some INSTALL or INSTALL_* commands have been used. This addresses bug#2827.

This commit is contained in:
Brad King
2006-08-31 10:47:00 -04:00
parent 8ffb32369f
commit 239fce5caa
6 changed files with 82 additions and 52 deletions

View File

@@ -26,6 +26,10 @@ bool cmInstallProgramsCommand
return false;
}
// Enable the install target.
this->Makefile->GetLocalGenerator()
->GetGlobalGenerator()->EnableInstallTarget();
// Create an INSTALL_PROGRAMS target specifically for this path.
this->TargetName = "INSTALL_PROGRAMS_"+args[0];
cmTarget& target = this->Makefile->GetTargets()[this->TargetName];