[gdk-pixbuf] build: Update the introspection rules



commit e48c4d5d69bed5b93a1cc63df21ff97dcecc658c
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Feb 12 12:29:06 2018 +0000

    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.

 gdk-pixbuf/meson.build |   32 +++++++++++++++++---------------
 meson.build            |    2 +-
 2 files changed, 18 insertions(+), 16 deletions(-)
---
diff --git a/gdk-pixbuf/meson.build b/gdk-pixbuf/meson.build
index 5ab6f94..58d54f7 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 2f7b5d3..185ea6a 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')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]