Skip to content

Commit

Permalink
Set ad-hoc codesigning identity for macOS by default
Browse files Browse the repository at this point in the history
  • Loading branch information
fwcd committed Jun 16, 2022
1 parent 9cbd4cd commit 5916891
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2805,6 +2805,14 @@ if(APPLE AND MACOS_BUNDLE)
set(BUNDLE_DIRS "${CMAKE_PREFIX_PATH}/lib;${Qt5Widgets_DIR}/../..")
set(APPLE_CODESIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/packaging/macos/entitlements.plist")

# Starting with arm64 macOS Apple will require ad-hoc code signatures,
# which can be generated by setting the identity to a single dash (-).
# These only include a checksum for verifying integrity, not an actual
# signature.
if (NOT APPLE_CODESIGN_IDENTITY)
set(APPLE_CODESIGN_IDENTITY -)
endif()

configure_file(cmake/modules/BundleInstall.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/BundleInstall.cmake" @ONLY)
install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/BundleInstall.cmake")
endif()

0 comments on commit 5916891

Please sign in to comment.