[Cmake-commits] CMake branch, next, updated. v3.8.0-rc1-238-g8cf6ac2
Brad King
brad.king at kitware.com
Fri Feb 17 11:42:16 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 8cf6ac2226d23ac78cea34ddfae28e1626d289e1 (commit)
via d32f9debc80e1fc90efb07392f829d998cbbc2c5 (commit)
from 477b3d2aee0dbd793710556ef798e8189cf7bcd5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8cf6ac2226d23ac78cea34ddfae28e1626d289e1
commit 8cf6ac2226d23ac78cea34ddfae28e1626d289e1
Merge: 477b3d2 d32f9de
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 17 11:42:15 2017 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 17 11:42:15 2017 -0500
Merge topic 'productbuild_component_plist' into next
d32f9deb CPack: Add option to specify --component-plist for productbuild
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d32f9debc80e1fc90efb07392f829d998cbbc2c5
commit d32f9debc80e1fc90efb07392f829d998cbbc2c5
Author: Tim Hutt <tim.hutt at ultrahaptics.com>
AuthorDate: Tue Feb 14 13:18:42 2017 +0000
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 17 11:40:45 2017 -0500
CPack: Add option to specify --component-plist for productbuild
When using the productbuild generator this lets you specify the value of
the `--component-plist` parameter when it runs pkgbuild for a component.
Fixes: #16638
diff --git a/Help/release/dev/productbuild_component_plist.rst b/Help/release/dev/productbuild_component_plist.rst
new file mode 100644
index 0000000..78d305c
--- /dev/null
+++ b/Help/release/dev/productbuild_component_plist.rst
@@ -0,0 +1,7 @@
+productbuild_component_plist
+----------------------------
+
+* The :module:`CPackComponent` module :command:`cpack_add_component` command
+ gained a new ``PLIST <filename>`` option to specify the ``pkgbuild``
+ ``--component-plist`` argument when using the
+ :module:`productbuild <CPackProductBuild>` generator.
diff --git a/Modules/CPackComponent.cmake b/Modules/CPackComponent.cmake
index 188dde3..395a268 100644
--- a/Modules/CPackComponent.cmake
+++ b/Modules/CPackComponent.cmake
@@ -105,7 +105,8 @@
# [DEPENDS comp1 comp2 ... ]
# [INSTALL_TYPES type1 type2 ... ]
# [DOWNLOADED]
-# [ARCHIVE_FILE filename])
+# [ARCHIVE_FILE filename]
+# [PLIST filename])
#
#
#
@@ -163,6 +164,9 @@
# a file with some name based on CPACK_PACKAGE_FILE_NAME and the name of
# the component. See cpack_configure_downloads for more information.
#
+# PLIST gives a filename that is passed to pkgbuild with the
+# ``--component-plist`` argument when using the productbuild generator.
+#
# .. command:: cpack_add_component_group
#
# Describes a group of related CPack installation components.
@@ -389,7 +393,7 @@ endmacro()
macro(cpack_add_component compname)
string(TOUPPER ${compname} _CPACK_ADDCOMP_UNAME)
cpack_parse_arguments(CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}
- "DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE"
+ "DISPLAY_NAME;DESCRIPTION;GROUP;DEPENDS;INSTALL_TYPES;ARCHIVE_FILE;PLIST"
"HIDDEN;REQUIRED;DISABLED;DOWNLOADED"
${ARGN}
)
@@ -445,6 +449,9 @@ macro(cpack_add_component compname)
cpack_append_option_set_command(
CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_DOWNLOADED
_CPACK_ADDCOMP_STR)
+ cpack_append_string_variable_set_command(
+ CPACK_COMPONENT_${_CPACK_ADDCOMP_UNAME}_PLIST
+ _CPACK_ADDCOMP_STR)
# Backward compatibility issue.
# Write to config iff the macros is used after CPack.cmake has been
# included, other it's not necessary because the variables
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 a5a18dc..076cc25 100644
--- a/Source/CPack/cmCPackProductBuildGenerator.cxx
+++ b/Source/CPack/cmCPackProductBuildGenerator.cxx
@@ -223,6 +223,10 @@ bool cmCPackProductBuildGenerator::GenerateComponentPackage(
: " --keychain \"" + keychainPath + "\"")
<< " \"" << packageFile << "\"";
+ if (component && !component->Plist.empty()) {
+ pkgCmd << " --component-plist \"" << component->Plist << "\"";
+ }
+
// Run ProductBuild
return RunProductBuild(pkgCmd.str());
}
-----------------------------------------------------------------------
Summary of changes:
Help/release/dev/productbuild_component_plist.rst | 7 +++++++
Modules/CPackComponent.cmake | 11 +++++++++--
Source/CPack/cmCPackComponentGroup.h | 4 ++++
Source/CPack/cmCPackGenerator.cxx | 5 +++++
Source/CPack/cmCPackProductBuildGenerator.cxx | 4 ++++
5 files changed, 29 insertions(+), 2 deletions(-)
create mode 100644 Help/release/dev/productbuild_component_plist.rst
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list