Skip to content

Commit

Permalink
meson: allow disabling introspection generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Vogelgesang committed Jun 26, 2018
1 parent 92c04ec commit bed3076
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
3 changes: 3 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
option('introspection',
type: 'boolean', value: true,
description: 'Build introspection data (requires gobject-introspection')
26 changes: 15 additions & 11 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit bed3076

Please sign in to comment.