diff options
author | Greg Fiumara <greg@gregfiumara.com> | 2021-11-16 21:39:34 (GMT) |
---|---|---|
committer | Greg Fiumara <greg@gregfiumara.com> | 2021-11-18 18:01:35 (GMT) |
commit | 7213ceb869bfe50acda93eaeab9f3d928f517cd8 (patch) | |
tree | 56cbbbfd63b4863de08ee5b425eea903da7747af /Source/CPack/cmCPackPKGGenerator.cxx | |
parent | d98b61c68770150e4773ce30eb8145ad487016da (diff) | |
download | CMake-7213ceb869bfe50acda93eaeab9f3d928f517cd8.zip CMake-7213ceb869bfe50acda93eaeab9f3d928f517cd8.tar.gz CMake-7213ceb869bfe50acda93eaeab9f3d928f517cd8.tar.bz2 |
CPack/productbuild: Add option to customize product identifier
This adds a new option, CPACK_PRODUCTBUILD_IDENTIFIER, which allows
for customization of the productbuild product identifier within the
CPack productbuild generator.
Fixes: #20830
Diffstat (limited to 'Source/CPack/cmCPackPKGGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackPKGGenerator.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/CPack/cmCPackPKGGenerator.cxx b/Source/CPack/cmCPackPKGGenerator.cxx index 91adf32..b62fab8 100644 --- a/Source/CPack/cmCPackPKGGenerator.cxx +++ b/Source/CPack/cmCPackPKGGenerator.cxx @@ -210,9 +210,14 @@ void cmCPackPKGGenerator::CreateChoice(const cmCPackComponentGroup& group, void cmCPackPKGGenerator::CreateChoice(const cmCPackComponent& component, cmXMLWriter& xout) { - std::string packageId = - cmStrCat("com.", this->GetOption("CPACK_PACKAGE_VENDOR"), '.', - this->GetOption("CPACK_PACKAGE_NAME"), '.', component.Name); + std::string packageId; + if (cmValue i = this->GetOption("CPACK_PRODUCTBUILD_IDENTIFIER")) { + packageId = cmStrCat(i, '.', component.Name); + } else { + packageId = + cmStrCat("com.", this->GetOption("CPACK_PACKAGE_VENDOR"), '.', + this->GetOption("CPACK_PACKAGE_NAME"), '.', component.Name); + } xout.StartElement("choice"); xout.Attribute("id", component.Name + "Choice"); |