summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallProgramsCommand.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-05-13 13:44:37 (GMT)
committerAlex Neundorf <neundorf@kde.org>2012-05-14 20:19:12 (GMT)
commit7ced0732e875ab7cf4797ef33bd4b897bc41eb53 (patch)
tree8686f60bb78535f916ba5dfeec553cc9b2095cef /Source/cmInstallProgramsCommand.cxx
parentb6fba35411053e334072a1203493140c67f3d30a (diff)
downloadCMake-7ced0732e875ab7cf4797ef33bd4b897bc41eb53.zip
CMake-7ced0732e875ab7cf4797ef33bd4b897bc41eb53.tar.gz
CMake-7ced0732e875ab7cf4797ef33bd4b897bc41eb53.tar.bz2
make default install component name configurable
Until now an unnamed component was always named "Unspecified". Now this name is taken from the new cmake variable CMAKE_INSTALL_DEFAULT_COMPONENT_NAME, which is initialized to "Unspecified". But it can now be set to something project-specific, per directory Alex
Diffstat (limited to 'Source/cmInstallProgramsCommand.cxx')
-rw-r--r--Source/cmInstallProgramsCommand.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmInstallProgramsCommand.cxx b/Source/cmInstallProgramsCommand.cxx
index 61ac741..3a0a322 100644
--- a/Source/cmInstallProgramsCommand.cxx
+++ b/Source/cmInstallProgramsCommand.cxx
@@ -34,7 +34,8 @@ bool cmInstallProgramsCommand
}
this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
- ->AddInstallComponent("Unspecified");
+ ->AddInstallComponent(this->Makefile->GetSafeDefinition(
+ "CMAKE_INSTALL_DEFAULT_COMPONENT_NAME"));
return true;
}
@@ -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));
}
/**