meson: Update option names to omit disable_ 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:55:14 +05:30
parent ba3b27fa83
commit 21e7ed5025
3 changed files with 15 additions and 19 deletions

View file

@ -1,6 +1,6 @@
project('gst-devtools', 'c', project('gst-devtools', 'c',
version : '1.15.0.1', version : '1.15.0.1',
meson_version : '>= 0.36.0', meson_version : '>= 0.46.0',
default_options : [ 'warning_level=1', default_options : [ 'warning_level=1',
'c_std=gnu99', 'c_std=gnu99',
'buildtype=debugoptimized' ]) 'buildtype=debugoptimized' ])
@ -89,13 +89,13 @@ gir_init_section = [ '--add-init-section=extern void gst_init(gint*,gchar**);' +
'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \ 'g_setenv("GST_PLUGIN_SYSTEM_PATH_1_0", "", TRUE);' + \
'gst_init(NULL,NULL);' ] 'gst_init(NULL,NULL);' ]
gir = find_program('g-ir-scanner', required : false) gir = find_program('g-ir-scanner', required : false)
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')
gnome = import('gnome') gnome = import('gnome')
gtkdoc = find_program('gtkdoc-scan', required : false) gtkdoc = find_program('gtkdoc-scan', required : false)
if gst_dep.type_name() == 'internal' if gst_dep.type_name() == 'internal'
gst_debug_disabled = subproject('gstreamer').get_variable('disable_gst_debug') gst_debug_disabled = not subproject('gstreamer').get_variable('gst_debug')
else else
# We can't check that in the case of subprojects as we won't # We can't check that in the case of subprojects as we won't
# be able to build against an internal dependency (which is not built yet) # be able to build against an internal dependency (which is not built yet)
@ -132,12 +132,12 @@ endforeach
i18n = import('i18n') i18n = import('i18n')
python3 = import('python3') python3 = import('python3')
if get_option('disable_validate') == false if get_option('validate')
subdir('validate') subdir('validate')
endif endif
if get_option('disable_debug_viewer') == false if get_option('debug_viewer')
subdir('debug-viewer') subdir('debug-viewer')
endif endif
run_command(python3.find_python(), '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")') run_command(python3.find_python(), '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")')

View file

@ -1,12 +1,8 @@
option('disable_validate', option('validate', type : 'boolean', value : true,
type : 'boolean', value : false, description : 'Build GstValidate')
description : 'Whether to disable GstValidate') option('debug_viewer', type : 'boolean', value : true,
option('disable_debug_viewer', description : 'Build GstDebugViewer')
type : 'boolean', value : false, option('introspection', type : 'boolean', value : true, yield : true,
description : 'Whether to disable GstDebugViewer') description : 'Generate gobject-introspection bindings')
option('disable_introspection', option('gtkdoc', type : 'boolean', value : true, yield : true,
type : 'boolean', value : false, description : 'Generate API documentation with gtk-doc')
description : 'Whether to disable the introspection generation')
option('disable_gtkdoc',
type : 'boolean', value : false,
description : 'Whether to disable the documentation generation')

View file

@ -27,7 +27,7 @@ subdir('launcher')
subdir('tools') subdir('tools')
if build_machine.system() == 'windows' if build_machine.system() == 'windows'
message('Disabling gtk-doc while building on Windows') message('Disabling gtk-doc while building on Windows')
elif get_option('disable_gtkdoc') elif not get_option('gtkdoc')
message('gtk-doc is disabled via options') message('gtk-doc is disabled via options')
else else
if find_program('gtkdoc-scan', required : false).found() if find_program('gtkdoc-scan', required : false).found()