meson: Make gobject-introspection optional

Sat, 22 Jul 2017 14:47:05 -0500

author
Mike Ruprecht <cmaiku@gmail.com>
date
Sat, 22 Jul 2017 14:47:05 -0500
changeset 38605
7822ba08659a
parent 38604
9ad76b0d9de7
child 38606
357f1b3c33d9

meson: Make gobject-introspection optional

This patch makes gobject-introspection optional based on if the
library is available. There may be better checks, but the meson
gnome module doesn't include any. This is good enough for skipping
it on Windows.

meson.build file | annotate | diff | comparison | revisions
--- a/meson.build	Sun Jul 16 18:58:37 2017 -0500
+++ b/meson.build	Sat Jul 22 14:47:05 2017 -0500
@@ -1130,7 +1130,8 @@
 	gplugin = dependency('gplugin', version : '>= 0.0.17')
 	# GPLUGIN_REQ sets pkg-config requirements in the .pc file
 	pkg_conf.set('GPLUGIN_REQ', ', gplugin')
-	enable_introspection = true
+	enable_introspection = dependency('gobject-introspection-1.0',
+	    version : '>= 1.30.0', required : false).found()
 else
 	gplugin = []
 	enable_introspection = false

mercurial