[meson] minor on gdi, dwrite and icu
This commit is contained in:
parent
69a1e07acb
commit
f62f4e388b
45
meson.build
45
meson.build
|
@ -107,22 +107,14 @@ if not get_option('icu').disabled()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if not icu_dep.found() and cpp.get_id() == 'msvc'
|
if not icu_dep.found() and cpp.get_id() == 'msvc'
|
||||||
if cpp.has_header('unicode/uchar.h') and \
|
icu_dep = cpp.find_library(get_option('buildtype') == 'debug' ? 'icuucd' : 'icuuc',
|
||||||
cpp.has_header('unicode/unorm2.h') and \
|
required: get_option('icu'),
|
||||||
cpp.has_header('unicode/ustring.h') and \
|
has_headers: ['unicode/uchar.h',
|
||||||
cpp.has_header('unicode/utf16.h') and \
|
'unicode/unorm2.h',
|
||||||
cpp.has_header('unicode/uversion.h') and \
|
'unicode/ustring.h',
|
||||||
cpp.has_header('unicode/uscript.h')
|
'unicode/utf16.h',
|
||||||
if get_option('buildtype') == 'debug'
|
'unicode/uversion.h',
|
||||||
icu_dep = cpp.find_library('icuucd', required: get_option('icu'))
|
'unicode/uscript.h'])
|
||||||
else
|
|
||||||
icu_dep = cpp.find_library('icuuc', required: get_option('icu'))
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
if get_option('icu').enabled()
|
|
||||||
error('ICU headers and libraries must be present to build ICU support')
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -229,26 +221,29 @@ endif
|
||||||
gdi_uniscribe_deps = []
|
gdi_uniscribe_deps = []
|
||||||
# GDI (Uniscribe) (Windows)
|
# GDI (Uniscribe) (Windows)
|
||||||
if host_machine.system() == 'windows' and not get_option('gdi').disabled()
|
if host_machine.system() == 'windows' and not get_option('gdi').disabled()
|
||||||
# TODO: make nicer once we have https://github.com/mesonbuild/meson/issues/3940
|
gdi_deps_found = true
|
||||||
if cpp.has_header('usp10.h') and cpp.has_header('windows.h')
|
|
||||||
foreach usplib : ['usp10', 'gdi32', 'rpcrt4']
|
foreach usplib : ['usp10', 'gdi32', 'rpcrt4']
|
||||||
gdi_uniscribe_deps += cpp.find_library(usplib, required: true)
|
dep = cpp.find_library(usplib, required: get_option('gdi'),
|
||||||
|
has_headers: ['usp10.h', 'windows.h'])
|
||||||
|
gdi_deps_found = gdi_deps_found and dep.found()
|
||||||
|
gdi_uniscribe_deps += dep
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
if gdi_deps_found
|
||||||
conf.set('HAVE_UNISCRIBE', 1)
|
conf.set('HAVE_UNISCRIBE', 1)
|
||||||
conf.set('HAVE_GDI', 1)
|
conf.set('HAVE_GDI', 1)
|
||||||
elif get_option('gdi').enabled()
|
|
||||||
error('gdi was enabled explicitly, but some required headers are missing.')
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# DirectWrite (Windows)
|
# DirectWrite (Windows)
|
||||||
directwrite_dep = null_dep
|
directwrite_dep = null_dep
|
||||||
if host_machine.system() == 'windows' and not get_option('directwrite').disabled()
|
if host_machine.system() == 'windows' and not get_option('directwrite').disabled()
|
||||||
if cpp.has_header('dwrite_1.h')
|
directwrite_dep = cpp.find_library('dwrite', required: get_option('directwrite'),
|
||||||
directwrite_dep = cpp.find_library('dwrite', required: true)
|
has_headers: ['dwrite_1.h'])
|
||||||
|
|
||||||
|
if directwrite_dep.found()
|
||||||
conf.set('HAVE_DIRECTWRITE', 1)
|
conf.set('HAVE_DIRECTWRITE', 1)
|
||||||
elif get_option('directwrite').enabled()
|
|
||||||
error('DirectWrite was enabled explicitly, but required header is missing.')
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue