summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-10-16 21:59:02 +0100
committerEmmanuele Bassi <ebassi@gmail.com>2021-10-16 23:46:03 +0000
commite3e7945cea442500b33585f5432fcb53661e1232 (patch)
tree91bb4c80663ead9210b9e949d0f264120fa13ab2
parent8bd7e1d45b07fb8089b09bc2206a8929357dec12 (diff)
downloadlibgweather-e3e7945cea442500b33585f5432fcb53661e1232.tar.gz
build: Allow disabling the tests and tools
Projects that depend on libgweather and build it as part of their Flatpak manifest should have the option to skip building the tests.
-rw-r--r--libgweather/meson.build6
-rw-r--r--meson_options.txt2
2 files changed, 6 insertions, 2 deletions
diff --git a/libgweather/meson.build b/libgweather/meson.build
index d0a0aff..8262832 100644
--- a/libgweather/meson.build
+++ b/libgweather/meson.build
@@ -241,5 +241,7 @@ pkgconfig.generate(
],
)
-subdir('tests')
-subdir('tools')
+if get_option('tests')
+ subdir('tests')
+ subdir('tools')
+endif
diff --git a/meson_options.txt b/meson_options.txt
index 0e354da..bbf5a66 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -8,3 +8,5 @@ option('gtk_doc', type: 'boolean', value: true,
description: 'Whether to generate the API reference')
option('introspection', type: 'boolean', value: true,
description: 'Whether to generate introspection data')
+option('tests', type: 'boolean', value: true,
+ description: 'Whether to build the tests and tools')