Made GTK3 AppIndicator dependencies optional and only define AppIndicator macros when the dependency is found.

Added compile-time selection to use AppIndicator when available and fall back to GtkStatusIcon otherwise, keeping the status-icon backend available for non-AppIndicator builds (including GTK3 fallback).
This commit is contained in:
2026-02-05 11:25:07 -07:00
parent f80c3adfe0
commit f42157fdd7

View File

@@ -45,9 +45,11 @@ if get_option('gtk3')
zoitechat_gtk_deps += appindicator_dep
zoitechat_gtk_cflags += '-DHAVE_AYATANA_APPINDICATOR'
else
appindicator_dep = dependency('appindicator3-0.1', required: true)
zoitechat_gtk_deps += appindicator_dep
zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR'
appindicator_dep = dependency('appindicator3-0.1', required: false)
if appindicator_dep.found()
zoitechat_gtk_deps += appindicator_dep
zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR'
endif
endif
endif
else