diff options
Diffstat (limited to 'Source/CPack/cmCPackGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index feda52c..69d9b8c 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -684,7 +684,14 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( if (componentInstall) { tempInstallDirectory += "/"; - tempInstallDirectory += installComponent; + // Some CPack generators would rather chose + // the local installation directory suffix. + // Some (e.g. RPM) use + // one install directory for each component **GROUP** + // instead of the default + // one install directory for each component. + tempInstallDirectory += + GetComponentInstallDirNameSuffix(installComponent); } if (!setDestDir) @@ -873,6 +880,12 @@ int cmCPackGenerator::DoPackage() return 0; } + // Digest Component grouping specification + if ( !this->PrepareGroupingKind() ) + { + return 0; + } + if ( cmSystemTools::IsOn( this->GetOption("CPACK_REMOVE_TOPLEVEL_DIRECTORY")) ) { @@ -1251,11 +1264,11 @@ int cmCPackGenerator::PrepareGroupingKind() cmCPackLogger(cmCPackLog::LOG_VERBOSE, "[" << this->Name << "]" << " requested component grouping = "<< groupingType <<std::endl); - if (groupingType == "ALL_GROUP_IN_ONE") + if (groupingType == "ALL_GROUPS_IN_ONE") { allGroupInOne = true; } - else if (groupingType == "ALL_COMPONENT_IN_ONE") + else if (groupingType == "ALL_COMPONENTS_IN_ONE") { allComponentInOne = true; } @@ -1268,11 +1281,19 @@ int cmCPackGenerator::PrepareGroupingKind() cmCPackLogger(cmCPackLog::LOG_WARNING, "[" << this->Name << "]" << " requested component grouping type <"<< groupingType - << "> UNKNOWN not in (ALL_GROUP_IN_ONE," - "ALL_COMPONENT_IN_ONE,IGNORE)" <<std::endl); + << "> UNKNOWN not in (ALL_GROUPS_IN_ONE," + "ALL_COMPONENTS_IN_ONE,IGNORE)" <<std::endl); } } + cmCPackLogger(cmCPackLog::LOG_VERBOSE, "[" + << this->Name << "]" + << " requested component grouping = (" + << "ALL_GROUPS_IN_ONE=" << allGroupInOne + << ", ALL_COMPONENTS_IN_ONE=" << allComponentInOne + << ", IGNORE_GROUPS=" << ignoreComponentGroup + << ")" + << std::endl); // Some components were defined but NO group // force ignoreGroups if (this->ComponentGroups.empty() && (!this->Components.empty()) @@ -1288,6 +1309,11 @@ int cmCPackGenerator::PrepareGroupingKind() return 1; } +std::string cmCPackGenerator::GetComponentInstallDirNameSuffix( + const std::string& componentName) { + return componentName; +} + //---------------------------------------------------------------------- bool cmCPackGenerator::SupportsComponentInstallation() const { |