diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/meson.build b/meson.build index f5aab34b4..d7dd9b428 100644 --- a/meson.build +++ b/meson.build @@ -503,18 +503,32 @@ if host_machine.system() == 'windows' ] cpp_compiler = meson.get_compiler('cpp') - direct2d_dep = cpp_compiler.find_library('d2d1', required: false) + d2d_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') + d2d_header = cpp_compiler.has_header('d2d1.h') + d2d_3_header = cpp_compiler.has_header('d2d1_3.h') dwrite_header = cpp_compiler.has_header('dwrite.h') + dwrite_3_header = cpp_compiler.has_header('dwrite_3.h') + wincodec_dep = cpp_compiler.find_library('windowscodecs', required: false) + wincodec_header = cpp_compiler.has_header('wincodec.h') - if direct2d_dep.found() and dwrite_dep.found() and direct2d_header and dwrite_header + if d2d_dep.found() and dwrite_dep.found() and d2d_header and dwrite_header and wincodec_dep.found() and wincodec_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], + 'deps': [dwrite_dep, d2d_dep, wincodec_dep], }] + deps += [dwrite_dep, d2d_dep, wincodec_dep] + + if cpp_compiler.has_header('d2d1_3.h') + conf.set('HAVE_D2D1_3_H', 1) + endif + + # Exclude MinGW dwrite_3.h because it has a broken definition of DWRITE_COLOR_GLYPH_RUN1. + if cpp_compiler.has_header('dwrite_3.h') and cpp_compiler.get_define('__MINGW32__') == '' + conf.set('HAVE_DWRITE_3_H', 1) + endif endif endif |