mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Added a dedicated darwin branch in src/fe-gtk/meson.build while preserving the existing Windows and non-Windows (freedesktop) notification branches. In this macOS branch, notifications/notification-osx.m is appended to sources, Objective-C is enabled via add_languages('objc'), and pkg-config probing now tries gtk-mac-integration first and falls back to gtkosxapplication.
When either mac integration dependency is found on darwin, Meson now adds that dependency and defines -DHAVE_GTK_MAC in zoitechat_gtk_cflags, which activates the existing #ifdef HAVE_GTK_MAC blocks in the GTK frontend code. Verified the existing source guards that become active with HAVE_GTK_MAC are already present in the requested files: fe-gtk.h (mac header include + extern). fe-gtk.c (global mac app object and mac-specific paths). menu.c (mac menubar/app-menu integration). maingui.c (mac dock attention request).
This commit is contained in:
@@ -85,6 +85,20 @@ if host_machine.system() == 'windows'
|
||||
# sources: 'notifications/notification-winrt.cpp'
|
||||
#)
|
||||
|
||||
elif host_machine.system() == 'darwin'
|
||||
zoitechat_gtk_sources += 'notifications/notification-osx.m'
|
||||
add_languages('objc')
|
||||
|
||||
gtk_mac_dep = dependency('gtk-mac-integration', required: false)
|
||||
if not gtk_mac_dep.found()
|
||||
gtk_mac_dep = dependency('gtkosxapplication', required: false)
|
||||
endif
|
||||
|
||||
if gtk_mac_dep.found()
|
||||
zoitechat_gtk_deps += gtk_mac_dep
|
||||
zoitechat_gtk_cflags += '-DHAVE_GTK_MAC'
|
||||
endif
|
||||
|
||||
else
|
||||
zoitechat_gtk_sources += 'notifications/notification-freedesktop.c'
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user