From: Nirbheek Chauhan Date: Sat, 5 May 2018 14:25:14 +0000 (+0530) Subject: meson: Update option names to omit disable_ prefixes X-Git-Tag: 1.19.3~491^2~541 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21e7ed502569572b5ee83d9262eb40c30e0c3d15;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/meson.build b/meson.build index 9ce3684..230799b 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('gst-devtools', 'c', version : '1.15.0.1', - meson_version : '>= 0.36.0', + meson_version : '>= 0.46.0', default_options : [ 'warning_level=1', 'c_std=gnu99', '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);' + \ 'gst_init(NULL,NULL);' ] 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') gtkdoc = find_program('gtkdoc-scan', required : false) 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 # 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) @@ -132,12 +132,12 @@ endforeach i18n = import('i18n') python3 = import('python3') -if get_option('disable_validate') == false +if get_option('validate') subdir('validate') endif -if get_option('disable_debug_viewer') == false +if get_option('debug_viewer') subdir('debug-viewer') endif -run_command(python3.find_python(), '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")') \ No newline at end of file +run_command(python3.find_python(), '-c', 'import shutil; shutil.copy("hooks/multi-pre-commit.hook", ".git/hooks/pre-commit")') diff --git a/meson_options.txt b/meson_options.txt index ab80cc6..065f0e1 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,12 +1,8 @@ -option('disable_validate', - type : 'boolean', value : false, - description : 'Whether to disable GstValidate') -option('disable_debug_viewer', - type : 'boolean', value : false, - description : 'Whether to disable GstDebugViewer') -option('disable_introspection', - type : 'boolean', value : false, - description : 'Whether to disable the introspection generation') -option('disable_gtkdoc', - type : 'boolean', value : false, - description : 'Whether to disable the documentation generation') +option('validate', type : 'boolean', value : true, + description : 'Build GstValidate') +option('debug_viewer', type : 'boolean', value : true, + description : 'Build GstDebugViewer') +option('introspection', type : 'boolean', value : true, yield : true, + description : 'Generate gobject-introspection bindings') +option('gtkdoc', type : 'boolean', value : true, yield : true, + description : 'Generate API documentation with gtk-doc') diff --git a/validate/meson.build b/validate/meson.build index 7771780..1a4c5d8 100644 --- a/validate/meson.build +++ b/validate/meson.build @@ -27,7 +27,7 @@ subdir('launcher') subdir('tools') if build_machine.system() == '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') else if find_program('gtkdoc-scan', required : false).found()