[meson] Abort if GDI/Uniscribe headers couldn't be found

This commit is contained in:
Ebrahim Byagowi 2020-08-13 15:33:39 +04:30 committed by ebraminio
parent 253a8f7a51
commit 0a02f1e760
1 changed files with 5 additions and 1 deletions

View File

@ -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()