diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/meson.build b/meson.build index 75a7bdfa7..f5aab34b4 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('cairo', 'c', +project('cairo', 'c', 'cpp', meson_version: '>= 0.56.0', version: run_command(find_program('version.py'), check: true).stdout().strip(), default_options: ['warning_level=2'], @@ -501,6 +501,21 @@ if host_machine.system() == 'windows' 'deps': win32_extra_deps, } ] + + cpp_compiler = meson.get_compiler('cpp') + direct2d_dep = cpp_compiler.find_library('d2d1', required: false) + dwrite_dep = cpp_compiler.find_library('dwrite', required: false) + direct2d_header = cpp_compiler.has_header('d2d1.h') + dwrite_header = cpp_compiler.has_header('dwrite.h') + + if direct2d_dep.found() and dwrite_dep.found() and direct2d_header and dwrite_header + feature_conf.set('CAIRO_HAS_DWRITE_FONT', 1) + built_features += [{ + 'name': 'cairo-win32-dwrite-font', + 'description': 'Microsoft Windows DWrite font backend', + 'deps': [dwrite_dep, direct2d_dep], + }] + endif endif # GL / GLESV2 / GLESV3 are mutually exclusive @@ -941,6 +956,7 @@ summary({ 'FreeType': feature_conf.get('CAIRO_HAS_FT_FONT', 0) == 1, 'Fontconfig': feature_conf.get('CAIRO_HAS_FC_FONT', 0) == 1, 'Win32': feature_conf.get('CAIRO_HAS_WIN32_FONT', 0) == 1, + 'Win32 DWrite': feature_conf.get('CAIRO_HAS_DWRITE_FONT', 0) == 1, 'Quartz': feature_conf.get('CAIRO_HAS_QUARTZ_FONT', 0) == 1, }, section: 'Font Backends', bool_yn: true) |