From 7cf7fc02d6123f02b8ba8bc36c27424704844e93 Mon Sep 17 00:00:00 2001 From: Anton Lazarev Date: Fri, 16 Feb 2024 10:11:37 -0800 Subject: [PATCH] build: Specify required GTK version Part-of: --- meson.build | 7 +++++++ plugins/provider/dummy/meson.build | 2 +- plugins/provider/mm/meson.build | 2 +- plugins/provider/ofono/meson.build | 2 +- src/meson.build | 2 +- 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index 9727262..1a2b4f8 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,11 @@ project( ] ) +gtk_version = '4.8' +gtk_version_arr = gtk_version.split('.') +gtk_major = gtk_version_arr[0] +gtk_minor = gtk_version_arr[1] + calls_id = 'org.gnome.Calls' calls_homepage = 'https://gitlab.gnome.org/GNOME/calls' calls_name = meson.project_name() @@ -111,6 +116,8 @@ test_c_args = [ '-Wunused-variable', '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_64', '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_70', + '-DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_@0@_@1@'.format(gtk_major, gtk_minor), + '-DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_@0@_@1@'.format(gtk_major, gtk_minor), # see https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/332 '-DEDS_DISABLE_DEPRECATED', # in preparation for the switch to Gtk4 we should make sure not to use deprecated symbols diff --git a/plugins/provider/dummy/meson.build b/plugins/provider/dummy/meson.build index 6e74319..5ad89a1 100644 --- a/plugins/provider/dummy/meson.build +++ b/plugins/provider/dummy/meson.build @@ -44,7 +44,7 @@ i18n_plugin = i18n.merge_file( dummy_deps = [ dependency('gobject-2.0'), - dependency('gtk4'), + dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('libpeas-1.0'), ] diff --git a/plugins/provider/mm/meson.build b/plugins/provider/mm/meson.build index 9b8a8ca..9bc163a 100644 --- a/plugins/provider/mm/meson.build +++ b/plugins/provider/mm/meson.build @@ -42,7 +42,7 @@ i18n_plugin = i18n.merge_file( mm_deps = [ dependency('gobject-2.0'), - dependency('gtk4'), + dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('ModemManager'), dependency('mm-glib', version: '>= 1.12.0'), dependency('libpeas-1.0'), diff --git a/plugins/provider/ofono/meson.build b/plugins/provider/ofono/meson.build index 1dbd5a5..87d193b 100644 --- a/plugins/provider/ofono/meson.build +++ b/plugins/provider/ofono/meson.build @@ -43,7 +43,7 @@ i18n_plugin = i18n.merge_file( ofono_deps = [ dependency('gobject-2.0'), - dependency('gtk4'), + dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('libpeas-1.0'), ] diff --git a/src/meson.build b/src/meson.build index 9db116a..34cac78 100644 --- a/src/meson.build +++ b/src/meson.build @@ -30,7 +30,7 @@ src_include = include_directories('.') calls_includes = [ top_include, src_include ] calls_deps = [ dependency('gobject-2.0', version: '>= 2.58'), - dependency('gtk4'), + dependency('gtk4', version: '>= @0@'.format(gtk_version)), dependency('libadwaita-1', version: '>= 1.2'), dependency('libfeedback-0.0'), dependency('libpeas-1.0'),