[libgdata: 1/6] build: Define G_LOG_DOMAIN in c_args rather than config.h
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgdata: 1/6] build: Define G_LOG_DOMAIN in c_args rather than config.h
- Date: Wed, 21 Aug 2019 07:47:35 +0000 (UTC)
commit 4a8b5635bfd2bb1f7ac188b87fb9e8eb967e79d0
Author: Philip Withnall <withnall endlessm com>
Date: Wed Aug 21 10:25:05 2019 +0300
build: Define G_LOG_DOMAIN in c_args rather than config.h
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 <withnall endlessm com>
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')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]