diff options
author | Egmont Koblinger <egmont@gmail.com> | 2019-09-18 14:14:55 +0200 |
---|---|---|
committer | Egmont Koblinger <egmont@gmail.com> | 2019-09-18 14:14:55 +0200 |
commit | 0a9b4425b2430cc13ecb4f6eb5b89974b48e4547 (patch) | |
tree | 95d9bacd5055fc503ac6a0d4542d4709d0d4625f | |
parent | 8be5ae296c11fbe71682abe46916b7edea557ad9 (diff) | |
download | vte-0a9b4425b2430cc13ecb4f6eb5b89974b48e4547.tar.gz |
build: Enable glib/gtk deprecation warnings
https://gitlab.gnome.org/GNOME/vte/issues/172
-rw-r--r-- | meson.build | 18 | ||||
-rw-r--r-- | src/app/meson.build | 1 | ||||
-rw-r--r-- | src/meson.build | 5 |
3 files changed, 21 insertions, 3 deletions
diff --git a/meson.build b/meson.build index d3bc5dcf..448323f8 100644 --- a/meson.build +++ b/meson.build @@ -32,11 +32,15 @@ project( # Requirements gtk3_req_version = '3.20.0' +gtk3_min_req_version = '3.0' +gtk3_max_allowed_version = '3.20' gtk4_req_version = '4.0.0' fribidi_req_version = '1.0.0' gio_req_version = '2.44.0' glib_req_version = '2.44.0' +glib_min_req_version = '2.26' +glib_max_allowed_version = '2.44' gnutls_req_version = '3.2.7' pango_req_version = '1.22.0' pcre2_req_version = '10.21' @@ -114,6 +118,19 @@ config_h.set('WITH_FRIBIDI', get_option('fribidi')) config_h.set('WITH_GNUTLS', get_option('gnutls')) config_h.set('WITH_ICONV', get_option('iconv')) +ver = glib_min_req_version.split('.') +config_h.set('GLIB_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))') +ver = glib_max_allowed_version.split('.') +config_h.set('GLIB_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))') + +if get_option('gtk3') + ver = gtk3_min_req_version.split('.') + config_h.set('GDK_VERSION_MIN_REQUIRED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))') + ver = gtk3_max_allowed_version.split('.') + config_h.set('GDK_VERSION_MAX_ALLOWED', '(G_ENCODE_VERSION(' + ver[0] + ',' + ver[1] + '))') +endif + + # FIXME AC_USE_SYSTEM_EXTENSIONS also supported non-gnu systems config_h.set10('_GNU_SOURCE', true) @@ -249,7 +266,6 @@ compiler_flags_common = [ '-Wmissing-include-dirs', '-Wmissing-noreturn', '-Wno-address-of-packed-member', - '-Wno-deprecated-declarations', '-Wno-missing-field-initializers', '-Wno-packed', '-Wno-switch-enum', diff --git a/src/app/meson.build b/src/app/meson.build index f09a9391..3c677d8c 100644 --- a/src/app/meson.build +++ b/src/app/meson.build @@ -27,6 +27,7 @@ app_resource_data = files( app_common_cppflags = [ '-DG_LOG_DOMAIN="VTE"', '-DLOCALEDIR="@0@"'.format(vte_prefix / vte_localedir), + '-DVTE_DISABLE_DEPRECATION_WARNINGS', ] app_common_deps = [ diff --git a/src/meson.build b/src/meson.build index 1481c089..f883e513 100644 --- a/src/meson.build +++ b/src/meson.build @@ -164,7 +164,7 @@ incs = [ libvte_common_cppflags = [ '-DG_LOG_DOMAIN="VTE"', '-DLOCALEDIR="@0@"'.format(vte_prefix / vte_localedir), - '-DGLIB_DISABLE_DEPRECATION_WARNINGS', + '-DVTE_DISABLE_DEPRECATION_WARNINGS', '-DVTE_COMPILATION', '-UPARSER_INCLUDE_NOP', ] @@ -281,7 +281,7 @@ reflect_vte = executable( 'reflect-vte', sources: reflect_sources, dependencies: [gtk3_dep, libvte_gtk3_dep], - c_args: ['-DUSE_VTE'], + c_args: ['-DUSE_VTE', '-DVTE_DISABLE_DEPRECATION_WARNINGS'], include_directories: top_inc, install: false, ) @@ -296,6 +296,7 @@ xticker = executable( 'xticker', sources: xticker_sources, dependencies: [glib_dep], + c_args: ['-DVTE_DISABLE_DEPRECATION_WARNINGS'], include_directories: top_inc, install: false, ) |