From 549e2b7038282e34f83b54b36fabf02de0cbfcae Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Wed, 1 Dec 2021 03:16:26 +0200 Subject: [PATCH] Revert "Remove direct link to dwrite from meson scripts" This reverts commit 6ea6c581edb3cecf1b4b42854e37b40d6d067cd3. --- meson.build | 7 ++++++- src/meson.build | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 53b721feb..0dfd637d8 100644 --- a/meson.build +++ b/meson.build @@ -239,12 +239,17 @@ if host_machine.system() == 'windows' and not get_option('gdi').disabled() endif # DirectWrite (Windows) +directwrite_dep = null_dep if host_machine.system() == 'windows' and not get_option('directwrite').disabled() if get_option('directwrite').enabled() and not cpp.has_header('dwrite_1.h') error('DirectWrite was enabled explicitly, but required header is missing.') endif - conf.set('HAVE_DIRECTWRITE', 1) + directwrite_dep = cpp.find_library('dwrite', required: get_option('directwrite')) + + if directwrite_dep.found() + conf.set('HAVE_DIRECTWRITE', 1) + endif endif # CoreText (macOS) diff --git a/src/meson.build b/src/meson.build index 1a114f6d4..2652783d8 100644 --- a/src/meson.build +++ b/src/meson.build @@ -363,6 +363,7 @@ endif if conf.get('HAVE_DIRECTWRITE', 0) == 1 hb_sources += hb_directwrite_sources hb_headers += hb_directwrite_headers + harfbuzz_deps += directwrite_dep # hb-directwrite needs a C++ linker libharfbuzz_link_language = 'cpp' endif