| 730 | } |
| 731 | |
| 732 | std::string cmCPackDragNDropGenerator::GetComponentInstallSuffix( |
| 733 | std::string const& componentName) |
| 734 | { |
| 735 | // we want to group components together that go in the same dmg package |
| 736 | std::string package_file_name = this->GetOption("CPACK_PACKAGE_FILE_NAME"); |
| 737 | |
| 738 | // we have 3 mutually exclusive modes to work in |
| 739 | // 1. all components in one package |
| 740 | // 2. each group goes in its own package with left over |
| 741 | // components in their own package |
| 742 | // 3. ignore groups - if grouping is defined, it is ignored |
| 743 | // and each component goes in its own package |
| 744 | |
| 745 | if (this->componentPackageMethod == ONE_PACKAGE) { |
| 746 | return "ALL_IN_ONE"; |
| 747 | } |
| 748 | |
| 749 | if (this->componentPackageMethod == ONE_PACKAGE_PER_GROUP) { |
| 750 | // We have to find the name of the COMPONENT GROUP |
| 751 | // the current COMPONENT belongs to. |
| 752 | std::string groupVar = cmStrCat( |
| 753 | "CPACK_COMPONENT_", cmSystemTools::UpperCase(componentName), "_GROUP"); |
| 754 | cmValue _groupName = this->GetOption(groupVar); |
| 755 | if (_groupName) { |
| 756 | std::string groupName = _groupName; |
| 757 | |
| 758 | groupName = |
| 759 | GetComponentPackageFileName(package_file_name, groupName, true); |
| 760 | return groupName; |
| 761 | } |
| 762 | } |
| 763 | |
| 764 | std::string componentFileName = cmStrCat( |
| 765 | "CPACK_DMG_", cmSystemTools::UpperCase(componentName), "_FILE_NAME"); |
| 766 | if (cmValue v = this->GetOptionIfSet(componentFileName)) { |
| 767 | return *v; |
| 768 | } |
| 769 | return GetComponentPackageFileName(package_file_name, componentName, false); |
| 770 | } |
| 771 | |
| 772 | std::string cmCPackDragNDropGenerator::GetComponentInstallDirNameSuffix( |
| 773 | std::string const& componentName) |
no test coverage detected