diff options
author | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-02-21 18:42:49 +0800 |
---|---|---|
committer | Chun-wei Fan <fanchunwei@src.gnome.org> | 2022-02-21 19:02:57 +0800 |
commit | bfd2147ec4ac9fdfb9c252a49e02382ac1e70005 (patch) | |
tree | 2333131ce49a2b9291c6a4fb588bc785d958c599 | |
parent | 6aec701eeb49d6f583c4c1f060d0a72d61ec95e6 (diff) | |
download | pango-bfd2147ec4ac9fdfb9c252a49e02382ac1e70005.tar.gz |
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.
-rw-r--r-- | meson.build | 35 | ||||
-rw-r--r-- | 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 |