summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--meson.build7
-rw-r--r--pango/meson.build15
2 files changed, 16 insertions, 6 deletions
diff --git a/meson.build b/meson.build
index 28d9c9ba..3ebbfeff 100644
--- a/meson.build
+++ b/meson.build
@@ -239,9 +239,7 @@ fontconfig_pc=''
harfbuzz_lib=''
fontconfig_lib=''
-harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req_version, required: false,
- fallback: ['harfbuzz', 'libharfbuzz_dep'],
- default_options: ['coretext=enabled'])
+harfbuzz_dep = dependency('harfbuzz', version: harfbuzz_req_version, required: false)
if harfbuzz_dep.found()
harfbuzz_pc = 'harfbuzz'
else
@@ -262,7 +260,8 @@ endif
# 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'])
+ fallback: ['harfbuzz', 'libharfbuzz_dep'],
+ default_options: ['coretext=enabled'])
endif
if not harfbuzz_dep.found()
diff --git a/pango/meson.build b/pango/meson.build
index 777f5374..e5121bd8 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -129,8 +129,19 @@ if build_gir
gir_args = [
'--quiet',
]
- harfbuzz_gobject_dep = dependency('harfbuzz-gobject', version: harfbuzz_req_version, required: false,
- fallback: ['harfbuzz', 'libharfbuzz_gobject_dep'])
+ 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
+
if harfbuzz_gobject_dep.found()
pango_deps += harfbuzz_gobject_dep
endif