From 2fb11f25ac6ad79a8af598af03f6b54ead394b9b Mon Sep 17 00:00:00 2001 From: Bruce Cowan <bruce@bcowan.me.uk> Date: Tue, 21 Sep 2021 19:29:24 +0100 Subject: [PATCH] Better configuration file handling --- meson.build | 15 ++++++--------- src/main.c | 2 +- src/meson.build | 4 ++-- src/rugby-app-window.c | 2 +- src/rugby-possibility-widget.c | 2 +- src/rugby-possibility.c | 2 +- 6 files changed, 12 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 99574da..9369ba8 100644 --- a/meson.build +++ b/meson.build @@ -16,15 +16,12 @@ gtk_dep = dependency('gtk4', version: '>= 4.0') conf = configuration_data() conf.set_quoted('VERSION','@VCS_TAG@') - -config_h = declare_dependency( - sources: vcs_tag( - input: configure_file( - output: 'config.h.in', - configuration: conf - ), - output: 'config.h', - ) +config_h = vcs_tag( + input: configure_file( + output: 'config.h.in', + configuration: conf + ), + output: 'config.h', ) cflags = [] diff --git a/src/main.c b/src/main.c index 4642cb0..d94fc32 100644 --- a/src/main.c +++ b/src/main.c @@ -3,7 +3,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" +#include <config.h> #include "rugby-app-window.h" #include "rugby-pref-window.h" diff --git a/src/meson.build b/src/meson.build index 903b613..9828a41 100644 --- a/src/meson.build +++ b/src/meson.build @@ -11,7 +11,7 @@ sources = [ ] executable('rugby', - sources, resources, compiled_schemas, - dependencies: [config_h, gio_dep, gtk_dep], + sources, config_h, resources, compiled_schemas, + dependencies: [gio_dep, gtk_dep], install_dir: get_option('bindir'), install: true) diff --git a/src/rugby-app-window.c b/src/rugby-app-window.c index 7c972fc..ca1b448 100644 --- a/src/rugby-app-window.c +++ b/src/rugby-app-window.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" +#include <config.h> #include "rugby-app-window.h" #include "rugby-list-store.h" diff --git a/src/rugby-possibility-widget.c b/src/rugby-possibility-widget.c index 94a1c94..4483c9f 100644 --- a/src/rugby-possibility-widget.c +++ b/src/rugby-possibility-widget.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" +#include <config.h> #include "rugby-possibility-widget.h" diff --git a/src/rugby-possibility.c b/src/rugby-possibility.c index 768a78c..7bedabe 100644 --- a/src/rugby-possibility.c +++ b/src/rugby-possibility.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: GPL-3.0-or-later */ -#include "config.h" +#include <config.h> #include "rugby-possibility.h" struct _RugbyPossibility -- GitLab