Skip to content

Commit 68c89a2

Browse files
[CMake] Attempt to fix code signing on macOS
Signed-off-by: Christian Parpart <[email protected]>
1 parent ebe3646 commit 68c89a2

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

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)