CMake: Fix codesigning error on Intel macOS

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
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}"
)