mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-26 04:09:35 +03:00
cpack: add CPACK_DMG_FILESYSTEM
Allow users to configure the filesystem format of the generated `.dmg` via the `CPACK_DMG_FILESYSTEM` option. Fixes: #21874
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
cpack-dmg-filesystem
|
||||
--------------------
|
||||
|
||||
* The :cpack_gen:`CPack DragNDrop Generator` gained option
|
||||
:variable:`CPACK_DMG_FILESYSTEM` to control the ``.dmg`` filesystem.
|
||||
@@ -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 << "\"";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user