meson: Update option names to omit disable_ and with- prefixes
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 13:57:24 +0000 (19:27 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 15:01:01 +0000 (20:31 +0530)
Also yield common options to the outer project (gst-build in our case)
so that they don't have to be set manually.

meson.build
meson_options.txt
sys/v4l2/meson.build

index 29f8a5e..50c399e 100644 (file)
@@ -187,7 +187,7 @@ foreach extra_arg : warning_c_flags
 endforeach
 
 # 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_version_nano == 0
     gst_package_name = 'GStreamer Good Plug-ins source release'
@@ -198,7 +198,7 @@ if gst_package_name == ''
   endif
 endif
 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'))
 
 # Mandatory GST deps
 gst_dep = dependency('gstreamer-1.0', version : gst_req,
@@ -314,8 +314,8 @@ libsinc = include_directories('gst-libs')
 
 have_orcc = false
 orcc_args = []
-if get_option('use_orc') != 'no'
-  need_orc = get_option('use_orc') == 'yes'
+if get_option('orc') != 'no'
+  need_orc = get_option('orc') == 'yes'
   # Used by various libraries/elements that use Orc code
   orc_dep = dependency('orc-0.4', version : '>= 0.4.17', required : need_orc)
   orcc = find_program('orcc', required : need_orc)
@@ -334,7 +334,7 @@ endif
 if gst_dep.type_name() == 'internal'
     gst_proj = subproject('gstreamer')
 
-    if gst_proj.get_variable('disable_gst_debug')
+    if not gst_proj.get_variable('gst_debug')
         message('GStreamer debug system is disabled')
         add_project_arguments('-Wno-unused', language: 'c')
     else
index dccf42e..af0f53e 100644 (file)
@@ -1,10 +1,12 @@
 # Enable V4L2 plugin to probe devices at plugin load
-option('v4l2-probe', type : 'boolean', value : true)
-# Use libv4l2 for some obscure format conversions
-option('with-libv4l2', type : 'boolean', value : true)
-# Whether to use orc or not (auto will autodetect, yes will error out if not found)
-option('use_orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
-option('with-package-name', type : 'string',
+option('v4l2-probe', type : 'boolean', value : true,
+       description : 'Probe v4l2 devices when the v4l2 plugin is loaded')
+option('libv4l2', type : 'boolean', value : true,
+       description : 'Use libv4l2 for some obscure format conversions')
+
+# Common options
+option('orc', type : 'combo', choices : ['yes', 'no', 'auto'], value : 'auto')
+option('package-name', type : 'string', yield : true,
        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')
index 0f06558..721d53d 100644 (file)
@@ -35,7 +35,7 @@ if cc.has_header('linux/videodev2.h') or cc.has_header('sys/videodev2.h') or cc.
 
   # libv4l2 is only needed for converting some obscure formats
   # FIXME: Add a full list of the formats here
-  if get_option('with-libv4l2')
+  if get_option('libv4l2')
     libv4l2_dep = dependency('libv4l2', required : false)
     cdata.set('HAVE_LIBV4L2', libv4l2_dep.found())
     libv4l2_deps = [libv4l2_dep]