meson: adjust nlohmann-json dependency
Simplify the nlohmann-json in the meson.build and align with the usage
in other repositories.
Change-Id: I8daf46711bdfcec30bb38a32324046f6b717aa33
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/src/rde/meson.build b/src/rde/meson.build
index 5cc45cf..456c807 100644
--- a/src/rde/meson.build
+++ b/src/rde/meson.build
@@ -1,21 +1,7 @@
-
-cpp = meson.get_compiler('cpp')
-if cpp.has_header('nlohmann/json.hpp')
- nlohmann_json_dep = declare_dependency()
-else
- subproject('nlohmann', required: false)
- nlohmann_json_dep = declare_dependency(
- include_directories: [
- 'subprojects/nlohmann/single_include',
- 'subprojects/nlohmann/single_include/nlohmann',
- ]
- )
-endif
-
rde_pre = declare_dependency(
include_directories: [rde_inc],
dependencies: [
- nlohmann_json_dep,
+ dependency('nlohmann_json', include_type: 'system'),
dependency('libbej'),
dependency('phosphor-dbus-interfaces'),
dependency('sdbusplus'),
diff --git a/subprojects/nlohmann.wrap b/subprojects/nlohmann.wrap
deleted file mode 100644
index a77b7c9..0000000
--- a/subprojects/nlohmann.wrap
+++ /dev/null
@@ -1,3 +0,0 @@
-[wrap-git]
-revision = b3e5cb7f20dcc5c806e418df34324eca60d17d4e
-url = https://github.com/nlohmann/json.git
diff --git a/subprojects/nlohmann_json.wrap b/subprojects/nlohmann_json.wrap
new file mode 100644
index 0000000..3745380
--- /dev/null
+++ b/subprojects/nlohmann_json.wrap
@@ -0,0 +1,6 @@
+[wrap-git]
+revision = HEAD
+url = https://github.com/nlohmann/json.git
+
+[provide]
+nlohmann_json = nlohmann_json_dep