[pango/meson-msvc-cleanup: 1/3] Meson: Clean up HarfBuzz search
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/meson-msvc-cleanup: 1/3] Meson: Clean up HarfBuzz search
- Date: Mon, 21 Feb 2022 11:03:48 +0000 (UTC)
commit bfd2147ec4ac9fdfb9c252a49e02382ac1e70005
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Feb 21 18:42:49 2022 +0800
Meson: Clean up HarfBuzz search
Pango 1.50.x and later require a HarfBuzz version that is buildable via
Meson, so we can just use the standard dependency() call for HarfBuzz
for all builds.
This means that we can drop all the items where we search for HarfBuzz
manually.
Also remove the stray HarfBuzz items that are no longer used.
meson.build | 35 +++++------------------------------
pango/meson.build | 16 ++++------------
2 files changed, 9 insertions(+), 42 deletions(-)
---
diff --git a/meson.build b/meson.build
index fcff9ea7..788011fc 100644
--- a/meson.build
+++ b/meson.build
@@ -268,40 +268,15 @@ endif
# pkg-config files for them
cairo_pc = ''
cairo_lib = ''
-harfbuzz_pc=''
freetype2_pc=''
fontconfig_pc=''
-harfbuzz_lib=''
fontconfig_lib=''
-harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req_version, required: false)
-if harfbuzz_dep.found()
- harfbuzz_pc = 'harfbuzz'
-else
- if cc.get_id() == 'msvc' and cc.has_header('hb.h')
- # The CMake build files for HarfBuzz (which is used for MSVC builds) do not
- # generate pkg-config files, so look for harfbuzz.lib. Ensure that we
- # we look for HarfBuzz 2.0.0 or later.
- harfbuzz_lib = cc.find_library('harfbuzz', required: false)
- if harfbuzz_lib.found()
- if cc.has_function('hb_ot_tags_from_script_and_language', dependencies: harfbuzz_lib)
- harfbuzz_dep = harfbuzz_lib
- endif
- endif
- endif
-endif
-
-# Remove when Meson acquires ability to declare deps declaratively, or
-# when finding dependencies via CMake files is fixed.
-if not harfbuzz_dep.found()
- harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req_version,
- fallback: ['harfbuzz', 'libharfbuzz_dep'],
- default_options: ['coretext=enabled'])
-endif
-
-if not harfbuzz_dep.found()
- error('harfbuzz not found')
-endif
+harfbuzz_dep = dependency('harfbuzz',
+ version: harfbuzz_req_version,
+ required: true,
+ fallback: ['harfbuzz', 'libharfbuzz_dep'],
+ default_options: ['coretext=enabled'])
pango_deps += harfbuzz_dep
diff --git a/pango/meson.build b/pango/meson.build
index 9f4c49be..f344bc8b 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -136,18 +136,10 @@ if build_gir
gir_args = [
'--quiet',
]
- harfbuzz_gobject_dep = dependency('harfbuzz-gobject', version: harfbuzz_req_version, required: false)
-
- if not harfbuzz_gobject_dep.found() and cc.get_argument_syntax() == 'msvc'
- # The CMake build files for HarfBuzz (which is used for MSVC builds) do not
- # generate pkg-config files, so look for harfbuzz-gobject.lib
- harfbuzz_gobject_dep = cc.find_library('harfbuzz-gobject', has_headers: ['hb-gobject.h'], required:
false)
- endif
-
- if not harfbuzz_gobject_dep.found()
- harfbuzz_gobject_dep = dependency('harfbuzz-gobject', version: harfbuzz_req_version, required: false,
- fallback: ['harfbuzz', 'libharfbuzz_gobject_dep'])
- endif
+ 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]