From 24880717cf9dab2b7d0a43e13552a156e727537d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 7 Aug 2017 11:06:58 +0100 Subject: [PATCH] meson: fix a few warnings --- gst/meson.build | 22 +++++++++++++++++++++- meson.build | 3 +-- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/gst/meson.build b/gst/meson.build index 2b6b6ee..e1ecea3 100644 --- a/gst/meson.build +++ b/gst/meson.build @@ -148,7 +148,8 @@ gst_headers = [ ] 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'] else gst_registry = [] @@ -158,6 +159,25 @@ endif # still add to the original cdata later. 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', output : 'gstconfig.h', install_dir : 'include/gstreamer-1.0/gst', diff --git a/meson.build b/meson.build index 5941d7a..4f728f0 100644 --- a/meson.build +++ b/meson.build @@ -320,8 +320,7 @@ if cc.has_header('execinfo.h') 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') +if disable_gst_debug add_project_arguments(['-Wno-unused'], language: 'c') endif -- 2.7.4