summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-03-03 14:07:23 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-03-03 14:07:29 (GMT)
commita88efbc9cfad2d69e1f1e8875383c4e9c1f39849 (patch)
tree5321c3794c252016d9c51d28a8e470d6c306edad
parent3aec26660a89996b2a12c84cea2fd1fad1ac919b (diff)
parente3ac388738e7b2fb71593d49c70f22fd4c235da0 (diff)
downloadCMake-a88efbc9cfad2d69e1f1e8875383c4e9c1f39849.zip
CMake-a88efbc9cfad2d69e1f1e8875383c4e9c1f39849.tar.gz
CMake-a88efbc9cfad2d69e1f1e8875383c4e9c1f39849.tar.bz2
Merge topic 'cpack-dmg-filesystem'
e3ac388738 cpack: add CPACK_DMG_FILESYSTEM Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5873
-rw-r--r--Help/cpack_gen/dmg.rst6
-rw-r--r--Help/release/dev/cpack-dmg-filesystem.rst5
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
3 files changed, 17 insertions, 1 deletions
diff --git a/Help/cpack_gen/dmg.rst b/Help/cpack_gen/dmg.rst
index 4c662a6..ec2cf1e 100644
--- a/Help/cpack_gen/dmg.rst
+++ b/Help/cpack_gen/dmg.rst
@@ -103,6 +103,12 @@ on macOS:
- Default: ``CPACK_PACKAGE_FILE_NAME-<component>``
+.. variable:: CPACK_DMG_FILESYSTEM
+
+ The filesystem format. Common values are ``APFS`` and ``HFS+``.
+ See ``man hdiutil`` for a full list of supported formats.
+ Defaults to ``HFS+``.
+
.. variable:: CPACK_COMMAND_HDIUTIL
Path to the ``hdiutil(1)`` command used to operate on disk image files on
diff --git a/Help/release/dev/cpack-dmg-filesystem.rst b/Help/release/dev/cpack-dmg-filesystem.rst
new file mode 100644
index 0000000..e2a4742
--- /dev/null
+++ b/Help/release/dev/cpack-dmg-filesystem.rst
@@ -0,0 +1,5 @@
+cpack-dmg-filesystem
+--------------------
+
+* The :cpack_gen:`CPack DragNDrop Generator` gained option
+ :variable:`CPACK_DMG_FILESYSTEM` to control the ``.dmg`` filesystem.
diff --git a/Source/CPack/cmCPackDragNDropGenerator.cxx b/Source/CPack/cmCPackDragNDropGenerator.cxx
index cefb906..0d56e5f 100644
--- a/Source/CPack/cmCPackDragNDropGenerator.cxx
+++ b/Source/CPack/cmCPackDragNDropGenerator.cxx
@@ -273,6 +273,11 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
? this->GetOption("CPACK_DMG_FORMAT")
: "UDZO";
+ const std::string cpack_dmg_filesystem =
+ this->GetOption("CPACK_DMG_FILESYSTEM")
+ ? this->GetOption("CPACK_DMG_FILESYSTEM")
+ : "HFS+";
+
// Get optional arguments ...
std::string cpack_license_file =
this->GetOption("CPACK_RESOURCE_FILE_LICENSE")
@@ -418,7 +423,7 @@ int cmCPackDragNDropGenerator::CreateDMG(const std::string& src_dir,
temp_image_command << " -ov";
temp_image_command << " -srcfolder \"" << staging.str() << "\"";
temp_image_command << " -volname \"" << cpack_dmg_volume_name << "\"";
- temp_image_command << " -fs HFS+";
+ temp_image_command << " -fs \"" << cpack_dmg_filesystem << "\"";
temp_image_command << " -format " << temp_image_format;
temp_image_command << " \"" << temp_image << "\"";