diff options
author | Brad King <brad.king@kitware.com> | 2017-02-20 15:43:05 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2017-02-20 15:43:05 (GMT) |
commit | 66094d12241417d9a1080c2f059bd053cda6dc82 (patch) | |
tree | b1afcf4e5e6be653dbf359b47c939d963ed2fe0b /Source | |
parent | 5d17b68c675e0d05cd45835f366c62119ec7d7c8 (diff) | |
parent | d32f9debc80e1fc90efb07392f829d998cbbc2c5 (diff) | |
download | CMake-66094d12241417d9a1080c2f059bd053cda6dc82.zip CMake-66094d12241417d9a1080c2f059bd053cda6dc82.tar.gz CMake-66094d12241417d9a1080c2f059bd053cda6dc82.tar.bz2 |
Merge topic 'productbuild_component_plist'
d32f9deb CPack: Add option to specify --component-plist for productbuild
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CPack/cmCPackComponentGroup.h | 4 | ||||
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/CPack/cmCPackProductBuildGenerator.cxx | 4 |
3 files changed, 13 insertions, 0 deletions
diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h index f955daf..510adc2 100644 --- a/Source/CPack/cmCPackComponentGroup.h +++ b/Source/CPack/cmCPackComponentGroup.h @@ -78,6 +78,10 @@ public: /// contains the files that are part of this component. std::string ArchiveFile; + /// The file to pass to --component-plist when using the + /// productbuild generator. + std::string Plist; + /// The components that this component depends on. std::vector<cmCPackComponent*> Dependencies; diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index 21eda79..e1a4a2a 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -1396,6 +1396,11 @@ cmCPackComponent* cmCPackGenerator::GetComponent( component->ArchiveFile = archiveFile; } + const char* plist = this->GetOption(macroPrefix + "_PLIST"); + if (plist && *plist) { + component->Plist = plist; + } + const char* groupName = this->GetOption(macroPrefix + "_GROUP"); if (groupName && *groupName) { component->Group = GetComponentGroup(projectName, groupName); diff --git a/Source/CPack/cmCPackProductBuildGenerator.cxx b/Source/CPack/cmCPackProductBuildGenerator.cxx index 0e93234..1389eaa 100644 --- a/Source/CPack/cmCPackProductBuildGenerator.cxx +++ b/Source/CPack/cmCPackProductBuildGenerator.cxx @@ -236,6 +236,10 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage( : " --keychain \"" + keychainPath + "\"") << " \"" << packageFile << "\""; + if (component && !component->Plist.empty()) { + pkgCmd << " --component-plist \"" << component->Plist << "\""; + } + // Run ProductBuild return RunProductBuild(pkgCmd.str()); } |