meson: Update option names to omit disable_ and with- prefixes
authorNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 14:02:00 +0000 (19:32 +0530)
committerNirbheek Chauhan <nirbheek@centricular.com>
Sat, 5 May 2018 14:02:00 +0000 (19:32 +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

index cc6632f..daad19c 100644 (file)
@@ -120,7 +120,7 @@ cdata.set('GETTEXT_PACKAGE', '"gst-plugins-ugly-1.0"')
 cdata.set('GST_LICENSE', '"LGPL"')
 
 # 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 Ugly Plug-ins source release'
@@ -131,7 +131,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,
@@ -181,7 +181,7 @@ configinc = include_directories('.')
 libsinc = include_directories('gst-libs')
 
 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)
index 7d8b60a..65dde09 100644 (file)
@@ -1,6 +1,8 @@
 option('x264_libraries', type : 'string', value : '',
        description : 'Colon separated list of additional x264 library paths, e.g. for 10-bit version')
-option('with-package-name', type : 'string',
+
+# Common options
+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')