mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
meson: add option to disable build of GStreamer unit test library
This commit is contained in:
parent
fcbd110810
commit
6d34f57cb6
4 changed files with 20 additions and 4 deletions
|
@ -2,4 +2,9 @@ subdir('base')
|
|||
subdir('controller')
|
||||
subdir('net')
|
||||
subdir('helpers')
|
||||
|
||||
if get_option('check').disabled()
|
||||
gst_check_dep = disabler() # KISS for now
|
||||
else
|
||||
subdir('check')
|
||||
endif
|
||||
|
|
|
@ -18,6 +18,7 @@ option('memory-alignment', type: 'combo',
|
|||
value: 'malloc')
|
||||
|
||||
# Feature options
|
||||
option('check', type : 'feature', value : 'auto', description : 'Build unit test libraries')
|
||||
option('libunwind', type : 'feature', value : 'auto', description : 'Use libunwind to generate backtraces')
|
||||
option('bash-completion', type : 'feature', value : 'auto', description : 'Install bash completion files')
|
||||
|
||||
|
|
|
@ -22,14 +22,17 @@ pkgconf.set('netlibdir', join_paths(meson.build_root(), gst_net.outdir()))
|
|||
|
||||
pkg_install_dir = '@0@/pkgconfig'.format(get_option('libdir'))
|
||||
|
||||
pkg_files = ['gstreamer-base',
|
||||
pkg_files = [
|
||||
'gstreamer-base',
|
||||
'gstreamer-controller',
|
||||
'gstreamer-check',
|
||||
'gstreamer-net',
|
||||
'gstreamer'
|
||||
]
|
||||
|
||||
if not get_option('check').disabled()
|
||||
pkg_files += ['gstreamer-check']
|
||||
pkgconf.set('checklibdir', join_paths(meson.build_root(), gst_check.outdir()))
|
||||
endif
|
||||
|
||||
foreach p : pkg_files
|
||||
infile = p + '.pc.in'
|
||||
|
|
|
@ -126,6 +126,13 @@ test_defines = [
|
|||
'-DGST_DISABLE_DEPRECATED',
|
||||
]
|
||||
|
||||
# sanity checking
|
||||
if get_option('check').disabled()
|
||||
if get_option('tests').enabled()
|
||||
error('Building of unit tests was requested, but GStreamer check library was disabled.')
|
||||
endif
|
||||
endif
|
||||
|
||||
glib_deps = [gio_dep, gobject_dep, gmodule_dep, glib_dep]
|
||||
gst_deps = [gst_dep, gst_base_dep, gst_check_dep, gst_net_dep, gst_controller_dep]
|
||||
|
||||
|
|
Loading…
Reference in a new issue