meson: fix a few warnings

This commit is contained in:
Tim-Philipp Müller 2017-08-07 11:06:58 +01:00
parent 33019ba580
commit 24880717cf
2 changed files with 22 additions and 3 deletions

View file

@ -148,7 +148,8 @@ gst_headers = [
] ]
install_headers(gst_headers, subdir : 'gstreamer-1.0/gst') install_headers(gst_headers, subdir : 'gstreamer-1.0/gst')
if not get_option('disable_registry') disable_registry = get_option('disable_registry')
if not disable_registry
gst_registry = ['gstregistrybinary.c'] gst_registry = ['gstregistrybinary.c']
else else
gst_registry = [] gst_registry = []
@ -158,6 +159,25 @@ endif
# still add to the original cdata later. # still add to the original cdata later.
gst_cdata = cdata gst_cdata = cdata
if disable_gst_debug
gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
else
gst_cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#undef GST_DISABLE_GST_DEBUG')
endif
if disable_registry
gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#define GST_DISABLE_REGISTRY 1')
else
gst_cdata.set('GST_DISABLE_REGISTRY_DEFINE', '#undef GST_DISABLE_REGISTRY')
endif
# FIXME: add --disable-parse option? (but autotools doesn't seem to set this
# define properly at all either even though it does expose the option)
gst_cdata.set('GST_DISABLE_PARSE_DEFINE', '#undef GST_DISABLE_PARSE')
# FIXME: add --disable-plugin option?
gst_cdata.set('GST_DISABLE_PLUGIN_DEFINE', '#undef GST_DISABLE_PLUGIN')
configure_file(input : 'gstconfig.h.in', configure_file(input : 'gstconfig.h.in',
output : 'gstconfig.h', output : 'gstconfig.h',
install_dir : 'include/gstreamer-1.0/gst', install_dir : 'include/gstreamer-1.0/gst',

View file

@ -320,8 +320,7 @@ if cc.has_header('execinfo.h')
endif endif
disable_gst_debug = get_option('disable_gst_debug') disable_gst_debug = get_option('disable_gst_debug')
if get_option('disable_gst_debug') if disable_gst_debug
cdata.set('GST_DISABLE_GST_DEBUG_DEFINE', '#define GST_DISABLE_GST_DEBUG 1')
add_project_arguments(['-Wno-unused'], language: 'c') add_project_arguments(['-Wno-unused'], language: 'c')
endif endif