summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2018-06-26 15:40:33 +0200
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2018-06-26 15:40:33 +0200
commitbed3076bc6146ec3ed6ba404655ce0bd06173566 (patch)
tree0d4e69c69e07693f2db86b4ab2a7c1e89a109eed /src
parent92c04ece8e2bb63a9e9971122e6eca2b8db09a84 (diff)
downloaduca-bed3076bc6146ec3ed6ba404655ce0bd06173566.tar.gz
uca-bed3076bc6146ec3ed6ba404655ce0bd06173566.tar.bz2
uca-bed3076bc6146ec3ed6ba404655ce0bd06173566.tar.xz
uca-bed3076bc6146ec3ed6ba404655ce0bd06173566.zip
meson: allow disabling introspection generation
Diffstat (limited to 'src')
-rw-r--r--src/meson.build26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/meson.build b/src/meson.build
index 5bd5509..2a3f8da 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -43,17 +43,21 @@ lib = library('uca',
install: true,
)
-gnome.generate_gir(lib,
- namespace: 'Uca',
- nsversion: '@0@.0'.format(version_major),
- sources: sources + headers,
- install: true,
- includes: [
- 'GLib-2.0',
- 'GObject-2.0',
- 'GModule-2.0',
- ],
-)
+gir = find_program('g-ir-scanner', required: false)
+
+if gir.found() and get_option('introspection')
+ gnome.generate_gir(lib,
+ namespace: 'Uca',
+ nsversion: '@0@.0'.format(version_major),
+ sources: sources + headers,
+ install: true,
+ includes: [
+ 'GLib-2.0',
+ 'GObject-2.0',
+ 'GModule-2.0',
+ ],
+ )
+endif
pkg = import('pkgconfig')