summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorKevin Ushey <kevinushey@gmail.com>2021-03-02 05:04:54 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-02 15:11:15 (GMT)
commite3ac388738e7b2fb71593d49c70f22fd4c235da0 (patch)
tree755380331d74c5c08272a4d497cdc77e6e2564d1 /Source/CPack
parent11506eb1297ee50a213bad6beb943ba41556c58e (diff)
downloadCMake-e3ac388738e7b2fb71593d49c70f22fd4c235da0.zip
CMake-e3ac388738e7b2fb71593d49c70f22fd4c235da0.tar.gz
CMake-e3ac388738e7b2fb71593d49c70f22fd4c235da0.tar.bz2
cpack: add CPACK_DMG_FILESYSTEM
Allow users to configure the filesystem format of the generated `.dmg` via the `CPACK_DMG_FILESYSTEM` option. Fixes: #21874
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackDragNDropGenerator.cxx7
1 files changed, 6 insertions, 1 deletions
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 << "\"";