summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2018-02-12 12:29:06 +0000
committerEmmanuele Bassi <ebassi@gnome.org>2018-02-12 12:29:06 +0000
commite48c4d5d69bed5b93a1cc63df21ff97dcecc658c (patch)
treead37dd7a8fe06a448b44b11a3b6e4d4fc1b8fa0d
parent95e7009b8bd4f1d1d9d5ebb907433a37c3d456ee (diff)
downloadgdk-pixbuf-e48c4d5d69bed5b93a1cc63df21ff97dcecc658c.tar.gz
build: Update the introspection rules
We should not be using cross-compilation to gate the generation of introspection data; it's perfectly possible to use a helper binary to run g-ir-scanner when cross-compiling — in fact, that's what projects like Yocto already do. We should also return a target for the introspection data, to allow using gdk-pixbuf as a sub-project.
-rw-r--r--gdk-pixbuf/meson.build32
-rw-r--r--meson.build2
2 files changed, 18 insertions, 16 deletions
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 5ab6f94f7..58d54f7b2 100644
--- a/gdk-pixbuf/meson.build
+++ b/gdk-pixbuf/meson.build
@@ -242,25 +242,27 @@ loaders_cache = custom_target('loaders.cache',
build_by_default: true)
loaders_dep = declare_dependency(sources: [ loaders_cache ])
-build_gir = get_option('gir') and not meson.is_cross_build()
+build_gir = get_option('gir')
if build_gir
gir_args = [
'--quiet',
- '--c-include=gdk-pixbuf/gdk-pixbuf.h',
'-DGDK_PIXBUF_COMPILATION',
]
- gnome.generate_gir(gdkpixbuf,
- sources: gdkpixbuf_sources + gdkpixbuf_headers + gdkpixbuf_enums + [
- gdk_pixbuf_features_h,
- 'gdk-pixdata.h',
- ],
- namespace: 'GdkPixbuf',
- nsversion: gdk_pixbuf_api_version,
- identifier_prefix: 'Gdk',
- symbol_prefix: 'gdk',
- export_packages: 'gdk-pixbuf-2.0',
- includes: [ 'GModule-2.0', 'Gio-2.0', ],
- install: true,
- extra_args: gir_args)
+ gdkpixbuf_gir = gnome.generate_gir(
+ gdkpixbuf,
+ sources: gdkpixbuf_sources + gdkpixbuf_headers + gdkpixbuf_enums + [
+ gdk_pixbuf_features_h,
+ 'gdk-pixdata.h',
+ ],
+ namespace: 'GdkPixbuf',
+ nsversion: gdk_pixbuf_api_version,
+ identifier_prefix: 'Gdk',
+ symbol_prefix: 'gdk',
+ export_packages: 'gdk-pixbuf-2.0',
+ includes: [ 'GModule-2.0', 'Gio-2.0', ],
+ header: 'gdk-pixbuf/gdk-pixbuf.h',
+ install: true,
+ extra_args: gir_args,
+ )
endif
diff --git a/meson.build b/meson.build
index 2f7b5d3b8..185ea6a26 100644
--- a/meson.build
+++ b/meson.build
@@ -6,7 +6,7 @@ project('gdk-pixbuf', 'c',
'warning_level=1',
'c_std=c99',
],
- meson_version: '>= 0.40.1')
+ meson_version: '>= 0.43.0')
add_project_arguments([ '-D_POSIX_C_SOURCE=200809L', '-D_DEFAULT_SOURCE', '-D_XOPEN_SOURCE' ], language: 'c')