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 0313c0a81ae53cb0ff858f4f17d50848d0bf8e87..33ecc2c2746c6bd08eae361869589b18d83b6594 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 e97724fb30be26317bd8300de7d643c7eb3e3e70..324355c1e52178fc1bbafa90fba806a582bb164c 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()