Skip to content

Commit da99556

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

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
@@ -405,7 +405,17 @@ elseif(APPLE)
405405
-verbose=1
406406
-no-strip
407407
-qmldir=${CMAKE_CURRENT_SOURCE_DIR}/ui
408-
\"-codesign=${CODE_SIGN_CERTIFICATE_ID}\"
408+
)
409+
execute_process(
410+
COMMAND codesign
411+
--force
412+
--verbose
413+
--deep
414+
--options=runtime
415+
--timestamp
416+
--entitlements \"${PROJECT_SOURCE_DIR}/support/macOS/entitlements.plist\"
417+
--sign \"${CODE_SIGN_CERTIFICATE_ID}\"
418+
\"\${CMAKE_INSTALL_PREFIX}/contour.app\"
409419
)
410420
")
411421
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)