1
0
mirror of synced 2024-11-28 09:30:51 +01:00

build: Don't re-sign macOS bundle unless requested

This commit is contained in:
WerWolv 2024-02-01 23:56:14 +01:00
parent 959a404e1c
commit a80f9e9ca7

View File

@ -261,9 +261,12 @@ macro(createPackage)
set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns") set(CPACK_BUNDLE_ICON "${CMAKE_SOURCE_DIR}/resources/dist/macos/AppIcon.icns")
set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/${BUNDLE_NAME}/Contents/Info.plist") set(CPACK_BUNDLE_PLIST "${CMAKE_BINARY_DIR}/${BUNDLE_NAME}/Contents/Info.plist")
find_program(CODESIGN_PATH codesign) if (IMHEX_RESIGN_BUNDLE)
if (CODESIGN_PATH) message(STATUS "Resigning bundle...")
add_custom_command(TARGET imhex_all POST_BUILD COMMAND "codesign" ARGS "--force" "--deep" "--sign" "-" "${CMAKE_BINARY_DIR}/${BUNDLE_NAME}") find_program(CODESIGN_PATH codesign)
if (CODESIGN_PATH)
add_custom_command(TARGET imhex_all POST_BUILD COMMAND "codesign" ARGS "--force" "--deep" "--sign" "-" "${CMAKE_BINARY_DIR}/${BUNDLE_NAME}")
endif()
endif() endif()
endif() endif()
else() else()