summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallProgramsCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-05-23 19:40:12 (GMT)
committerBrad King <brad.king@kitware.com>2007-05-23 19:40:12 (GMT)
commitba7780a3c494f2c2989e9528366c69dafbdccfec (patch)
tree38d791d439b11d6b02b9e3c4f20123b2b9734259 /Source/cmInstallProgramsCommand.cxx
parent303b4312b2c28329a2aecde7d7ddd84137efa1ce (diff)
downloadCMake-ba7780a3c494f2c2989e9528366c69dafbdccfec.zip
CMake-ba7780a3c494f2c2989e9528366c69dafbdccfec.tar.gz
CMake-ba7780a3c494f2c2989e9528366c69dafbdccfec.tar.bz2
ENH: Fixed INSTALL_FILES and INSTALL_PROGRAMS commands to not create targets. No targets of type cmTarget::INSTALL_FILES or cmTarget::INSTALL_PROGRAMS are created, so we do not need to check for them everywhere anymore.
Diffstat (limited to 'Source/cmInstallProgramsCommand.cxx')
-rw-r--r--Source/cmInstallProgramsCommand.cxx26
1 files changed, 14 insertions, 12 deletions
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index 0b320a4..bd137dd 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -30,13 +30,7 @@ bool cmInstallProgramsCommand
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];
- target.SetType(cmTarget::INSTALL_PROGRAMS, this->TargetName.c_str());
- target.SetMakefile(this->Makefile);
- target.SetProperty("EXCLUDE_FROM_ALL","TRUE");
- target.SetInstallPath(args[0].c_str());
+ this->Destination = args[0];
std::vector<std::string>::const_iterator s = args.begin();
for (++s;s != args.end(); ++s)
@@ -49,9 +43,6 @@ bool cmInstallProgramsCommand
void cmInstallProgramsCommand::FinalPass()
{
- std::vector<std::string>& targetSourceLists =
- this->Makefile->GetTargets()[this->TargetName].GetSourceLists();
-
bool files_mode = false;
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
{
@@ -71,7 +62,7 @@ void cmInstallProgramsCommand::FinalPass()
for(;s != this->FinalArgs.end(); ++s)
{
// add to the result
- targetSourceLists.push_back(this->FindInstallSource(s->c_str()));
+ this->Files.push_back(this->FindInstallSource(s->c_str()));
}
}
else // reg exp list
@@ -84,9 +75,20 @@ void cmInstallProgramsCommand::FinalPass()
// for each argument, get the programs
for (;s != programs.end(); ++s)
{
- targetSourceLists.push_back(this->FindInstallSource(s->c_str()));
+ this->Files.push_back(this->FindInstallSource(s->c_str()));
}
}
+
+ // Use a file install generator.
+ const char* no_permissions = "";
+ const char* no_rename = "";
+ const char* no_component = "";
+ std::vector<std::string> no_configurations;
+ this->Makefile->AddInstallGenerator(
+ new cmInstallFilesGenerator(this->Files,
+ this->Destination.c_str(), true,
+ no_permissions, no_configurations,
+ no_component, no_rename));
}
/**