[libgweather] Update option names to conform to the guidelines



commit d1ed7f160eb894cdd26d911ab2b6b141e3cabee1
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Nov 26 17:17:46 2017 -0800

    Update option names to conform to the guidelines
    
    And make gtk-doc optional

 meson.build       |   18 ++++++++++--------
 meson_options.txt |   10 ++++++----
 2 files changed, 16 insertions(+), 12 deletions(-)
---
diff --git a/meson.build b/meson.build
index 17a662c..98c512b 100644
--- a/meson.build
+++ b/meson.build
@@ -64,8 +64,8 @@ if c_compiler.links('char c; c = *((unsigned char *) nl_langinfo(_NL_MEASUREMENT
   config_h.set('HAVE__NL_MEASUREMENT_MEASUREMENT', 1)
 endif
 
-config_h.set_quoted('ZONEINFO_DIR', get_option('with-zoneinfo-dir'))
-config_h.set_quoted('OWM_APIKEY', get_option('with-owm-apikey'))
+config_h.set_quoted('ZONEINFO_DIR', get_option('zoneinfo_dir'))
+config_h.set_quoted('OWM_APIKEY', get_option('owm_apikey'))
 
 if get_option('default_library') != 'static'
   if host_machine.system() == 'windows'
@@ -88,27 +88,29 @@ configure_file(
   configuration: config_h,
 )
 
-if get_option('enable-glade-catalog') == 'no'
+if get_option('glade_catalog') == 'false'
   enable_glade_catalog = false
 else
-  glade_dep = dependency('gladeui-2.0', required: (get_option('enable-glade-catalog') == 'yes'))
+  glade_dep = dependency('gladeui-2.0', required: (get_option('glade_catalog') == 'true'))
   enable_glade_catalog = glade_dep.found()
   if enable_glade_catalog
-    glade_catalogdir = glade_dep.get_pkgconfig_variable('catalogdir')
+    glade_catalogdir = join_paths(datadir, 'glade', 'catalogs')
   endif
 endif
 
-enable_vala = get_option('enable-vala')
+enable_vala = get_option('enable_vala')
 if enable_vala == 'auto'
   enable_vala = find_program('vapigen', required: false).found()
 else
-  enable_vala = enable_vala != 'no'
+  enable_vala = enable_vala != 'false'
 endif
 
 subdir('libgweather')
 subdir('data')
 subdir('schemas')
-subdir('doc')
+if get_option('gtk_doc')
+  subdir('doc')
+endif
 subdir('po')
 subdir('po-locations')
 meson.add_install_script('meson/meson_post_install.py')
diff --git a/meson_options.txt b/meson_options.txt
index 3476082..19b2c6a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,8 +1,10 @@
-option('with-zoneinfo-dir', type: 'string', value: '/usr/share/zoneinfo',
+option('zoneinfo_dir', type: 'string', value: '/usr/share/zoneinfo',
        description: 'zoneinfo directory')
-option('with-owm-apikey', type: 'string', value: '',
+option('owm_apikey', type: 'string', value: '',
        description: 'Specify an API key for OpenWeatherMap (optional)')
-option('enable-glade-catalog', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+option('glade_catalog', type: 'combo', choices : ['true', 'false', 'auto'], value : 'auto',
        description: 'Install a glade catalog file')
-option('enable-vala', type: 'combo', choices : ['yes', 'no', 'auto'], value : 'auto',
+option('enable_vala', type: 'combo', choices : ['true', 'false', 'auto'], value : 'auto',
        description: 'Install vala bindings')
+option('gtk_doc', type: 'boolean', value: false,
+       description: 'Whether to generate the API reference')


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