[libgdata: 1/2] meson: Fix G_LOG_DOMAIN for shared_library as well as demos



commit 8760c297909a5e13047d6db7f09c40fa7cf60123
Author: Mayank Sharma <mayank8019 gmail com>
Date:   Tue Jul 16 15:28:33 2019 +0530

    meson: Fix G_LOG_DOMAIN for shared_library as well as demos
    
    Currently, libgdata's debug output come from empty log domain. This
    interferes when libgdata's debug output needs to be separate from any
    client which is trying to use it. This commit fixes G_LOG_DOMAIN for
    libgdata as well as all the demos (which have their own log domains).
    
    Fixes: https://gitlab.gnome.org/GNOME/libgdata/issues/30

 demos/meson.build | 3 +--
 meson.build       | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/demos/meson.build b/demos/meson.build
index e07eccfd..dd0eccde 100644
--- a/demos/meson.build
+++ b/demos/meson.build
@@ -1,5 +1,4 @@
 demos_cargs = [
-  '-DG_LOG_DOMAIN="@0@"'.format(gdata_name),
   '-DLIBGDATA_DISABLE_DEPRECATED',
 ]
 
@@ -23,7 +22,7 @@ foreach demo: demos
 
   executable(
     demo[1],
-    c_args: demos_cargs,
+    c_args: demos_cargs + ['-DG_LOG_DOMAIN="@0@"'.format(demo[1])],
     include_directories: top_inc_dir,
     kwargs: kwargs,
   )
diff --git a/meson.build b/meson.build
index 36d8cc1c..ad2b0140 100644
--- a/meson.build
+++ b/meson.build
@@ -53,6 +53,7 @@ config_h.set_quoted('VERSION', gdata_version)
 config_h.set('_GNU_SOURCE', true)
 
 config_h.set_quoted('GETTEXT_PACKAGE', 'gdata')
+config_h.set_quoted('G_LOG_DOMAIN', gdata_name)
 
 gnome = import('gnome')
 pkgconfig = import('pkgconfig')


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