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.
This commit is contained in:
Nirbheek Chauhan 2018-05-05 19:51:52 +05:30
parent 858a9d2054
commit 208258472c
2 changed files with 9 additions and 9 deletions

View file

@ -54,7 +54,7 @@ cdata.set_quoted('GST_LICENSE', 'LGPL')
# cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir'))) # cdata.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
# GStreamer package name and origin url # 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_package_name == ''
if gst_version_nano == 0 if gst_version_nano == 0
gst_package_name = 'GStreamer RTSP Server Library source release' gst_package_name = 'GStreamer RTSP Server Library source release'
@ -65,7 +65,7 @@ if gst_package_name == ''
endif endif
endif endif
cdata.set_quoted('GST_PACKAGE_NAME', gst_package_name) 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) 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) gir = find_program('g-ir-scanner', required : false)
gnome = import('gnome') 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**);' + \ 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_REGISTRY_1.0", "@0@", TRUE);'.format(meson.current_build_dir() + '/gir_empty_registry.reg') + \
'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \ 'g_setenv("GST_PLUGIN_PATH_1_0", "", TRUE);' + \

View file

@ -1,11 +1,11 @@
option('disable_introspection', option('introspection', type : 'boolean', value : true, yield : true,
type : 'boolean', value : false, description : 'Generate gobject-introspection bindings')
description : 'Whether to disable the introspection generation') option('package-name', type : 'string', yield : true,
option('with-package-name', type : 'string',
description : 'package name to use in plugins') 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') description : 'package origin URL to use in plugins')
option('tests', type : 'boolean', value : true, option('tests', type : 'boolean', value : true,
description : 'Build and enable unit tests') description : 'Build and enable unit tests')
option('examples', type : 'boolean', value : true, option('examples', type : 'boolean', value : true, yield : true,
description : 'Build the examples') description : 'Build the examples')