cli11: prefer system package if found

mu embeds a "vendored" version of libcl11 under thirdparty/; but it's
better to use the system-package if the user has one.

So, use the system package if found or user -Duse-embedded-cli11=true is
specified.
This commit is contained in:
Dirk-Jan C. Binnema
2025-07-19 10:41:10 +03:00
parent 33958cd0f7
commit 4c2ce92a15
5 changed files with 16 additions and 4 deletions

View File

@ -230,7 +230,9 @@ if not fmt_dep.found() or get_option('use-embedded-fmt')
compile_args: '-DFMT_HEADER_ONLY')
endif
# use system's CLI11 if found, otherwise fall back to embedded version
# use system's CLI11 if found, otherwise fall back to embedded version. we can
# probably get away with a lower version, but want to have (roughly) the same in
# embedded / system.
cli11_dep = dependency('CLI11', version: '>=2.4', required:false)
if not cli11_dep.found() or get_option('use-embedded-cli11')
message('using embedded CLI11')