meson: Add CLI11 dependency
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I3b4016acc026c46cd312ffe3b829e00bf2281617
diff --git a/meson.build b/meson.build
index 6153f23..72f3ccf 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,12 @@
# Project Arguments
cpp = meson.get_compiler('cpp')
+if cpp.has_header('CLI/CLI.hpp')
+ cli11_dep = declare_dependency()
+else
+ cli11_dep = dependency('CLI11')
+endif
+
add_project_arguments(
cpp.get_supported_arguments([
'-DBOOST_ERROR_CODE_HEADER_ONLY',
@@ -40,6 +46,7 @@
language : 'cpp')
deps = [
+ cli11_dep,
ipmid_dep,
userlayer_dep,
channellayer_dep,
diff --git a/subprojects/CLI11.wrap b/subprojects/CLI11.wrap
new file mode 100644
index 0000000..2e5a95b
--- /dev/null
+++ b/subprojects/CLI11.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://github.com/CLIUtils/CLI11.git
+revision = HEAD
+
+[provide]
+CLI11 = CLI11_dep