diff options
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.cxx | 25 | ||||
-rw-r--r-- | Source/CPack/cmCPackDragNDropGenerator.h | 3 |
2 files changed, 19 insertions, 9 deletions
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx index f0763be..83b6b64 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.cxx +++ b/Source/CPack/cmCPackDragNDropGenerator.cxx @@ -128,7 +128,9 @@ int cmCPackDragNDropGenerator::PackageFiles() package_files.push_back(name); } std::sort(package_files.begin(), package_files.end()); - package_files.erase(std::unique(package_files.begin(), package_files.end()), package_files.end()); + package_files.erase(std::unique(package_files.begin(), + package_files.end()), + package_files.end()); // loop to create dmg files @@ -208,10 +210,11 @@ bool cmCPackDragNDropGenerator::RunCommand(cmOStringStream& command, } //---------------------------------------------------------------------- -int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, const std::string& output_file) +int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir, + const std::string& output_file) { // Get optional arguments ... - const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") + const std::string cpack_package_icon = this->GetOption("CPACK_PACKAGE_ICON") ? this->GetOption("CPACK_PACKAGE_ICON") : ""; const std::string cpack_dmg_volume_name = @@ -540,15 +543,19 @@ bool cmCPackDragNDropGenerator::SupportsComponentInstallation() const return true; } -std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(const std::string& componentName) +std::string +cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix( + const std::string& componentName) { // we want to group components together that go in the same dmg package std::string package_file_name = this->GetOption("CPACK_PACKAGE_FILE_NAME"); // we have 3 mutually exclusive modes to work in // 1. all components in one package - // 2. each group goes in its own package with left over components in their own package - // 3. ignore groups - if grouping is defined, it is ignored and each component goes in its own package + // 2. each group goes in its own package with left over + // components in their own package + // 3. ignore groups - if grouping is defined, it is ignored + // and each component goes in its own package if(this->componentPackageMethod == ONE_PACKAGE) { @@ -559,13 +566,15 @@ std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix(const st { // We have to find the name of the COMPONENT GROUP // the current COMPONENT belongs to. - std::string groupVar = "CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP"; + std::string groupVar = "CPACK_COMPONENT_" + + cmSystemTools::UpperCase(componentName) + "_GROUP"; const char* _groupName = GetOption(groupVar.c_str()); if (_groupName) { std::string groupName = _groupName; - groupName = GetComponentPackageFileName(package_file_name, groupName, true); + groupName = GetComponentPackageFileName(package_file_name, + groupName, true); return groupName; } } diff --git a/Source/CPack/cmCPackDragNDropGenerator.h b/Source/CPack/cmCPackDragNDropGenerator.h index 3d05f99..808c618 100644 --- a/Source/CPack/cmCPackDragNDropGenerator.h +++ b/Source/CPack/cmCPackDragNDropGenerator.h @@ -36,7 +36,8 @@ protected: bool CopyFile(cmOStringStream& source, cmOStringStream& target); bool RunCommand(cmOStringStream& command, std::string* output = 0); - std::string GetComponentInstallDirNameSuffix(const std::string& componentName); + std::string + GetComponentInstallDirNameSuffix(const std::string& componentName); int CreateDMG(const std::string& src_dir, const std::string& output_file); |