meson: adjust nlohmann-json dependency
Simplify nlohmann-json dependency in meson.build and align wrap file
with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ieb23001ee8c105c012664ec1d347d4785261e955
diff --git a/meson.build b/meson.build
index 3a00ca4..f99ed64 100644
--- a/meson.build
+++ b/meson.build
@@ -63,6 +63,7 @@
deps = []
sources = []
+nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
sdeventplus_dep = dependency(
'sdeventplus',
fallback: [
@@ -85,18 +86,6 @@
],
)
-if cxx.has_header('nlohmann/json.hpp')
- nlohmann_json_dep = declare_dependency()
-else
- subproject('nlohmann-json')
- nlohmann_json_dep = declare_dependency(
- include_directories: [
- 'subprojects/nlohmann-json/single_include',
- 'subprojects/nlohmann-json/single_include/nlohmann',
- ]
- )
-endif
-
deps += [
nlohmann_json_dep,
phosphor_dbus_interfaces_dep,
diff --git a/subprojects/nlohmann-json.wrap b/subprojects/nlohmann_json.wrap
similarity index 61%
rename from subprojects/nlohmann-json.wrap
rename to subprojects/nlohmann_json.wrap
index 9096612..3745380 100644
--- a/subprojects/nlohmann-json.wrap
+++ b/subprojects/nlohmann_json.wrap
@@ -1,3 +1,6 @@
[wrap-git]
-url = https://github.com/nlohmann/json.git
revision = HEAD
+url = https://github.com/nlohmann/json.git
+
+[provide]
+nlohmann_json = nlohmann_json_dep