[gssdp/wip/meson: 10/17] meson: Port configure options



commit 2a1c5c4b0b5d46379b78eeee5d8dba4c469eba65
Author: Jens Georg <mail jensge org>
Date:   Fri Oct 26 16:43:44 2018 +0200

    meson: Port configure options

 meson.build       | 12 +++++++++---
 meson_options.txt |  3 +++
 2 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 04dd3d7..5a286e0 100644
--- a/meson.build
+++ b/meson.build
@@ -80,12 +80,18 @@ glib_dep = dependency('glib-2.0', version : '>= 2.32')
 gobject_dep = dependency('gobject-2.0', version : '>= 2.32')
 gio_dep = dependency('gio-2.0', version : '>= 2.32')
 soup_dep = dependency('libsoup-2.4', version : '>= 2.26.1')
-gtk = dependency('gtk+-3.0', version : '>= 3.12', required: false)
+
+if not get_option('without-gtk')
+  gtk = dependency('gtk+-3.0', version : '>= 3.12', required: false)
+endif
 
 subdir('libgssdp')
 subdir('tests')
-if (gtk.found())
+if not get_option('without-gtk') and gtk.found()
   subdir('tools')
 endif
 subdir('vala')
-subdir('doc')
+
+if get_option('enable-gtk-doc')
+  subdir('doc')
+endif
diff --git a/meson_options.txt b/meson_options.txt
new file mode 100644
index 0000000..4fe3945
--- /dev/null
+++ b/meson_options.txt
@@ -0,0 +1,3 @@
+option('enable-gtk-doc', type: 'boolean', value: false, description: 'Enable generating the API reference 
(depends on GTK-Doc)')
+option('without-gtk', type: 'boolean', value: false, description: 'Compile without GTK+ support')
+option('enable-introspection', type: 'boolean', value : true, description: 'Enable GObject Introspection')


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