CMake: Fix codesigning error on Intel macOS
Some checks are pending
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run

Without this fix trying to build a Debug build on x86_64 macOS failed
with "Build/ladybird-debug/bin/Ladybird.app: code object is not signed
at all"
This commit is contained in:
thislooksfun 2024-10-11 22:03:52 -05:00 committed by Andrew Kaster
parent 24c2ad059b
commit ef65694ac0
Notes: github-actions[bot] 2024-10-12 23:02:03 +00:00

View file

@ -34,7 +34,7 @@ function(create_ladybird_bundle target_name)
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "${bundle_dir}/Contents/lib"
)
if (NOT CMAKE_BUILD_TYPE MATCHES "Release|RelWithDebInfo")
if (NOT CMAKE_BUILD_TYPE MATCHES "Release|RelWithDebInfo" AND "arm64" IN_LIST CMAKE_OSX_ARCHITECTURES)
add_custom_command(TARGET ${target_name} POST_BUILD
COMMAND codesign -s - -v -f --entitlements "${LADYBIRD_SOURCE_DIR}/Meta/debug.plist" "${bundle_dir}"
)