summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-17 01:49:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-08-17 01:49:37 +0530
commit5c462b9b12d4946c7d704bc7f19c50c9619caa24 (patch)
treecb135077cc08fa6892bc9b268766093f4c74a5ab
parent694d9dcde5eab98f18c8b776ce693302516df907 (diff)
meson: Add an option for tests
This is needed because we don't always have gstreamer-check available, for instance inside Cerbero on iOS.
-rw-r--r--meson.build1
-rw-r--r--meson_options.txt1
-rw-r--r--tests/meson.build6
3 files changed, 6 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index f75b2de1c..23e8fb272 100644
--- a/meson.build
+++ b/meson.build
@@ -374,6 +374,7 @@ gstvideo_dep = dependency('gstreamer-video-1.0', version : gst_req,
fallback : ['gst-plugins-base', 'video_dep'])
if host_machine.system() != 'windows'
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
+ required : get_option('tests'),
fallback : ['gstreamer', 'gst_check_dep'])
endif
diff --git a/meson_options.txt b/meson_options.txt
index 7755835b4..fb89f43b6 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -141,6 +141,7 @@ option('hls-crypto', type : 'combo', value : 'auto', choices : ['auto', 'nettle'
# Common feature options
option('examples', type : 'feature', value : 'auto', yield : true)
+option('tests', type : 'feature', value : 'auto', yield : true)
option('introspection', type : 'feature', value : 'auto', yield : true, description : 'Generate gobject-introspection bindings')
option('nls', type : 'feature', value : 'auto', yield: true, description : 'Enable native language support (translations)')
option('orc', type : 'feature', value : 'auto', yield : true)
diff --git a/tests/meson.build b/tests/meson.build
index f15fe4d05..035ba3cd0 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,6 +1,8 @@
# FIXME: make check work on windows
-if host_machine.system() != 'windows'
- subdir('check')
+if host_system != 'windows'
+ if not get_option('tests').disabled() and gstcheck_dep.found()
+ subdir('check')
+ endif
endif
if not get_option('examples').disabled()
subdir('examples')