[pango/pango1-dwrite: 6/11] build: Check for DirectWrite support
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/pango1-dwrite: 6/11] build: Check for DirectWrite support
- Date: Thu, 4 Aug 2022 09:56:32 +0000 (UTC)
commit b4a2387669ca7ac7fc867d9d9dfa56113e78622a
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jul 6 16:58:41 2022 +0800
build: Check for DirectWrite support
...in Cairo, as well as their presence in the SDKs. We want to use
items in DirectWrite to help us improve support on Windows regarding
looking up for features (description) of a font.
Since upstream Cairo gained DirectWrite support very recently, check for
it only via pkg-config, since Cairo had Meson build support quite a bit before
that happened.
meson.build | 10 ++++++++++
pango/meson.build | 1 +
2 files changed, 11 insertions(+)
---
diff --git a/meson.build b/meson.build
index 48ca0d77c..71463bdfa 100644
--- a/meson.build
+++ b/meson.build
@@ -46,6 +46,7 @@ osx_current = pango_binary_age - pango_interface_age + 1
pango_osxversion = [osx_current, '@0@.@1@.0'.format(osx_current, pango_interface_age)]
cc = meson.get_compiler('c')
+cpp = meson.get_compiler('cpp')
host_system = host_machine.system()
# Compiler and linker flags
@@ -393,6 +394,11 @@ cairo_dep = dependency('cairo', version: cairo_req_version, required: cairo_opti
if cairo_dep.found()
cairo_found_type = cairo_dep.type_name()
+ if host_system == 'windows'
+ cairo_dwrite_dep = dependency('cairo-win32-dwrite-font', version: cairo_req_version, required: false)
+ else
+ cairo_dwrite_dep = disabler()
+ endif
else
if cc.get_id() == 'msvc' and cc.has_header('cairo.h')
cairo_dep = cc.find_library('cairo', required: cairo_option)
@@ -566,6 +572,10 @@ if cairo_dep.found()
endif
endif
+if cairo_dwrite_dep.found()
+ pango_conf.set('HAVE_CAIRO_WIN32_DIRECTWRITE', 1)
+endif
+
# libsysprof-capture support
libsysprof_capture_dep = dependency('sysprof-capture-4',
required: get_option('sysprof'),
diff --git a/pango/meson.build b/pango/meson.build
index 1a4b41419..d6b2d81cd 100644
--- a/pango/meson.build
+++ b/pango/meson.build
@@ -429,6 +429,7 @@ if host_system == 'windows'
pangowin32_deps = pango_deps + [
libpango_dep,
cc.find_library('gdi32'),
+ cc.find_library('dwrite'),
]
pangowin32_rc = configure_file(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]