mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 15:51:11 +00:00
meson: Add a feature option for tests
This autodetection is needed on iOS inside Cerbero where gstreamer-check-1.0 is not available.
This commit is contained in:
parent
4ac1362157
commit
a86c36b9a9
5 changed files with 10 additions and 5 deletions
|
@ -66,7 +66,8 @@ gst_pbutils_dep = dependency('gstreamer-pbutils-' + apiversion, version : gst_re
|
|||
gst_video_dep = dependency('gstreamer-video-' + apiversion, version : gst_req,
|
||||
fallback : ['gst-plugins-base', 'video_dep'])
|
||||
if host_machine.system() != 'windows'
|
||||
gstcheck_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
||||
gst_check_dep = dependency('gstreamer-check-1.0', version : gst_req,
|
||||
required : get_option('tests'),
|
||||
fallback : ['gstreamer', 'gst_check_dep'])
|
||||
endif
|
||||
|
||||
|
|
|
@ -6,3 +6,5 @@ option('gtk_doc', type : 'feature', value : 'auto', yield : true,
|
|||
description : 'Build API documentation with gtk-doc')
|
||||
option('introspection', type : 'feature', value : 'auto', yield : true,
|
||||
description : 'Generate gobject-introspection bindings')
|
||||
option('tests', type : 'feature', value : 'auto', yield : true,
|
||||
description : 'Build and enable unit tests')
|
||||
|
|
|
@ -36,6 +36,8 @@ else
|
|||
endif
|
||||
endif
|
||||
subdir('pkgconfig')
|
||||
subdir('tests')
|
||||
if not get_option('tests').disabled()
|
||||
subdir('tests')
|
||||
endif
|
||||
subdir('plugins')
|
||||
#subdir('po')
|
||||
|
|
|
@ -37,7 +37,7 @@ foreach t : validate_tests
|
|||
'validate/test-utils.c',
|
||||
c_args : gst_c_args + test_defines,
|
||||
include_directories : [inc_dirs],
|
||||
dependencies : [validate_dep, gstcheck_dep],
|
||||
dependencies : [validate_dep, gst_check_dep],
|
||||
)
|
||||
env.set('GST_REGISTRY',
|
||||
'@0@/@1@.registry'.format(meson.current_build_dir(), test_name))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# FIXME: make check work on windows
|
||||
if host_machine.system() != 'windows'
|
||||
subdir('check')
|
||||
if host_machine.system() != 'windows' and gst_check_dep.found()
|
||||
subdir('check')
|
||||
endif
|
||||
|
||||
subdir('launcher_tests')
|
||||
|
|
Loading…
Reference in a new issue