Skip to content

Commit 04449ee

Browse files
committed
build(mac): suffix the DMG filename with the processor arch
1 parent 4ead2be commit 04449ee

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,11 @@ if (APPLE)
639639
configure_file("${PROJECT_SOURCE_DIR}/cmake/deploy-osx.cmake.in" "${PROJECT_BINARY_DIR}/deploy-osx.cmake" @ONLY)
640640
set (CPACK_PRE_BUILD_SCRIPTS "${PROJECT_BINARY_DIR}/deploy-osx.cmake")
641641
set (CPACK_GENERATOR "DragNDrop")
642+
# CPack defaults the system name to "Darwin" on macOS, so the Intel and
643+
# Apple Silicon matrix legs would produce identical filenames and collide
644+
# on the cloudsmith upload. Include the processor so each leg's DMG is
645+
# uniquely named (Darwin-x86_64 vs Darwin-arm64).
646+
set (CPACK_SYSTEM_NAME "Darwin-${CMAKE_SYSTEM_PROCESSOR}")
642647
set (CPACK_DMG_BACKGROUND_IMAGE "${PROJECT_SOURCE_DIR}/cmake/CMakeDMGBackground.tif")
643648
set (CPACK_DMG_DS_STORE "${PROJECT_SOURCE_DIR}/cmake/DS_Store.bin")
644649
#set (CPACK_DMG_DS_STORE_SETUP_SCRIPT "${PROJECT_SOURCE_DIR}/cmake/CMakeDMGSetup.scpt")

0 commit comments

Comments
 (0)