diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2013-12-16 21:30:11 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2013-12-17 13:14:42 (GMT) |
commit | 8632233a2fc0e27106977a820b6b439e72b45383 (patch) | |
tree | a36fbcaf798523e37ac538ea29480b4684bd4798 /Modules | |
parent | b4fdbba55ad857a803a0d2e6c1f0b2bff10f4b51 (diff) | |
download | CMake-8632233a2fc0e27106977a820b6b439e72b45383.zip CMake-8632233a2fc0e27106977a820b6b439e72b45383.tar.gz CMake-8632233a2fc0e27106977a820b6b439e72b45383.tar.bz2 |
CPackWiX: allow customization of generated WiX sources
Added a new variable CPACK_WIX_PATCH_FILE that users can point at an
XML patch file. Fragments defined within the patch file will be inserted
at supported insertion points (currently Component, File and Directory).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CPackWIX.cmake | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/Modules/CPackWIX.cmake b/Modules/CPackWIX.cmake index 237c5bc..d9e0ba7 100644 --- a/Modules/CPackWIX.cmake +++ b/Modules/CPackWIX.cmake @@ -116,6 +116,57 @@ # If this variable is not set, the default MSI template included with CMake # will be used. # +# .. variable:: CPACK_WIX_PATCH_FILE +# +# Optional XML file with fragments to be inserted into generated WiX sources +# +# This optional variable can be used to specify an XML file that the +# WiX generator will use to inject fragments into its generated +# source files. +# +# Patch files understood by the CPack WiX generator +# roughly follow this RELAX NG compact schema: +# +# .. code-block:: none +# +# start = CPackWiXPatch +# +# CPackWiXPatch = element CPackWiXPatch { CPackWiXFragment* } +# +# CPackWiXFragment = element CPackWiXFragment +# { +# attribute Id { string }, +# fragmentContent* +# } +# +# fragmentContent = element * - CPackWiXFragment +# { +# (attribute * { text } | text | fragmentContent)* +# } +# +# Currently fragments can be injected into most +# Component, File and Directory elements. +# +# The following example illustrates how this works. +# +# Given that the WiX generator creates the following XML element: +# +# .. code-block:: xml +# +# <Component Id="CM_CP_applications.bin.my_libapp.exe" Guid="*"/> +# +# The following XML patch file may be used to inject an Environment element +# into it: +# +# .. code-block:: xml +# +# <CPackWiXPatch> +# <CPackWiXFragment Id="CM_CP_applications.bin.my_libapp.exe"> +# <Environment Id="MyEnvironment" Action="set" +# Name="MyVariableName" Value="MyVariableValue"/> +# </CPackWiXFragment> +# </CPackWiXPatch> +# # .. variable:: CPACK_WIX_EXTRA_SOURCES # # Extra WiX source files |