diff --git a/meson.build b/meson.build index ea3bea56..9eda048b 100644 --- a/meson.build +++ b/meson.build @@ -177,6 +177,7 @@ if meson.version().version_compare('>= 0.55.0') }, section: 'Directories') summary({ + 'GTK Frontend': get_option('gtk-frontend') ? 'enabled (GTK+ 3.22+)' : 'disabled', 'TLS (openssl)': libssl_dep.found(), 'Plugin Support': get_option('plugin'), 'DBus Support': dbus_glib_dep.found(), diff --git a/meson_options.txt b/meson_options.txt index 0bdf5051..fb087a5d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,8 +2,8 @@ option('gtk-frontend', type: 'boolean', description: 'Main graphical interface' ) -option('gtk3', type: 'boolean', value: false, - description: 'Build GTK frontend against GTK 3' +option('gtk3', type: 'boolean', value: true, deprecated: true, + description: 'Deprecated: GTK frontend always builds against GTK 3' ) option('text-frontend', type: 'boolean', value: false, description: 'Text interface (not generally useful)' @@ -23,7 +23,7 @@ option('libcanberra', type: 'feature', value: 'auto', description: 'Support for sound alerts, Unix only' ) option('appindicator', type: 'feature', value: 'auto', - description: 'Use Ayatana/AppIndicator-based tray backend when GTK3 is enabled' + description: 'Use Ayatana/AppIndicator-based tray backend for GTK frontend (non-Windows only)' ) # Install options diff --git a/src/fe-gtk/meson.build b/src/fe-gtk/meson.build index 65993c4e..7f37aff7 100644 --- a/src/fe-gtk/meson.build +++ b/src/fe-gtk/meson.build @@ -35,42 +35,35 @@ zoitechat_gtk_deps = [ libgmodule_dep, # used by libsexy ] -if get_option('gtk3') - gtk_dep = dependency('gtk+-3.0', version: '>= 3.22') - zoitechat_gtk_cflags += '-DHAVE_GTK3' +gtk_dep = dependency('gtk+-3.0', version: '>= 3.22') +zoitechat_gtk_cflags += '-DHAVE_GTK3' - if host_machine.system() != 'windows' - appindicator_opt = get_option('appindicator') +if host_machine.system() != 'windows' + appindicator_opt = get_option('appindicator') - if appindicator_opt.allowed() - appindicator_dep = dependency('ayatana-appindicator3-0.1', required: false) + if appindicator_opt.allowed() + appindicator_dep = dependency('ayatana-appindicator3-0.1', required: false) + if appindicator_dep.found() + zoitechat_gtk_deps += appindicator_dep + zoitechat_gtk_cflags += '-DHAVE_AYATANA_APPINDICATOR' + else + appindicator_dep = dependency('appindicator3-0.1', required: false) if appindicator_dep.found() zoitechat_gtk_deps += appindicator_dep - zoitechat_gtk_cflags += '-DHAVE_AYATANA_APPINDICATOR' - else - appindicator_dep = dependency('appindicator3-0.1', required: false) - if appindicator_dep.found() - zoitechat_gtk_deps += appindicator_dep - zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR' - elif appindicator_opt.enabled() - error('appindicator=enabled, but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 was found') - endif + zoitechat_gtk_cflags += '-DHAVE_APPINDICATOR' + elif appindicator_opt.enabled() + error('appindicator=enabled, but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 was found') endif endif endif -else - gtk_dep = dependency('gtk+-2.0', version: '>= 2.24.0') - zoitechat_gtk_cflags += '-DHAVE_GTK2' endif zoitechat_gtk_deps += gtk_dep if host_machine.system() != 'windows' - if get_option('gtk3') - gdk_x11_dep = dependency('gdk-x11-3.0', required: false) - if gdk_x11_dep.found() - zoitechat_gtk_deps += gdk_x11_dep - endif + gdk_x11_dep = dependency('gdk-x11-3.0', required: false) + if gdk_x11_dep.found() + zoitechat_gtk_deps += gdk_x11_dep endif x11_dep = dependency('x11', required: false)