[gssdp] meson: Clean-up configure options



commit a73d89ac886b6b09c28a976d08eef6ac44c040da
Author: Jens Georg <mail jensge org>
Date:   Fri Oct 26 16:43:47 2018 +0200

    meson: Clean-up configure options

 libgssdp/meson.build |  2 +-
 meson.build          | 25 +++++--------------------
 meson_options.txt    |  6 +++---
 3 files changed, 9 insertions(+), 24 deletions(-)
---
diff --git a/libgssdp/meson.build b/libgssdp/meson.build
index ab875d6..bfc443b 100644
--- a/libgssdp/meson.build
+++ b/libgssdp/meson.build
@@ -62,7 +62,7 @@ pkg.generate(libraries: [ libgssdp ],
              description: 'GObject-based SSDP library',
              requires_private: ['gobject-2.0', 'gio-2.0'])
 
-if introspection_available
+if get_option('introspection')
     gir = gnome.generate_gir(libgssdp,
             sources : headers + sources + enums,
             namespace : 'GSSDP',
diff --git a/meson.build b/meson.build
index 09d428e..f167152 100644
--- a/meson.build
+++ b/meson.build
@@ -2,13 +2,6 @@ project('GSSDP', 'c', version: '1.1.0')
 gnome = import('gnome')
 pkg = import('pkgconfig')
 
-as_version = meson.project_version() # set in project() below
-ver_arr = as_version.split('.')
-
-as_major_version = ver_arr[0]
-as_minor_version = ver_arr[1]
-as_micro_version = ver_arr[2]
-
 cc = meson.get_compiler('c')
 
 conf = configuration_data()
@@ -77,27 +70,19 @@ dependencies = [
     dependency('libsoup-2.4', version : '>= 2.26.1')
 ]
 
-if get_option('ui')
-  gtk = dependency('gtk+-3.0', version : '>= 3.12', required: false)
-endif
-
-gir = find_program('g-ir-scanner', required: false)
-vapigen = find_program('vapigen', required: false)
-
-introspection_available = gir.found() and get_option('introspection')
-vapi_available = introspection_available and vapigen.found() and get_option('vapi')
-
 subdir('libgssdp')
 subdir('tests')
-if get_option('ui') and gtk.found()
+
+if get_option('sniffer')
+  gtk = dependency('gtk+-3.0', version : '>= 3.12')
   subdir('tools')
 endif
 
-if vapi_available
+if get_option('vapi') and get_option('introspection')
   subdir('vala')
 endif
 
-if get_option('docs')
+if get_option('gtk_doc')
   subdir('doc')
 endif
 
diff --git a/meson_options.txt b/meson_options.txt
index 7e02220..ab1f0bd 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,5 +1,5 @@
-option('docs', type: 'boolean', value: false, description: 'Enable generating the API reference (depends on 
GTK-Doc)')
-option('ui', type: 'boolean', value: true, description: 'Build GTK+ UI tool')
+option('gtk_doc', type: 'boolean', value: false, description: 'Enable generating the API reference (depends 
on GTK-Doc)')
+option('sniffer', type: 'boolean', value: true, description: 'Compile graphical SSDP sniffer')
 option('introspection', type: 'boolean', value : true, description: 'Enable or disable GObject 
Introspection')
-option('vapi', type: 'boolean', value: true, description: 'Enable or disable generation of vala vapi file')
+option('vapi', type: 'boolean', value: true, description: 'Enable or disable generation of Vala vapi file')
 option('examples', type: 'boolean', value: true, description : 'Enable or disable examples')


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