summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2022-08-17 18:40:56 -0400
committerCorentin Noël <tintou@noel.tf>2022-09-04 18:33:04 +0200
commitb417c90081cb8708b9bd4e330d96f286241f4a4b (patch)
tree708ae5d96cec955760c9a26e6dbeb20d86c7ca58
parent165649df5663f207d8553d10941f93b913f7741a (diff)
downloadlibgnomekbd-b417c90081cb8708b9bd4e330d96f286241f4a4b.tar.gz
meson: Install introspection data
And rename the option 'gir' to 'introspection' to match other GNOME projects.
-rw-r--r--libgnomekbd/meson.build40
-rw-r--r--meson.build2
-rw-r--r--meson_options.txt4
3 files changed, 28 insertions, 18 deletions
diff --git a/libgnomekbd/meson.build b/libgnomekbd/meson.build
index f98c67e..dcd7110 100644
--- a/libgnomekbd/meson.build
+++ b/libgnomekbd/meson.build
@@ -170,19 +170,27 @@ install_data(
install_dir: get_option('prefix') / get_option('datadir') / 'GConf' / 'gsettings'
)
-gnome.generate_gir(
- libgnomekbd_lib, libgnomekbdui_lib,
- sources: [
- libgnomekbd_sources,
- libgnomekbdui_sources,
- libgnomekbd_headers,
- libgnomekbdui_headers,
- gkbd_indicator_marshal,
- gkbd_keyboard_drawing_marshal,
- ],
- dependencies: [ libgnomekbd_deps, m_dep ],
- include_directories: root_include,
- namespace: 'Gkbd',
- nsversion: '3.0',
- includes: ['GObject-2.0', 'Gtk-3.0', 'xlib-2.0', 'Xkl-1.0'],
-)
+if get_option('introspection')
+ gir_dir = join_paths(get_option('prefix') / get_option('datadir'), '@0@-@1@'.format('gir', gnomekbd_gir_version))
+ typelib_dir = join_paths(get_option('prefix') / get_option('libdir'), '@0@-@1@'.format('girepository', gnomekbd_gir_version))
+
+ gnome.generate_gir(
+ libgnomekbd_lib, libgnomekbdui_lib,
+ sources: [
+ libgnomekbd_sources,
+ libgnomekbdui_sources,
+ libgnomekbd_headers,
+ libgnomekbdui_headers,
+ gkbd_indicator_marshal,
+ gkbd_keyboard_drawing_marshal,
+ ],
+ dependencies: [ libgnomekbd_deps, m_dep ],
+ include_directories: root_include,
+ namespace: 'Gkbd',
+ nsversion: '3.0',
+ includes: ['GObject-2.0', 'Gtk-3.0', 'xlib-2.0', 'Xkl-1.0'],
+ install: true,
+ install_dir_gir: gir_dir,
+ install_dir_typelib: typelib_dir,
+ )
+endif
diff --git a/meson.build b/meson.build
index 4b4a2f9..c6c2a6e 100644
--- a/meson.build
+++ b/meson.build
@@ -13,6 +13,8 @@ project('libgnomekbd', 'c',
library_version = '8.0.0'
gettext_domain = 'libgnomekbd'
+gnomekbd_gir_version = '1.0'
+
gnome = import('gnome')
i18n = import('i18n')
diff --git a/meson_options.txt b/meson_options.txt
index 63596da..fef3b89 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,4 +1,4 @@
-option('gir',
+option('introspection',
type: 'boolean', value: true,
description: 'Generate gir data (requires gobject-introspection)')
option('vapi',
@@ -6,4 +6,4 @@ option('vapi',
description: 'Generate vapi data (requires vapigen)')
option('tests',
type : 'boolean', value : true,
- description: 'Enable tests') \ No newline at end of file
+ description: 'Enable tests')