From: Daniel Wagner Date: Fri, 14 Apr 2023 07:17:43 +0000 (+0200) Subject: build: Make json-c dependency lookup not fail X-Git-Tag: v2.5~168 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d2913a8f9742f1835661ba79a7786fbd5415bc22;p=users%2Fsagi%2Fnvme-cli.git build: Make json-c dependency lookup not fail Let's relax the dependency on json-c, when the comman line option is set to auto. It will just ignore the dependency if not found. Signed-off-by: Daniel Wagner --- diff --git a/meson.build b/meson.build index bafc0fe5..369d5bd4 100644 --- a/meson.build +++ b/meson.build @@ -55,7 +55,7 @@ libnvme_mi_dep = dependency('libnvme-mi', required: true, if get_option('json-c').disabled() json_c_dep = dependency('', required: false) else - json_c_dep = dependency('json-c', required: true, version: '>=0.13', + json_c_dep = dependency('json-c', required: get_option('json-c'), version: '>=0.13', fallback : ['json-c', 'json_c_dep']) if json_c_dep.version().version_compare('>=0.14') conf.set('CONFIG_JSONC_14', true, description: 'Is json-c at least 0.14?')