meson: Support building with Gst debug disabled

This commit is contained in:
Thibault Saunier 2016-12-09 17:55:39 -03:00
parent f8df150e29
commit bd5d43e8f9
3 changed files with 11 additions and 2 deletions

View file

@ -316,6 +316,12 @@ if cc.has_header('execinfo.h')
endif
endif
disable_gst_debug = get_option('disable_gst_debug')
if get_option('disable_gst_debug')
cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
add_project_arguments(['-Wno-unused'], language: 'c')
endif
configure_file(input : 'config.h.meson',
output : 'config.h',
configuration : cdata)

View file

@ -3,9 +3,12 @@ gst_tracers_sources = [
'gstleaks.c',
'gststats.c',
'gsttracers.c',
'gstlog.c'
]
if not disable_gst_debug
gst_tracers_source += ['gstlog.c']
endif
if have_getrusage
gst_tracers_sources += ['gstrusage.c']
endif

View file

@ -30,7 +30,7 @@ core_tests = [
[ 'gst/gstobject.c' ],
[ 'gst/gstpad.c', not have_registry ],
[ 'gst/gstparamspecs.c' ],
[ 'gst/gstprintf.c', not have_debug ],
[ 'gst/gstprintf.c', disable_gst_debug],
[ 'gst/gstpipeline.c', not have_registry ],
[ 'gst/gstpoll.c' ],
[ 'gst/gstplugin.c', not have_registry ],