summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorChun-wei Fan <fanchunwei@src.gnome.org>2022-07-06 16:58:41 +0800
committerChun-wei Fan <fanchunwei@src.gnome.org>2022-09-26 11:04:25 +0800
commit0cebf7cf50c49ea30f00bdce724d290e43b8e29d (patch)
tree57ab0254c4cb66fa35a4c806eebd151bbc9fe350 /meson.build
parentf2add41dadacd7cb2df804a2e7faa670c8db69ee (diff)
downloadpango-0cebf7cf50c49ea30f00bdce724d290e43b8e29d.tar.gz
build: Check for DirectWrite support
...in Cairo, as well as their presence in the Windows SDKs (which should always be there in the Windows 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.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build9
1 files changed, 9 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index b2c25eae..f233079a 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
@@ -390,9 +391,13 @@ endif
cairo_found_type = ''
cairo_dep = dependency('cairo', version: cairo_req_version, required: cairo_option)
+cairo_dwrite_dep = disabler() # Only for Windows
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)
+ endif
else
if cc.get_id() == 'msvc' and cc.has_header('cairo.h')
cairo_dep = cc.find_library('cairo', required: cairo_option)
@@ -566,6 +571,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'),