[at-spi2-core: 1/2] Use a consistent style for the meson options



commit 56e6f9242b833c108f8f9fe3f2c66f7c3f552b1e
Author: Soapux <7521-Soapux users noreply gitlab gnome org>
Date:   Mon Jan 28 12:19:04 2019 -0600

    Use a consistent style for the meson options
    
    Following style guidelines from here:
    https://wiki.gnome.org/Initiatives/GnomeGoals/MesonPorting

 meson.build           |  6 +++---
 meson_options.txt     | 16 +++++++++++-----
 registryd/meson.build |  2 +-
 3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/meson.build b/meson.build
index 962bbb5..f47cbc7 100644
--- a/meson.build
+++ b/meson.build
@@ -55,7 +55,7 @@ gio_dep = dependency('gio-2.0', version: gio_req_version)
 dl_dep = cc.find_library('dl', required: false)
 
 x11_deps = []
-x11_option = get_option('enable-x11')
+x11_option = get_option('x11')
 if x11_option != 'no'
   x11_dep = dependency('x11', required: false)
 
@@ -96,7 +96,7 @@ at_spi_conf.set('ALIGNOF_DBIND_STRUCT', cc.alignment('dbind_struct', prefix: 'ty
 # introspection support
 have_gir = false
 
-introspection_option = get_option('enable-introspection')
+introspection_option = get_option('introspection')
 if introspection_option != 'no'
   gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false)
 
@@ -117,7 +117,7 @@ subdir('bus')
 subdir('registryd')
 subdir('test')
 
-if get_option('enable_docs')
+if get_option('docs')
   subdir('doc/libatspi')
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index f8ec862..c8d5fd1 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -19,11 +19,17 @@ option('systemd_user_dir',
        description: 'Location of the systemd user services',
        type: 'string',
        value: 'default')
-option('enable_docs',
+option('docs',
        description: 'Generate API reference for atspi (requires GTK-Doc)',
        type: 'boolean',
        value: false)
-
-option('enable-introspection', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 
'Enable GObject Introspection (depends on GObject)')
-
-option('enable-x11', type: 'combo', choices: ['yes', 'no', 'auto'], value: 'auto', description: 'Enable X11 
support')
+option('introspection',
+       description: 'Enable GObject Introspection (depends on GObject)',
+       type: 'combo',
+       choices: ['yes', 'no', 'auto'],
+       value: 'auto')
+option('x11',
+       description: 'Enable X11 support',
+       type: 'combo',
+       choices: ['yes', 'no', 'auto'],
+       value: 'auto')
diff --git a/registryd/meson.build b/registryd/meson.build
index eb8236e..c2404d2 100644
--- a/registryd/meson.build
+++ b/registryd/meson.build
@@ -16,7 +16,7 @@ registryd_deps = [
   dl_dep,
 ]
 
-x11_option = get_option('enable-x11')
+x11_option = get_option('x11')
 if x11_option != 'no'
   if x11_dep.found()
     registryd_sources += [


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