summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build29
1 files changed, 17 insertions, 12 deletions
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