meson: adjust nlohmann-json dependency

- Simplify the dependency logic in the meson.build.
- Align the meson dep name with consistent practices from other repos.
- Use the non-versioned wrap file.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I0e3052763bffe9f98d8ca10c5b523b58e000f636
diff --git a/control/meson.build b/control/meson.build
index 6869043..6aa8143 100644
--- a/control/meson.build
+++ b/control/meson.build
@@ -15,7 +15,7 @@
 sources = ['main.cpp']
 
 if conf.has('CONTROL_USE_JSON')
-    deps += json_dep
+    deps += nlohmann_json_dep
     include_dirs += [
         './json',
         './json/actions',
@@ -100,7 +100,7 @@
   'fanctl.cpp',
       dependencies: [
           cli11_dep,
-          json_dep,
+          nlohmann_json_dep,
           phosphor_logging_dep,
           sdbusplus_dep,
       ],
diff --git a/meson.build b/meson.build
index e547e4f..ef39248 100644
--- a/meson.build
+++ b/meson.build
@@ -46,12 +46,7 @@
     cereal_dep = cereal_proj.dependency('cereal')
 endif
 
-if cpp.has_header('nlohmann/json.hpp')
-    json_dep = declare_dependency()
-else
-    json_dep = dependency('nlohmann_json')
-endif
-
+nlohmann_json_dep = dependency('nlohmann_json', include_type: 'system')
 phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
 phosphor_logging_dep = dependency('phosphor-logging')
 sdbusplus_dep = dependency('sdbusplus')
diff --git a/monitor/meson.build b/monitor/meson.build
index 1171530..1fa26b8 100644
--- a/monitor/meson.build
+++ b/monitor/meson.build
@@ -17,7 +17,7 @@
 ]
 
 deps=[
-    json_dep,
+    nlohmann_json_dep,
     phosphor_dbus_interfaces_dep,
     phosphor_logging_dep,
     sdbusplus_dep,
diff --git a/monitor/test/meson.build b/monitor/test/meson.build
index 369c4e2..51faaef 100644
--- a/monitor/test/meson.build
+++ b/monitor/test/meson.build
@@ -5,7 +5,7 @@
 test_deps=[
     gmock_dep,
     gtest_dep,
-    json_dep,
+    nlohmann_json_dep,
     phosphor_logging_dep,
     sdeventplus_dep
 ]
diff --git a/presence/meson.build b/presence/meson.build
index 7237565..42c32a4 100644
--- a/presence/meson.build
+++ b/presence/meson.build
@@ -19,8 +19,8 @@
 ]
 
 deps=[
-    json_dep,
     libevdev_dep,
+    nlohmann_json_dep,
     phosphor_dbus_interfaces_dep,
     phosphor_logging_dep,
     sdbusplus_dep,
diff --git a/subprojects/nlohmann_json.wrap b/subprojects/nlohmann_json.wrap
index 0aa1389..3745380 100644
--- a/subprojects/nlohmann_json.wrap
+++ b/subprojects/nlohmann_json.wrap
@@ -1,12 +1,6 @@
-[wrap-file]
-directory = nlohmann_json-3.9.1
-lead_directory_missing = true
-source_url = https://github.com/nlohmann/json/releases/download/v3.9.1/include.zip
-source_filename = nlohmann_json-3.9.1.zip
-source_hash = 6bea5877b1541d353bd77bdfbdb2696333ae5ed8f9e8cc22df657192218cad91
-patch_url = https://wrapdb.mesonbuild.com/v1/projects/nlohmann_json/3.9.1/1/get_zip
-patch_filename = nlohmann_json-3.9.1-1-wrap.zip
-patch_hash = 1774e5506fbe3897d652f67e41973194b948d2ab851cf464a742f35f160a1435
+[wrap-git]
+revision = HEAD
+url = https://github.com/nlohmann/json.git
 
 [provide]
 nlohmann_json = nlohmann_json_dep
diff --git a/test/meson.build b/test/meson.build
index 3a85b08..5002167 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -6,7 +6,7 @@
 test_deps=[
     gmock_dep,
     gtest_dep,
-    json_dep,
+    nlohmann_json_dep,
     phosphor_dbus_interfaces_dep,
     phosphor_logging_dep,
     sdbusplus_dep