[meson] Add ragel_subproject option
Add an option to build fallback ragel subproject when no suitable ragel version is found, and make it off by default since most builder don’t need ragel at all. Fixes https://github.com/harfbuzz/harfbuzz/issues/3208 (hopefully)
This commit is contained in:
parent
60a38d7988
commit
a59e7ec993
|
@ -34,5 +34,7 @@ option('icu_builtin', type: 'boolean', value: false,
|
|||
description: 'Don\'t separate ICU support as harfbuzz-icu module')
|
||||
option('experimental_api', type: 'boolean', value: false,
|
||||
description: 'Enable experimental APIs')
|
||||
option('ragel_subproject', type: 'boolean', value: false,
|
||||
description: 'Build Ragel subproject if no suitable version is found')
|
||||
option('fuzzer_ldflags', type: 'string',
|
||||
description: 'Extra LDFLAGS used during linking of fuzzing binaries')
|
||||
|
|
|
@ -291,10 +291,12 @@ hb_gobject_headers = files(
|
|||
)
|
||||
|
||||
ragel = find_program('ragel', version: '6.10', required: false)
|
||||
if not ragel.found() and meson.can_run_host_binaries() and cpp.get_id() != 'msvc'
|
||||
ragel = subproject('ragel').get_variable('ragel')
|
||||
has_ragel = ragel.found()
|
||||
if not has_ragel and get_option('ragel_subproject')
|
||||
ragel = subproject('ragel').get_variable('ragel')
|
||||
has_ragel = true
|
||||
endif
|
||||
if not ragel.found()
|
||||
if not has_ragel
|
||||
warning('You have to install ragel if you are going to develop HarfBuzz itself')
|
||||
else
|
||||
ragel_helper = find_program('gen-ragel-artifacts.py')
|
||||
|
|
Loading…
Reference in New Issue