meson: adjust nlohmann-json dependency
Simplify the nlohmann-json dependency in meson and use the wrap file
location aligned with other repos.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3c157966fafb5d9090c3c67d916b06932d3ef3df
diff --git a/meson.build b/meson.build
index 5a7efd4..5bbdfc2 100644
--- a/meson.build
+++ b/meson.build
@@ -8,15 +8,6 @@
meson_version: '>=1.1.1',
)
-cpp = meson.get_compiler('cpp')
-
-if cpp.has_header('nlohmann/json.hpp')
- nlohmann_json = declare_dependency()
-else
- subproject('nlohmann-json')
- nlohmann_json = dependency('nlohmann_json')
-endif
-
executable(
'health-monitor',
[
@@ -27,7 +18,7 @@
dependency('phosphor-logging'),
dependency('sdbusplus'),
dependency('sdeventplus'),
- nlohmann_json,
+ dependency('nlohmann_json', include_type: 'system')
],
install: true,
install_dir: get_option('bindir')
diff --git a/subprojects/nlohmann-json.wrap b/subprojects/nlohmann_json.wrap
similarity index 62%
rename from subprojects/nlohmann-json.wrap
rename to subprojects/nlohmann_json.wrap
index 477e844..3745380 100644
--- a/subprojects/nlohmann-json.wrap
+++ b/subprojects/nlohmann_json.wrap
@@ -1,6 +1,6 @@
[wrap-git]
-url = https://github.com/nlohmann/json
revision = HEAD
+url = https://github.com/nlohmann/json.git
[provide]
nlohmann_json = nlohmann_json_dep