[gtk/gtk-3-24-meson: 83/89] meson.build: MSVC-Add fallback dep search for HarfBuzz
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24-meson: 83/89] meson.build: MSVC-Add fallback dep search for HarfBuzz
- Date: Wed, 10 Apr 2019 08:27:09 +0000 (UTC)
commit 7b5f817d612cb9a14167ff49fed8768a3f6b777a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Thu Apr 4 09:33:08 2019 +0800
meson.build: MSVC-Add fallback dep search for HarfBuzz
It seems that Meson 0.50.0 broke dependency search using CMake for
HarfBuzz at least, so we add a workaround for it to look for the
HarfBuzz headers and libraries manually when we couldn't find HarfBuzz
using the pkg-config and CMake method.
meson.build | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 0c25957bb1..45f0d7a16a 100644
--- a/meson.build
+++ b/meson.build
@@ -409,8 +409,10 @@ epoxy_dep = dependency('epoxy', version: epoxy_req,
fallback: ['libepoxy', 'libepoxy_dep'])
atk_dep = dependency('atk', version: atk_req,
fallback : ['atk', 'libatk_dep'])
-harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false,
- fallback: ['harfbuzz', 'libharfbuzz_dep'])
+
+# Update once Meson can have deps declared in a declarative manner or can
+# find deps properly with CMake again
+harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false)
xkbdep = dependency('xkbcommon', version: xkbcommon_req, required: wayland_enabled)
iso_codes_dep = dependency('iso-codes', required: false)
@@ -424,6 +426,20 @@ if os_unix
platform_gio_dep = giounix_dep
endif
+# Remove once Meson is fixed to find deps properly with CMake or
+# gains the ability to declare deps in a declarative manner
+# Fallback for HarfBuzz
+if cc.get_id() == 'msvc' and not harfbuzz_dep.found()
+ if cc.has_header('hb.h')
+ harfbuzz_dep = cc.find_library('harfbuzz', required : false)
+ endif
+endif
+
+if not harfbuzz_dep.found()
+ harfbuzz_dep = dependency('harfbuzz', version: '>= 0.9', required: false,
+ fallback: ['harfbuzz', 'libharfbuzz_dep'])
+endif
+
if iso_codes_dep.found()
cdata.set_quoted('ISO_CODES_PREFIX', iso_codes_dep.get_pkgconfig_variable('prefix'))
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]