summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-04-21 12:54:18 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2019-05-06 13:34:40 +0100
commitbfc59c0c7b92fbf3b298bc366f7f584c3429a3f5 (patch)
tree7bfb317e1b1a8148e26f3e4d3058de9293313c54 /tests
parent83a9b030ff74fb264b194fa5e33cc2733aa2b7c8 (diff)
downloadgtk-doc-bfc59c0c7b92fbf3b298bc366f7f584c3429a3f5.tar.gz
Allow disabling the test suite
The GTK-Doc test suite depends on GLib/GObject, which creates a circular dependency between GLib and GTK-Doc. By adding an option to build GTK-Doc without its test suite, we can break the circular dependency.
Diffstat (limited to 'tests')
-rw-r--r--tests/gobject/meson.build2
-rw-r--r--tests/meson.build29
2 files changed, 18 insertions, 13 deletions
diff --git a/tests/gobject/meson.build b/tests/gobject/meson.build
index dc00692..d7525bd 100644
--- a/tests/gobject/meson.build
+++ b/tests/gobject/meson.build
@@ -1,2 +1,2 @@
subdir('src')
-subdir('docs') \ No newline at end of file
+subdir('docs')
diff --git a/tests/meson.build b/tests/meson.build
index b48f978..a60cf46 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,9 +1,3 @@
-glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
-glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
-
-gobject_prefix = gobject_dep.get_pkgconfig_variable('prefix')
-gobject_docpath = join_paths(gobject_prefix, 'share', 'gtk-doc', 'html')
-
gtkdoc_unit_tests = [
'check',
'common',
@@ -31,9 +25,20 @@ endforeach
subdir('helpers')
-subdir('annotations')
-subdir('bugs')
-subdir('empty')
-subdir('fail')
-subdir('gobject')
-subdir('program')
+if get_option('tests') == true
+ glib_dep = dependency('glib-2.0', version: glib_req)
+ gobject_dep = dependency('gobject-2.0', version: glib_req)
+
+ glib_prefix = glib_dep.get_pkgconfig_variable('prefix')
+ glib_docpath = join_paths(glib_prefix, 'share', 'gtk-doc', 'html')
+
+ gobject_prefix = gobject_dep.get_pkgconfig_variable('prefix')
+ gobject_docpath = join_paths(gobject_prefix, 'share', 'gtk-doc', 'html')
+
+ subdir('annotations')
+ subdir('bugs')
+ subdir('empty')
+ subdir('fail')
+ subdir('gobject')
+ subdir('program')
+endif