From f164b8d93f89e7cfc59e6359238c2588e6569126 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Sat, 5 May 2018 20:25:52 +0530 Subject: [PATCH] meson: Update option names to omit prefixes Also, common options are now consistent across all gstreamer modules, and are inherited automatically. --- meson.build | 32 ++++++++++++++------------------ meson_options.txt | 29 ++++++++++++++++------------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/meson.build b/meson.build index 21d1820863..5c423cb7cd 100644 --- a/meson.build +++ b/meson.build @@ -55,27 +55,27 @@ if gst_libav.length() == 0 message('WARNING: gst-libav not built as ffmpeg >= n3.1.2 not found on the system') endif -if get_option('enable_python') +if get_option('python') subprojects += ['gst-python'] endif -if not get_option('disable_gst_plugins_ugly') - subprojects += ['gst-plugins-ugly'] -endif - -if not get_option('disable_gst_plugins_bad') +if get_option('bad') subprojects += ['gst-plugins-bad'] endif -if not get_option('disable_gst_libav') +if get_option('ugly') + subprojects += ['gst-plugins-ugly'] +endif + +if get_option('libav') subprojects += gst_libav endif -if not get_option('disable_gst_omx') +if get_option('omx') subprojects += ['gst-omx'] endif -if not get_option('disable_gstreamer_vaapi') +if get_option('vaapi') if dependency('libva', version: ['>= 0.30.4', '!= 0.99.0'], required : false).found() subprojects += ['gstreamer-vaapi'] else @@ -83,7 +83,7 @@ if not get_option('disable_gstreamer_vaapi') endif endif -if not get_option('disable_gst_devtools') +if get_option('devtools') if dependency('json-glib-1.0', required : false).found() subprojects += ['gst-devtools'] else @@ -91,7 +91,7 @@ if not get_option('disable_gst_devtools') endif endif -if not get_option('disable_gst_editing_services') +if get_option('ges') if dependency('libxml-2.0', required : false).found() subprojects += ['gst-editing-services'] else @@ -99,11 +99,11 @@ if not get_option('disable_gst_editing_services') endif endif -if not get_option('disable_rtsp_server') +if get_option('rtsp_server') subprojects += ['gst-rtsp-server'] endif -if not get_option('disable_gstreamer_sharp') +if get_option('sharp') if add_languages('cs', required : false) if meson.version().version_compare('>=0.43') subprojects += ['gstreamer-sharp'] @@ -132,11 +132,7 @@ endforeach message('Building subprojects: ' + ', '.join(subprojects)) foreach subproj: subprojects - default_options = [] - if get_option('disable_introspection') - default_options += ['disable_introspection=true'] - endif - subproject(subproj, version: gst_version, default_options: default_options) + subproject(subproj, version: gst_version) cmdres = run_command(python3, '-c', symlink.format(subproj, meson.current_source_dir())) if cmdres.returncode() == 0 diff --git a/meson_options.txt b/meson_options.txt index 95acaad1b4..9c1d732e7d 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,14 +1,17 @@ -option('enable_python', type : 'boolean', value : false) -option('disable_gst_libav', type : 'boolean', value : false) -option('disable_gst_plugins_ugly', type : 'boolean', value : false) -option('disable_gst_plugins_bad', type : 'boolean', value : false) -option('disable_gst_devtools', type : 'boolean', value : false) -option('disable_gst_editing_services', type : 'boolean', value : false) -option('disable_rtsp_server', type : 'boolean', value : false) -option('disable_gst_omx', type : 'boolean', value : true) -option('disable_gstreamer_vaapi', type : 'boolean', value : false) -option('disable_gstreamer_sharp', type : 'boolean', value : false) -option('disable_introspection', - type : 'boolean', value : false, - description : 'Whether to disable the introspection generation') +option('python', type : 'boolean', value : true) +option('libav', type : 'boolean', value : true) +option('ugly', type : 'boolean', value : true) +option('bad', type : 'boolean', value : true) +option('devtools', type : 'boolean', value : true) +option('ges', type : 'boolean', value : true) +option('rtsp_server', type : 'boolean', value : true) +option('omx', type : 'boolean', value : false) +option('vaapi', type : 'boolean', value : true) +option('sharp', type : 'boolean', value : true) option('custom_subprojects', type : 'string', value : '', description : 'Comma-separated project names') + +# Common options, automatically inherited by subprojects +option('gtkdoc', type : 'boolean', value : true, + description : 'Generate API documentation with gtk-doc') +option('introspection', type : 'boolean', value : true, + description : 'Whether to disable the introspection generation')