[gimp] libgimp: disable GObject Introspection generation when cross-compiling.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] libgimp: disable GObject Introspection generation when cross-compiling.
- Date: Sun, 22 Sep 2019 18:08:38 +0000 (UTC)
commit edd824ddef31fa22831d6af4f9f39040ece8ad47
Author: Jehan <jehan girinstud io>
Date: Sun Sep 22 19:51:07 2019 +0200
libgimp: disable GObject Introspection generation when cross-compiling.
This is hopefully a temporary setback since we want to consider the
introspected API as a core feature (otherwise we'd end up with third
party builds deactivating the feature, and get a very random experience
depending on where you got GIMP) hence don't want it to be optional
(note that I haven't added a configure option).
Anyway for now, it seems that cross-building introspected data is not
really supported (or I'm still figuring it out).
libgimp/meson.build | 94 ++++++++++++++++++++++++++++++-----------------------
1 file changed, 53 insertions(+), 41 deletions(-)
---
diff --git a/libgimp/meson.build b/libgimp/meson.build
index b8e398df5a..5ae1d1ead0 100644
--- a/libgimp/meson.build
+++ b/libgimp/meson.build
@@ -339,49 +339,61 @@ introspectable_files = [
'gimpparamspecs-body.c',
]
-libgimp_gir = gnome.generate_gir(
- libgimp,
- libgimpui,
- libgimpbase,
- libgimpcolor,
- libgimpconfig,
- libgimpmath,
- libgimpmodule,
- libgimpthumb,
- libgimpwidgets,
+if meson.is_cross_build()
+ gobject_introspection_warning = '\n '.join(['',
+ 'GObject Introspection is disabled while cross-compiling because',
+ 'GI tools do not manage to properly generate introspection data',
+ 'while cross-compiling. Nevertheless we consider our introspected',
+ 'API as a core component of GIMP, thus you are expected to build',
+ 'this data natively.'
+ ])
+ warning(gobject_introspection_warning)
+ warnings += gobject_introspection_warning
+else
+ libgimp_gir = gnome.generate_gir(
+ libgimp,
+ libgimpui,
+ libgimpbase,
+ libgimpcolor,
+ libgimpconfig,
+ libgimpmath,
+ libgimpmodule,
+ libgimpthumb,
+ libgimpwidgets,
- sources: introspectable_files,
- nsversion: gimp_api_version,
- namespace: 'Gimp',
- identifier_prefix: 'Gimp',
- # symbol_prefix: 'gimp',
+ sources: introspectable_files,
+ nsversion: gimp_api_version,
+ namespace: 'Gimp',
+ identifier_prefix: 'Gimp',
+ # symbol_prefix: 'gimp',
- extra_args: [
- '-DGIMP_COMPILATION',
- '-DGIMP_BASE_COMPILATION',
- '-DGIMP_COLOR_COMPILATION',
- '-DGIMP_CONFIG_COMPILATION',
- '-DGIMP_MATH_COMPILATION',
- '-DGIMP_MODULE_COMPILATION',
- '-DGIMP_THUMB_COMPILATION',
- '-DGIMP_WIDGETS_COMPILATION',
- ],
+ extra_args: [
+ '-DGIMP_COMPILATION',
+ '-DGIMP_BASE_COMPILATION',
+ '-DGIMP_COLOR_COMPILATION',
+ '-DGIMP_CONFIG_COMPILATION',
+ '-DGIMP_MATH_COMPILATION',
+ '-DGIMP_MODULE_COMPILATION',
+ '-DGIMP_THUMB_COMPILATION',
+ '-DGIMP_WIDGETS_COMPILATION',
+ ],
- includes: [
- 'Babl-0.1',
- 'cairo-1.0',
- 'GdkPixbuf-2.0',
- 'Gegl-0.4',
- 'Gio-2.0',
- 'GLib-2.0',
- 'GObject-2.0',
- 'Gtk-3.0',
- ],
+ includes: [
+ 'Babl-0.1',
+ 'cairo-1.0',
+ 'GdkPixbuf-2.0',
+ 'Gegl-0.4',
+ 'Gio-2.0',
+ 'GLib-2.0',
+ 'GObject-2.0',
+ 'Gtk-3.0',
+ ],
- link_with: [
- libgimpthumb,
- ],
+ link_with: [
+ libgimpthumb,
+ ],
- include_directories: rootInclude,
- install: true,
-)
+ include_directories: rootInclude,
+ install: true,
+ )
+endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]