From: Tim-Philipp Müller Date: Wed, 19 Sep 2018 11:00:32 +0000 (+0100) Subject: meson: add glib-checks option to disable API guards and such X-Git-Tag: 1.19.3~505^2~122 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6c37b359eefebe634e7fb467173a6cac2407e2cc;p=platform%2Fupstream%2Fgstreamer.git meson: add glib-checks option to disable API guards and such We want this enabled by default, also in releases, but people may want to disable this for performance-critical workloads or on embedded devices. --- diff --git a/meson.build b/meson.build index 9013477..7f786e9 100644 --- a/meson.build +++ b/meson.build @@ -230,6 +230,12 @@ if glib_asserts.disabled() or (glib_asserts.auto() and not gst_version_is_dev) add_project_arguments('-DG_DISABLE_ASSERT', language: 'c') endif +glib_checks = get_option('glib-checks') +if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev) + message('Disabling GLib checks') + add_project_arguments('-DG_DISABLE_CHECKS', language: 'c') +endif + presetdir = join_paths(get_option('datadir'), 'gstreamer-' + api_version, 'presets') pkgconfig = import('pkgconfig') diff --git a/meson_options.txt b/meson_options.txt index 45801c1..3e2374d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -27,6 +27,8 @@ option('gobject-cast-checks', type : 'feature', value : 'auto', yield : true, description: 'Enable run-time GObject cast checks (auto = enabled for development, disabled for stable releases)') option('glib-asserts', type : 'feature', value : 'enabled', yield : true, description: 'Enable GLib assertion (auto = enabled for development, disabled for stable releases)') +option('glib-checks', type : 'feature', value : 'enabled', yield : true, + description: 'Enable GLib checks such as API guards (auto = enabled for development, disabled for stable releases)') # Common options option('package-name', type : 'string', yield : true,