[libgdata: 3/6] build: Add minimum and maximum dependencies for GLib



commit d15d1597d143228ac321e1bb25ec459cb7c3781a
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Aug 21 10:36:24 2019 +0300

    build: Add minimum and maximum dependencies for GLib
    
    This hides a load of API deprecation warnings from the latest version of
    GLib, which we’re not ready to adapt to yet.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>

 demos/meson.build       | 2 +-
 gdata/meson.build       | 2 +-
 gdata/tests/meson.build | 2 +-
 meson.build             | 5 +++++
 4 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/demos/meson.build b/demos/meson.build
index a8f4db0b..2d5944e0 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -25,7 +25,7 @@ foreach demo: demos
 
   executable(
     demo[1],
-    c_args: demos_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(demo[1])],
+    c_args: demos_c_args + common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(demo[1])],
     include_directories: top_inc_dir,
     kwargs: kwargs,
   )
diff --git a/gdata/meson.build b/gdata/meson.build
index 10a0b65d..a42bae71 100644
--- a/gdata/meson.build
+++ b/gdata/meson.build
@@ -138,7 +138,7 @@ libgdata_lib = shared_library(
   'gdata',
   include_directories: incs,
   sources: sources + enum_headers + marshal_files,
-  c_args: ['-DG_LOG_DOMAIN="@0@"'.format(gdata_name)],
+  c_args: common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(gdata_name)],
   dependencies: gdata_deps + gdata_private_deps,
   link_args: ldflags,
   link_depends: symbol_map,
diff --git a/gdata/tests/meson.build b/gdata/tests/meson.build
index 52154e7a..6c147d32 100644
--- a/gdata/tests/meson.build
+++ b/gdata/tests/meson.build
@@ -43,7 +43,7 @@ foreach test_name, extra_args: tests
   exe = executable(
     test_name,
     test_name + '.c',
-    c_args: '-DG_LOG_DOMAIN="@0@"'.format(gdata_name),
+    c_args: common_c_args + ['-DG_LOG_DOMAIN="@0@"'.format(gdata_name)],
     include_directories: top_inc_dir,
     dependencies: common_deps + extra_args.get('dependencies', []),
     sources: tests_sources,
diff --git a/meson.build b/meson.build
index 36d8cc1c..f9686ea3 100644
--- a/meson.build
+++ b/meson.build
@@ -83,6 +83,11 @@ gdata_deps = [
   dependency('libxml-2.0'),
 ]
 
+common_c_args = [
+  '-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_44',
+  '-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_60',
+]
+
 # Private dependencies for libgdata (specifically used for pkgconfig)
 gdata_private_deps = [
   dependency('gthread-2.0'),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]