yaml: Depend on libyaml >= 0.2.3

libyaml before 0.2.3 expects non-const string parameters. Supporting
both variants would require either cpp magic or ignoring
"discarded-qualifiers" compiler warnings. For the sake of simplicity
just support libyaml 0.2.3 and newer.

Note that NO_YAML can be overwritten on the make command line.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
This commit is contained in:
Uwe Kleine-König 2023-04-28 11:35:50 +02:00 committed by David Gibson
parent f1657b2fb5
commit 0ac8b30ba5
3 changed files with 7 additions and 3 deletions

View file

@ -42,7 +42,7 @@ else
endif
yamltree = 'yamltree.c'
yaml = dependency('yaml-0.1', required: get_option('yaml'), static: static_build)
yaml = dependency('yaml-0.1', version: '>=0.2.3', required: get_option('yaml'), static: static_build)
if not yaml.found()
add_project_arguments('-DNO_YAML', language: 'c')
yamltree = []