[pango/fix-707] Windows: Fix builds using HarfBuzz as subproject
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/fix-707] Windows: Fix builds using HarfBuzz as subproject
- Date: Sat, 15 Oct 2022 12:51:03 +0000 (UTC)
commit b88acef4abf4a2e0f9c0ff0e4602da3240d08c90
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Sat Oct 15 20:47:30 2022 +0800
Windows: Fix builds using HarfBuzz as subproject
Only check for the GDI and DirectWrite symbols in the HarfBuzz dep if it
is not built as a subproject.
When it is built as a subproject, enable GDI and DirectWrite support, which
is otherwise not enabled by default, and thus assume that GDI and
DirectWrite support in HarfBuzz is enabled.
Fixes issue #707.
meson.build | 36 ++++++++++++++++++++++--------------
1 file changed, 22 insertions(+), 14 deletions(-)
---
diff --git a/meson.build b/meson.build
index f63ce6cd2..312972428 100644
--- a/meson.build
+++ b/meson.build
@@ -276,23 +276,31 @@ harfbuzz_dep = dependency('harfbuzz',
version: harfbuzz_req_version,
required: true,
fallback: ['harfbuzz', 'libharfbuzz_dep'],
- default_options: ['coretext=enabled'])
-
+ default_options: [
+ 'coretext=enabled',
+ 'gdi=enabled',
+ 'directwrite=enabled']
+ )
if host_system == 'windows'
- if cpp.has_header_symbol(
- 'hb-directwrite.h',
- 'hb_directwrite_face_create',
- dependencies: harfbuzz_dep,
- prefix: '#include <dwrite.h>',
- )
+ if harfbuzz_dep.type_name() == 'internal'
pango_conf.set('HAVE_HARFBUZZ_DIRECT_WRITE', 1)
- endif
- if cc.has_header_symbol(
- 'hb-gdi.h',
- 'hb_gdi_face_create',
- dependencies: harfbuzz_dep,
- )
pango_conf.set('HAVE_HARFBUZZ_GDI', 1)
+ else
+ if cpp.has_header_symbol(
+ 'hb-directwrite.h',
+ 'hb_directwrite_face_create',
+ dependencies: harfbuzz_dep,
+ prefix: '#include <dwrite.h>',
+ )
+ pango_conf.set('HAVE_HARFBUZZ_DIRECT_WRITE', 1)
+ endif
+ if cc.has_header_symbol(
+ 'hb-gdi.h',
+ 'hb_gdi_face_create',
+ dependencies: harfbuzz_dep,
+ )
+ pango_conf.set('HAVE_HARFBUZZ_GDI', 1)
+ endif
endif
endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]