[pango/msvc.improvements: 10/10] meson: Fix pkg-config file generation for HarfBuzz



commit 013714bf39bb4e8be4d4c8a9ad72ddd9ab049771
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jan 15 15:17:16 2020 +0800

    meson: Fix pkg-config file generation for HarfBuzz
    
    HarfBuzz may be found manually instead of via pkg-config, so only add it to
    Pango's pkg-config file if it is really found via pkg-config.

 pango/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/pango/meson.build b/pango/meson.build
index 99a9e4a6..c4c56c8e 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -152,11 +152,16 @@ libpango_dep = declare_dependency(
   sources: pango_dep_sources,
 )
 
+pango_pkg_requires = ['gobject-2.0']
+if harfbuzz_dep.type_name() == 'pkgconfig'
+  pango_pkg_requires += 'harfbuzz'
+endif
+
 pkgconfig.generate(libpango,
   name: 'Pango',
   description: 'Internationalized text handling',
   version: meson.project_version(),
-  requires: ['gobject-2.0', 'harfbuzz'],
+  requires: pango_pkg_requires,
   filebase: 'pango',
   subdirs: pango_api_name,
   install_dir: join_paths(pango_libdir, 'pkgconfig'),


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