build: simplify nlohmann-json subproject

The phosphor-pid-control repository uses both phosphor-logging and
phosphor-host-ipmid as subprojects, but the way they incorporate
nlohmann-json is different.  Simplify the phosphor-logging one to
match what is available in phosphor-host-ipmid so that they can both be
build a subprojects within a single top-level project.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3484d9ee9697900dbe5e8e1895ea9d477485553d
diff --git a/extensions/openpower-pels/meson.build b/extensions/openpower-pels/meson.build
index e8fbdd4..1cf9839 100644
--- a/extensions/openpower-pels/meson.build
+++ b/extensions/openpower-pels/meson.build
@@ -4,15 +4,9 @@
 )
 
 if cpp.has_header('nlohmann/json.hpp')
-    nlohmann_json = declare_dependency()
+    nlohmann_json_dep = declare_dependency()
 else
-    subproject('nlohmann-json')
-    nlohmann_json = declare_dependency(
-        include_directories: include_directories(
-            '../../subprojects/nlohmann-json/single_include',
-            '../../subprojects/nlohmann-json/single_include/nlohmann',
-        )
-    )
+    nlohmann_json_dep = dependency('nlohmann-json')
 endif
 
 python_inst = import('python').find_installation('python3')
@@ -84,7 +78,7 @@
 libpel_deps = [
     conf_h_dep,
     libpldm_dep,
-    nlohmann_json,
+    nlohmann_json_dep,
     sdbusplus_dep,
     sdeventplus_dep,
     pdi_dep,
@@ -108,7 +102,7 @@
     link_with: libpel_lib,
     dependencies: [
         libpldm_dep,
-        nlohmann_json,
+        nlohmann_json_dep,
         sdbusplus_dep,
         sdeventplus_dep,
         pdi_dep,
@@ -119,7 +113,7 @@
 log_manager_ext_deps += [
     libpel_dep,
     libpldm_dep,
-    nlohmann_json,
+    nlohmann_json_dep,
 ]
 
 log_manager_ext_sources += files(
diff --git a/subprojects/nlohmann-json.wrap b/subprojects/nlohmann-json.wrap
index 9096612..a2884b1 100644
--- a/subprojects/nlohmann-json.wrap
+++ b/subprojects/nlohmann-json.wrap
@@ -1,3 +1,6 @@
 [wrap-git]
-url = https://github.com/nlohmann/json.git
+url = https://github.com/nlohmann/json
 revision = HEAD
+
+[provide]
+nlohmann-json = nlohmann_json_dep