diff --git a/meson_options.txt b/meson_options.txt index 602d053b7..cd4526ba3 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/src/meson.build b/src/meson.build index 444e61405..e15da3ad3 100644 --- a/src/meson.build +++ b/src/meson.build @@ -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')