summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-05 14:30:34 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-05 14:33:13 (GMT)
commit4f2a983c21cb572ed92df76422bec20aecb3cec1 (patch)
treea39ac09a72c69e758fe550652b5aa8252dc91221
parent39b50975d9b6351ef82bbe16fc0aa521a5410e22 (diff)
downloadCMake-4f2a983c21cb572ed92df76422bec20aecb3cec1.zip
CMake-4f2a983c21cb572ed92df76422bec20aecb3cec1.tar.gz
CMake-4f2a983c21cb572ed92df76422bec20aecb3cec1.tar.bz2
CPack: Fix PackageMaker .dmg HFS+ creation on macOS APFS hosts
When running `hdiutil create`, specify the HFS+ filesystem explicitly. Otherwise `hdiutil` may choose a filesystem based on the host. We do not want to create APFS images for `.dmg` packages because they may not mount on macOS versions prior to 10.12. This was missed in commit 39b50975d9 (CPack: Fix .dmg HFS+ creation on macOS APFS hosts, 2017-10-02). Reported-by: Alan Garny
-rw-r--r--Source/CPack/cmCPackPackageMakerGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CPack/cmCPackPackageMakerGenerator.cxx b/Source/CPack/cmCPackPackageMakerGenerator.cxx
index 0299279..dbcb022 100644
--- a/Source/CPack/cmCPackPackageMakerGenerator.cxx
+++ b/Source/CPack/cmCPackPackageMakerGenerator.cxx
@@ -288,8 +288,8 @@ int cmCPackPackageMakerGenerator::PackageFiles()
tmpFile += "/hdiutilOutput.log";
std::ostringstream dmgCmd;
dmgCmd << "\"" << this->GetOption("CPACK_INSTALLER_PROGRAM_DISK_IMAGE")
- << "\" create -ov -format UDZO -srcfolder \"" << packageDirFileName
- << "\" \"" << packageFileNames[0] << "\"";
+ << "\" create -ov -fs HFS+ -format UDZO -srcfolder \""
+ << packageDirFileName << "\" \"" << packageFileNames[0] << "\"";
std::string output;
int retVal = 1;
int numTries = 10;