diff options
author | Christoph Reiter <creiter@src.gnome.org> | 2019-03-29 21:45:14 +0100 |
---|---|---|
committer | Christoph Reiter <creiter@src.gnome.org> | 2019-04-11 16:45:36 +0200 |
commit | 331a92d559ce130efd4263cbb401073dba98a004 (patch) | |
tree | 767c01e6bb1458da8eb1ace5beab90880a0ce0ad /gtk | |
parent | 1bbd24451727b5d6dedb6d6e939f8532e8504fae (diff) | |
download | gtk+-331a92d559ce130efd4263cbb401073dba98a004.tar.gz |
meson: gtk gir: depend on xlib and include gtkx.h if X11 is enabled
To match what the autotools build does.
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/meson.build | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/gtk/meson.build b/gtk/meson.build index cb08e34506..cfe2a5d399 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -955,6 +955,14 @@ if build_gir gtkversion, ] + gtk_gir_includes = [gdk_gir[0], 'Atk-1.0'] + gtk_gir_extra_args = gir_args + ['-DGTK_COMPILATION', + '--c-include=gtk/gtk-a11y.h'] + if x11_enabled + gtk_gir_includes += ['xlib-2.0'] + gtk_gir_extra_args += ['--c-include=gtk/gtkx.h'] + endif + gtk_gir = gnome.generate_gir(libgtk, sources: gtk_introspection_sources, namespace: 'Gtk', @@ -962,14 +970,11 @@ if build_gir identifier_prefix: 'Gtk', symbol_prefix: 'gtk', export_packages: 'gtk+-3.0', - includes: [ gdk_gir[0], 'Atk-1.0', ], + includes: gtk_gir_includes, header: 'gtk/gtk.h', install: true, dependencies: gdk_gir_dep, - extra_args: gir_args + [ - '-DGTK_COMPILATION', - '--c-include=gtk/gtk-a11y.h', - ]) + extra_args: gtk_gir_extra_args) gtk_dep_sources += gtk_gir endif |