From 208258472cfe673641435285efc24ad26ab07431 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 5 May 2018 19:51:52 +0530 Subject: [PATCH] meson: Update option names to omit disable_ and with- prefixes Also yield common options to the outer project (gst-build in our case) so that they don't have to be set manually. --- meson.build | 6 +++--- meson_options.txt | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index ebea2e9816..228b256593 100644 --- a/meson.build +++ b/meson.build @@ -54,7 +54,7 @@ cdata.set_quoted('GST_LICENSE', 'LGPL') # cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) # GStreamer package name and origin url -gst_package_name = get_option('with-package-name') +gst_package_name = get_option('package-name') if gst_package_name == '' if gst_version_nano == 0 gst_package_name = 'GStreamer RTSP Server Library source release' @@ -65,7 +65,7 @@ if gst_package_name == '' endif endif cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name) -cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('with-package-origin')) +cdata.set_quoted('GST_PACKAGE_ORIGIN', get_option('package-origin')) configure_file(output : 'config.h', configuration : cdata) @@ -117,7 +117,7 @@ gstnet_dep = dependency('gstreamer-net-1.0', version : gst_req, gir = find_program('g-ir-scanner', required : false) gnome = import('gnome') -build_gir = gir.found() and not meson.is_cross_build() and not get_option('disable_introspection') +build_gir = gir.found() and not meson.is_cross_build() and get_option('introspection') gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' + \ 'g_setenv("GST_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \ 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ diff --git a/meson_options.txt b/meson_options.txt index cf9d95fb76..c8c5282115 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,11 +1,11 @@ -option('disable_introspection', - type : 'boolean', value : false, - description : 'Whether to disable the introspection generation') -option('with-package-name', type : 'string', +option('introspection', type : 'boolean', value : true, yield : true, + description : 'Generate gobject-introspection bindings') +option('package-name', type : 'string', yield : true, description : 'package name to use in plugins') -option('with-package-origin', type : 'string', value : 'Unknown package origin', +option('package-origin', type : 'string', + value : 'Unknown package origin', yield : true, description : 'package origin URL to use in plugins') option('tests', type : 'boolean', value : true, description : 'Build and enable unit tests') -option('examples', type : 'boolean', value : true, +option('examples', type : 'boolean', value : true, yield : true, description : 'Build the examples')