[libgnome-volume-control/wip/inigomartinez/meson: 2/8] build: Rename build options



commit 6a9621f660ede185eab38ae51fa4cefbaf17e2aa
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 meson variable to be consistent
    with the one used for alsa.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=792948

 meson.build       |   12 ++++++------
 meson_options.txt |    6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 5819c36..ecc0f62 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('.')
 
@@ -68,15 +68,15 @@ endif
 cdata.set('HAVE_ALSA', enable_alsa)
 
 static = get_option('default_library') == 'static'
-with_introspection = get_option('with-introspection')
+enable_introspection = get_option('introspection')
 
-if static and with_introspection
+if 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
 
@@ -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 1db3921..36f84cd 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.'
@@ -28,7 +28,7 @@ option('alsa',
   description: 'Build ALSA support.'
 )
 
-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]