meson: add option and build system plumbing for DirectWrite on Windows
Untested though.
This commit is contained in:
parent
b7796a5d69
commit
83ebbe4ade
10
meson.build
10
meson.build
|
@ -136,6 +136,16 @@ if host_machine.system() == 'windows' and not get_option('uniscribe').disabled()
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# DirectWrite (windows) - FIXME: untested
|
||||||
|
if host_machine.system() == 'windows' and not get_option('directwrite').disabled()
|
||||||
|
if cpp.has_header('dwrite.h')
|
||||||
|
deps += [cpp.find_library('dwrite', required: true)]
|
||||||
|
conf.set('HAVE_DIRECTWRITE', 1)
|
||||||
|
elif get_option('directwrite').enabled()
|
||||||
|
error('DirectWrite was enabled explicitly, but required header is missing.')
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# threads
|
# threads
|
||||||
if host_machine.system() != 'windows'
|
if host_machine.system() != 'windows'
|
||||||
thread_dep = dependency('threads', required: false)
|
thread_dep = dependency('threads', required: false)
|
||||||
|
|
|
@ -17,6 +17,8 @@ option('ucdn', type: 'feature', value: 'auto',
|
||||||
description: 'Use internal HarfBuzz-provided UCDN library')
|
description: 'Use internal HarfBuzz-provided UCDN library')
|
||||||
option('uniscribe', type: 'feature', value: 'disabled',
|
option('uniscribe', type: 'feature', value: 'disabled',
|
||||||
description: 'Enable Uniscribe shaper backend (Windows only)')
|
description: 'Enable Uniscribe shaper backend (Windows only)')
|
||||||
|
option('directwrite', type: 'feature', value: 'disabled',
|
||||||
|
description: 'Enable DirectWrite shaper backend on Windows (experimental)')
|
||||||
|
|
||||||
# Common feature options
|
# Common feature options
|
||||||
#option('tests', type : 'feature', value : 'auto', yield : true,
|
#option('tests', type : 'feature', value : 'auto', yield : true,
|
||||||
|
|
|
@ -108,10 +108,6 @@ hb_coretext_sources = [
|
||||||
'hb-coretext.cc',
|
'hb-coretext.cc',
|
||||||
]
|
]
|
||||||
|
|
||||||
hb_directwrite_sources = [
|
|
||||||
'hb-directwrite.cc',
|
|
||||||
]
|
|
||||||
|
|
||||||
hb_icu_sources = [
|
hb_icu_sources = [
|
||||||
'hb-icu.cc',
|
'hb-icu.cc',
|
||||||
]
|
]
|
||||||
|
@ -180,6 +176,11 @@ if conf.get('HAVE_UNISCRIBE', 0) == 1
|
||||||
hb_headers += ['hb-uniscribe.h']
|
hb_headers += ['hb-uniscribe.h']
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if conf.get('HAVE_DIRECTWRITE', 0) == 1
|
||||||
|
hb_sources += ['hb-directwrite.cc']
|
||||||
|
hb_headers += ['hb-directwrite.h']
|
||||||
|
endif
|
||||||
|
|
||||||
version = '0.' + '0'.join(meson.project_version().split('.')) + '.0'
|
version = '0.' + '0'.join(meson.project_version().split('.')) + '.0'
|
||||||
|
|
||||||
libharfbuzz = library('harfbuzz', hb_sources,
|
libharfbuzz = library('harfbuzz', hb_sources,
|
||||||
|
|
Loading…
Reference in New Issue