diff --git a/meson.build b/meson.build
index 1ae5ad2e214bfb4f01bc113bd3e83634db8a3b06..99574da82dc8cdc746a639f385f35f973e8fcff9 100644
--- a/meson.build
+++ b/meson.build
@@ -16,14 +16,16 @@ gtk_dep = dependency('gtk4', version: '>= 4.0')
 
 conf = configuration_data()
 conf.set_quoted('VERSION','@VCS_TAG@')
-vcs_tag(
-  input: configure_file(
-    output: 'config.h.in',
-    configuration: conf
-  ),
-  output: 'config.h',
+
+config_h = declare_dependency(
+  sources: vcs_tag(
+    input: configure_file(
+      output: 'config.h.in',
+      configuration: conf
+    ),
+    output: 'config.h',
+  )
 )
-configuration_inc = include_directories('.')
 
 cflags = []
 cflags += ['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46',
diff --git a/src/main.c b/src/main.c
index d94fc32f4f8502da681603df74d24baf8c48e5f8..4642cb00eff2004f1a49dd65b13e8e712eb36c88 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 3bb744834ca6a9f728329ab2240af6eb6c574733..903b613070a080daac79da23eb0ac349ee8b2962 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -12,7 +12,6 @@ sources = [
 
 executable('rugby',
            sources, resources, compiled_schemas,
-           dependencies: [gio_dep, gtk_dep],
-           include_directories: configuration_inc,
+           dependencies: [config_h, 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 ca1b4480afbaac6e669511e75554f3df2eac00b2..7c972fc9417ddf1c3e5cb4d36aacf482c8ffb323 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 4483c9f48348e6d40d688d0bfcd8d3d3faca6644..94a1c9482d5e0f45b3dbfbdd99a1ef5296896328 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 7bedabe8c3d790941685f40027a615c9774d7a18..768a78cf1eff678be34d5484396c3967de00ea80 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