summaryrefslogtreecommitdiffstats
path: root/Help/cpack_gen
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-01-14 16:40:23 (GMT)
committerBrad King <brad.king@kitware.com>2022-01-18 20:39:51 (GMT)
commit9e38bfa915c142edcf7d6e154fa1dc10bba400f1 (patch)
treea3ebdbd672c3fba3be1d107e93b60152254fdb96 /Help/cpack_gen
parent542ba6ac1a50c3900457431819e5eb328f3a29ee (diff)
downloadCMake-9e38bfa915c142edcf7d6e154fa1dc10bba400f1.zip
CMake-9e38bfa915c142edcf7d6e154fa1dc10bba400f1.tar.gz
CMake-9e38bfa915c142edcf7d6e154fa1dc10bba400f1.tar.bz2
CPack/DMG: Add explicit option to use CPACK_RESOURCE_FILE_LICENSE for SLA
Since macOS 12.0, the ``hdiutil udifrez`` and ``hdiutil udifderez`` commands to embed and extract resources in a disk image are deprecated. The CPack DragNDrop Generator uses these to attach the SLA specified by the `CPACK_RESOURCE_FILE_LICENSE` option. Since that option is shared by multiple CPack generators, we cannot deprecate it. Instead, add an explicit option to control the behavior. This will give projects a way to package on future macOS versions that remove the commands. In order to provide a long-term transition away from attaching SLAs to disk images, update `cpack` to default this behavior to OFF. To retain compatibility for CMake projects, teach the CPack module to default the option to ON. Later a policy can be added to change the default. Issue: #22978
Diffstat (limited to 'Help/cpack_gen')
-rw-r--r--Help/cpack_gen/dmg.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Help/cpack_gen/dmg.rst b/Help/cpack_gen/dmg.rst
index 1f05618..b4ef5a2 100644
--- a/Help/cpack_gen/dmg.rst
+++ b/Help/cpack_gen/dmg.rst
@@ -54,6 +54,27 @@ on macOS:
Default behavior is to include a symlink to ``/Applications`` in the DMG.
Set this option to ``ON`` to avoid adding the symlink.
+.. variable:: CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE
+
+ .. versionadded:: 3.23
+
+ Control whether :variable:`CPACK_RESOURCE_FILE_LICENSE`, if set to a
+ non-default value, is used as the license agreement provided when
+ mounting the DMG. If ``CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE`` is
+ not set, :manual:`cpack(1)` defaults to off.
+
+ In a CMake project that uses the :module:`CPack` module to generate
+ ``CPackConfig.cmake``, ``CPACK_DMG_SLA_USE_RESOURCE_FILE_LICENSE``
+ is automatically enabled by default if it is not set and
+ :variable:`CPACK_RESOURCE_FILE_LICENSE` is set to a non-default value.
+
+ .. note::
+
+ This option was added in response to macOS 12.0's deprecation of
+ the ``hdiutil udifrez`` command to make its use optional.
+ CPack 3.22 and below always use :variable:`CPACK_RESOURCE_FILE_LICENSE`,
+ if set to a non-default value, as the DMG license.
+
.. variable:: CPACK_DMG_SLA_DIR
.. versionadded:: 3.5