summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallProgramsCommand.cxx
diff options
context:
space:
mode:
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 7e6c9ce..3a0a322 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -31,26 +31,27 @@ bool cmInstallProgramsCommand
for (++s;s != args.end(); ++s)
{
this->FinalArgs.push_back(*s);
- }
-
+ }
+
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
- ->AddInstallComponent("Unspecified");
+ ->AddInstallComponent(this->Makefile->GetSafeDefinition(
+ "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
return true;
}
-void cmInstallProgramsCommand::FinalPass()
+void cmInstallProgramsCommand::FinalPass()
{
bool files_mode = false;
if(!this->FinalArgs.empty() && this->FinalArgs[0] == "FILES")
{
files_mode = true;
}
-
+
// two different options
if (this->FinalArgs.size() > 1 || files_mode)
{
- // for each argument, get the programs
+ // for each argument, get the programs
std::vector<std::string>::iterator s = this->FinalArgs.begin();
if(files_mode)
{
@@ -68,9 +69,9 @@ void cmInstallProgramsCommand::FinalPass()
std::vector<std::string> programs;
cmSystemTools::Glob(this->Makefile->GetCurrentDirectory(),
this->FinalArgs[0].c_str(), programs);
-
+
std::vector<std::string>::iterator s = programs.begin();
- // for each argument, get the programs
+ // for each argument, get the programs
for (;s != programs.end(); ++s)
{
this->Files.push_back(this->FindInstallSource(s->c_str()));
@@ -89,13 +90,14 @@ void cmInstallProgramsCommand::FinalPass()
// Use a file install generator.
const char* no_permissions = "";
const char* no_rename = "";
- const char* no_component = "Unspecified";
+ std::string no_component = this->Makefile->GetSafeDefinition(
+ "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME");
std::vector<std::string> no_configurations;
this->Makefile->AddInstallGenerator(
new cmInstallFilesGenerator(this->Files,
destination.c_str(), true,
no_permissions, no_configurations,
- no_component, no_rename));
+ no_component.c_str(), no_rename));
}
/**
@@ -112,7 +114,7 @@ std::string cmInstallProgramsCommand
// This is a full path.
return name;
}
-
+
// This is a relative path.
std::string tb = this->Makefile->GetCurrentOutputDirectory();
tb += "/";
@@ -120,7 +122,7 @@ std::string cmInstallProgramsCommand
std::string ts = this->Makefile->GetCurrentDirectory();
ts += "/";
ts += name;
-
+
if(cmSystemTools::FileExists(tb.c_str()))
{
// The file exists in the binary tree. Use it.