[pango: 1/2] meson: add harfbuzz gobject dependency




commit 78dbeb8d04cf5ad12393e18ec037e1a9a49045da
Author: Stéphane Cerveau <scerveau collabora com>
Date:   Tue Jan 12 11:51:13 2021 +0100

    meson: add harfbuzz gobject dependency
    
    When harfbuzz is built as a subproject, the
    gobject dep should be used to generate the gir.
    
    The build was failing when the harfbuzz gir was not available
    system wide.

 pango/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/pango/meson.build b/pango/meson.build
index 91261274..15386661 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -128,7 +128,11 @@ if build_gir
   gir_args = [
     '--quiet',
   ]
-
+  harfbuzz_gobject_dep = dependency('harfbuzz-gobject', version: harfbuzz_req_version, required: false,
+                          fallback: ['harfbuzz', 'libharfbuzz_gobject_dep'])
+  if harfbuzz_gobject_dep.found()
+    pango_deps += harfbuzz_gobject_dep
+  endif
   pango_gir = gnome.generate_gir(
     libpango,
     sources: pango_sources + pango_headers + [ pango_enum_h ],
@@ -137,6 +141,7 @@ if build_gir
     identifier_prefix: 'Pango',
     symbol_prefix: 'pango',
     export_packages: 'pango',
+    dependencies: pango_deps,
     includes: [ 'HarfBuzz-0.0', 'GObject-2.0', 'cairo-1.0', ],
     header: 'pango/pango.h',
     install: true,


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