summaryrefslogtreecommitdiffstats
path: root/Modules/CPackIFW.cmake
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2014-08-06 15:23:00 (GMT)
committerBrad King <brad.king@kitware.com>2014-08-11 13:40:28 (GMT)
commitebe8d51b11a2633857317aa1c8fe7ec0527c37eb (patch)
treec3bd0458fa91e1f32e8ed4da0879e379caf7078b /Modules/CPackIFW.cmake
parent82382479f7d43158d12f75c5ee8dda53edacd8c4 (diff)
downloadCMake-ebe8d51b11a2633857317aa1c8fe7ec0527c37eb.zip
CMake-ebe8d51b11a2633857317aa1c8fe7ec0527c37eb.tar.gz
CMake-ebe8d51b11a2633857317aa1c8fe7ec0527c37eb.tar.bz2
CPackIFW: Refactor and revise this generator
Split the monolithic cmCPackIFWGenerator source into three parts: cmCPackIFWGenerator, cmCPackIFWInstaller, and cmCPackIFWPackage to isolate the implementations somewhat. Add a COMMON option to the cpack_ifw_configure_component command to make the data component common to its parent group. Change the default packaging method to ONE_PACKAGE_PER_COMPONENT. This is not incompatible because the CPack IFW generator has not yet been in a release.
Diffstat (limited to 'Modules/CPackIFW.cmake')
-rw-r--r--Modules/CPackIFW.cmake18
1 files changed, 15 insertions, 3 deletions
diff --git a/Modules/CPackIFW.cmake b/Modules/CPackIFW.cmake
index 1f6de8f..29a0047 100644
--- a/Modules/CPackIFW.cmake
+++ b/Modules/CPackIFW.cmake
@@ -123,6 +123,7 @@
# ::
#
# cpack_ifw_configure_component(<compname>
+# [COMMON]
# [VERSION <version>]
# [SCRIPT <script>]
# [NAME <name>]
@@ -132,7 +133,11 @@
#
# This command should be called after cpack_add_component command.
#
-# ``VERSION`` is version of component. By default used :variable:`CPACK_PACKAGE_VERSION`.
+# ``COMMON`` if set, then the component will be packaged and installed as part
+# of a group to which he belongs.
+#
+# ``VERSION`` is version of component.
+# By default used :variable:`CPACK_PACKAGE_VERSION`.
#
# ``SCRIPT`` is relative or absolute path to operations script
# for this component.
@@ -163,7 +168,8 @@
#
# This command should be called after cpack_add_component_group command.
#
-# ``VERSION`` is version of component group. By default used :variable:`CPACK_PACKAGE_VERSION`.
+# ``VERSION`` is version of component group.
+# By default used :variable:`CPACK_PACKAGE_VERSION`.
#
# ``NAME`` is used to create domain-like identification for this component group.
# By default used origin component group name.
@@ -346,7 +352,7 @@ macro(cpack_ifw_configure_component compname)
string(TOUPPER ${compname} _CPACK_IFWCOMP_UNAME)
- set(_IFW_OPT)
+ set(_IFW_OPT COMMON)
set(_IFW_ARGS VERSION SCRIPT NAME PRIORITY)
set(_IFW_MULTI_ARGS DEPENDS LICENSES)
cmake_parse_arguments(CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME} "${_IFW_OPT}" "${_IFW_ARGS}" "${_IFW_MULTI_ARGS}" ${ARGN})
@@ -367,6 +373,12 @@ macro(cpack_ifw_configure_component compname)
set(_CPACK_IFWCOMP_STR "\n# Configuration for IFW component \"${compname}\"\n")
+ foreach(_IFW_ARG_NAME ${_IFW_OPT})
+ cpack_append_option_set_command(
+ CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_${_IFW_ARG_NAME}
+ _CPACK_IFWCOMP_STR)
+ endforeach()
+
foreach(_IFW_ARG_NAME ${_IFW_ARGS})
cpack_append_string_variable_set_command(
CPACK_IFW_COMPONENT_${_CPACK_IFWCOMP_UNAME}_${_IFW_ARG_NAME}