meson: Always use a dependency object for dependencies
authorNirbheek Chauhan <nirbheek@centricular.com>
Wed, 5 Sep 2018 11:02:07 +0000 (16:32 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Wed, 5 Sep 2018 11:03:43 +0000 (16:33 +0530)
Fixes a configure error with gst-build:

subprojects/gst-plugins-base/meson.build:235:2: ERROR:  Fetched variable 'gst_check_dep' in the subproject 'gstreamer' is not a dependency object.

libs/gst/meson.build
tests/meson.build

index 0313c0a..33ecc2c 100644 (file)
@@ -4,7 +4,7 @@ subdir('net')
 subdir('helpers')
 
 if get_option('check').disabled()
-  gst_check_dep = disabler() # KISS for now
+  gst_check_dep = dependency('', required : false)
 else
   subdir('check')
 endif
index e97724f..324355c 100644 (file)
@@ -1,7 +1,7 @@
 if not get_option('benchmarks').disabled()
   subdir('benchmarks')
 endif
-if not get_option('tests').disabled()
+if not get_option('tests').disabled() and gst_check_dep.found()
   subdir('check')
 endif
 if not get_option('examples').disabled()