| 639 | } |
| 640 | |
| 641 | std::string cmCPackIFWGenerator::GetComponentPackageName( |
| 642 | cmCPackComponent* component) const |
| 643 | { |
| 644 | std::string name; |
| 645 | if (!component) { |
| 646 | return name; |
| 647 | } |
| 648 | if (cmCPackIFWPackage* package = this->GetComponentPackage(component)) { |
| 649 | return package->Name; |
| 650 | } |
| 651 | std::string prefix = "CPACK_IFW_COMPONENT_" + |
| 652 | cmsys::SystemTools::UpperCase(component->Name) + "_"; |
| 653 | cmValue option = this->GetOption(prefix + "NAME"); |
| 654 | name = option ? *option : component->Name; |
| 655 | if (component->Group) { |
| 656 | cmCPackIFWPackage* package = this->GetGroupPackage(component->Group); |
| 657 | if ((this->componentPackageMethod == |
| 658 | cmCPackGenerator::ONE_PACKAGE_PER_GROUP) || |
| 659 | this->IsOn(prefix + "COMMON")) { |
| 660 | return package->Name; |
| 661 | } |
| 662 | bool dot = !this->ResolveDuplicateNames; |
| 663 | if (dot && !cmHasPrefix(name, package->Name)) { |
| 664 | name = package->Name + "." + name; |
| 665 | } |
| 666 | } |
| 667 | return name; |
| 668 | } |
| 669 | |
| 670 | cmCPackIFWPackage* cmCPackIFWGenerator::GetGroupPackage( |
| 671 | cmCPackComponentGroup* group) const |
no test coverage detected