Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions cmake/presets/os-macos.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"version": 6,
"include": [ "common.json" ],
"include": [
"common.json"
],
"configurePresets": [
{
"name": "macos-common",
Expand All @@ -21,12 +23,18 @@
{
"name": "macos-debug",
"displayName": "MacOS - Debug",
"inherits": ["macos-common", "debug"]
"inherits": [
"macos-common",
"debug"
]
},
{
"name": "macos-release",
"displayName": "MacOS - Release",
"inherits": ["macos-common", "release"]
"inherits": [
"macos-common",
"release"
]
}
],
"buildPresets": [
Expand All @@ -45,7 +53,9 @@
{
"name": "macos-debug",
"configurePreset": "macos-debug",
"output": {"outputOnFailure": true},
"output": {
"outputOnFailure": true
},
"execution": {
"noTestsAction": "error",
"stopOnFailure": true
Expand All @@ -56,7 +66,10 @@
{
"name": "macos-release",
"configurePreset": "macos-release",
"generators": [ "DragNDrop" ]
"generators": [
"DragNDrop"
]
}
]
}

21 changes: 19 additions & 2 deletions src/contour/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ NumberToHex(${PROJECT_VERSION_PATCH} HEX_PATCH)
# {{{ Setup QT_COMPONENTS
# QT_COMPONENTS is the list of Qt libraries Contour requires for building.
# NB: Widgets is rquired for SystemTrayIcon's fallback implementation
set(QT_COMPONENTS Core Gui Qml Quick QuickControls2 Network Multimedia Widgets OpenGL OpenGLWidgets Core5Compat)
set(QT_COMPONENTS Core Gui DBus Qml Quick QuickControls2 QuickTemplates2 DBus Network Multimedia Widgets OpenGL OpenGLWidgets Core5Compat)
# }}}

message(STATUS "Qt components: ${QT_COMPONENTS}")
Expand Down Expand Up @@ -189,12 +189,14 @@ if(CONTOUR_FRONTEND_GUI)
vtrasterizer
ContourTerminalDisplay
Qt6::Core5Compat
Qt6::DBus
Qt6::Multimedia
Qt6::Network
Qt6::OpenGL
Qt6::Qml
Qt6::QuickControls2
Qt6::Widgets
Qt6::QuickTemplates2
)

if(OPENBSD)
Expand Down Expand Up @@ -405,7 +407,22 @@ elseif(APPLE)
-verbose=1
-no-strip
-qmldir=${CMAKE_CURRENT_SOURCE_DIR}/ui
\"-codesign=${CODE_SIGN_CERTIFICATE_ID}\"
)
# -codesign=\"${CODE_SIGN_CERTIFICATE_ID}\"
# MacDeployQt's -codesign=XXX option is simply executing codesign.
# So we can do it safely ourself as follows:
execute_process(
COMMAND codesign
--force
--verbose
--deep
--options=runtime
--timestamp
--strict
--preserve-metadata=identifier,entitlements
--entitlements \"${PROJECT_SOURCE_DIR}/support/macOS/entitlements.plist\"
--sign \"${CODE_SIGN_CERTIFICATE_ID}\"
\"${CMAKE_INSTALL_PREFIX}/contour.app\"
)
")
else()
Expand Down
10 changes: 10 additions & 0 deletions support/macOS/entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
</dict>
</plist>
Loading