From 4a8b5635bfd2bb1f7ac188b87fb9e8eb967e79d0 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 21 Aug 2019 10:25:05 +0300 Subject: build: Define G_LOG_DOMAIN in c_args rather than config.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Defining it in `config.h` means that *every* C file which emits a log or debug message needs to remember to include `config.h`. It’s a lot simpler and less error-prone to define `G_LOG_DOMAIN` in the `c_args` instead. Signed-off-by: Philip Withnall Fixes: #30 --- gdata/meson.build | 1 + meson.build | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/gdata/meson.build b/gdata/meson.build index d221800c..10a0b65d 100644 --- a/gdata/meson.build +++ b/gdata/meson.build @@ -138,6 +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)], dependencies: gdata_deps + gdata_private_deps, link_args: ldflags, link_depends: symbol_map, diff --git a/meson.build b/meson.build index ad2b0140..36d8cc1c 100644 --- a/meson.build +++ b/meson.build @@ -53,7 +53,6 @@ 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') -- cgit v1.2.1