From 0a02f1e760db5c0568dc6e15c00fa394aa43ccbb Mon Sep 17 00:00:00 2001 From: Ebrahim Byagowi Date: Thu, 13 Aug 2020 15:33:39 +0430 Subject: [PATCH] [meson] Abort if GDI/Uniscribe headers couldn't be found --- meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 610ced9fc..7c6e2f754 100644 --- a/meson.build +++ b/meson.build @@ -227,8 +227,12 @@ endif gdi_uniscribe_deps = [] # GDI (Uniscribe) (Windows) if host_machine.system() == 'windows' and not get_option('gdi').disabled() - gdi_deps_found = cpp.has_header('usp10.h') and cpp.has_header('windows.h') + if (get_option('directwrite').enabled() and + not (cpp.has_header('usp10.h') and cpp.has_header('windows.h'))) + error('GDI/Uniscribe was enabled explicitly, but required headers are missing.') + endif + gdi_deps_found = true foreach usplib : ['usp10', 'gdi32', 'rpcrt4'] dep = cpp.find_library(usplib, required: get_option('gdi')) gdi_deps_found = gdi_deps_found and dep.found()