meson: Update option names to omit prefixes
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 14:55:52 +0000 (20:25 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 15:00:29 +0000 (20:30 +0530)
Also, common options are now consistent across all gstreamer modules,
and are inherited automatically.

meson.build
meson_options.txt

index 21d1820..5c423cb 100644 (file)
@@ -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']
+if get_option('bad')
+    subprojects += ['gst-plugins-bad']
 endif
 
-if not get_option('disable_gst_plugins_bad')
-    subprojects += ['gst-plugins-bad']
+if get_option('ugly')
+    subprojects += ['gst-plugins-ugly']
 endif
 
-if not get_option('disable_gst_libav')
+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
index 95acaad..9c1d732 100644 (file)
@@ -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')