Skip to content

Commit 16c506e

Browse files
[CMake] Attempt to fix code signing on macOS
Signed-off-by: Christian Parpart <christian@parpart.family>
1 parent ebe3646 commit 16c506e

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ jobs:
410410
./scripts/ci-set-vars.sh
411411
# Please read the following link on how to use MacOS code signing on Github CI:
412412
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
413-
echo "CODE_SIGN_CERTIFICATE_ID=Developer ID Application: Christian Parpart (6T525MU9UR)" >> "$GITHUB_OUTPUT"
413+
echo "CODE_SIGN_CERTIFICATE_ID=8E5F2A99BDA77EC0A0DE747F29D0BD42A25725F3" >> "$GITHUB_OUTPUT"
414414
env:
415415
REPOSITORY: ${{ github.event.repository.name }}
416416
- name: Install the Apple certificate and provisioning profile
@@ -514,7 +514,7 @@ jobs:
514514
echo QTVER=6 >> "$GITHUB_OUTPUT"
515515
# Please read the following link on how to use MacOS code signing on Github CI:
516516
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
517-
echo "CODE_SIGN_CERTIFICATE_ID=Developer ID Application: Christian Parpart (6T525MU9UR)" >> "$GITHUB_OUTPUT"
517+
echo "CODE_SIGN_CERTIFICATE_ID=8E5F2A99BDA77EC0A0DE747F29D0BD42A25725F3" >> "$GITHUB_OUTPUT"
518518
env:
519519
REPOSITORY: ${{ github.event.repository.name }}
520520
- name: Install the Apple certificate and provisioning profile

src/contour/CMakeLists.txt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,17 @@ elseif(APPLE)
395395
-verbose=1
396396
-no-strip
397397
-qmldir=${CMAKE_CURRENT_SOURCE_DIR}/ui
398-
\"-codesign=${CODE_SIGN_CERTIFICATE_ID}\"
398+
)
399+
execute_process(
400+
COMMAND codesign
401+
--force
402+
--verbose
403+
--deep
404+
--options=runtime
405+
--timestamp
406+
--entitlements \"${PROJECT_SOURCE_DIR}/support/macOS/entitlements.plist\"
407+
--sign \"${CODE_SIGN_CERTIFICATE_ID}\"
408+
\"\${CMAKE_INSTALL_PREFIX}/contour.app\"
399409
)
400410
")
401411
else()

support/macOS/entitlements.plist

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>com.apple.security.cs.allow-jit</key>
6+
<true/>
7+
<key>com.apple.security.cs.disable-library-validation</key>
8+
<true/>
9+
</dict>
10+
</plist>

0 commit comments

Comments
 (0)