[libgnome-volume-control] build: Rename build options



commit b4854a80a96311fc47f64a41b32a3fe01ad1afec
Author: Iñigo Martínez <inigomartinez gmail com>
Date:   Sat Jan 27 08:37:41 2018 +0100

    build: Rename build options
    
    Following the meson porting guidelines, this patch renames the build
    options. The list of changes is as follows:
    
    - Remove the with prefix from string options.
    - The character separator from multi-word options has been changed
      to underscore.
    
    It also changes the introspection and static meson variables to be
    consistent with the one used for alsa.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792948

 meson.build       |   16 ++++++++--------
 meson_options.txt |    6 +++---
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/meson.build b/meson.build
index 68386c3..8bae82b 100644
--- a/meson.build
+++ b/meson.build
@@ -18,8 +18,8 @@ libpulse = dependency('libpulse', version: '>= 2.0')
 libpulse_glib = dependency('libpulse-mainloop-glib')
 
 cdata = configuration_data()
-cdata.set_quoted('GETTEXT_PACKAGE', get_option('package-name'))
-cdata.set_quoted('PACKAGE_VERSION', get_option('package-version'))
+cdata.set_quoted('GETTEXT_PACKAGE', get_option('package_name'))
+cdata.set_quoted('PACKAGE_VERSION', get_option('package_version'))
 
 libgvc_inc = include_directories('.')
 
@@ -67,20 +67,20 @@ if enable_alsa
 endif
 cdata.set('HAVE_ALSA', enable_alsa)
 
-static = get_option('static')
-with_introspection = get_option('with-introspection')
+enable_static = get_option('static')
+enable_introspection = get_option('introspection')
 
-if static and with_introspection
+if enable_static and enable_introspection
   error('Currently meson requires a shared library for building girs.')
 endif
 
 c_args = ['-DG_LOG_DOMAIN="Gvc"']
 
-if with_introspection
+if enable_introspection
   c_args += '-DWITH_INTROSPECTION'
 endif
 
-if static
+if enable_static
   libgvc_static = static_library('gvc',
     sources: libgvc_gir_sources + libgvc_no_gir_sources,
     include_directories: libgvc_inc,
@@ -107,7 +107,7 @@ else
   libgvc = libgvc_shared
 endif
 
-if with_introspection
+if enable_introspection
   if pkgdatadir == ''
     error('Installing introspection, but pkgdatadir is unset!')
   elif (pkglibdir == '')
diff --git a/meson_options.txt b/meson_options.txt
index 379a6c7..38513e3 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,10 +1,10 @@
-option('package-name',
+option('package_name',
   type: 'string',
   value: '',
   description: 'The value for the GETTEXT_PACKAGE define.'
 )
 
-option('package-version',
+option('package_version',
   type: 'string',
   value: '',
   description: 'The value for the PACKAGE_VERSION define.'
@@ -34,7 +34,7 @@ option('static',
   description: 'Build as a static library.'
 )
 
-option('with-introspection',
+option('introspection',
   type: 'boolean',
   value: false,
   description: 'Build gobject-introspection support'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]