meson: adjust nlohmann-json dependency
Simplify nlohmann-json dependency logic and use wrap file name aligned
with other repositories.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie6082726a567e0876e5f8b9d941ed1101e056d2f
diff --git a/meson.build b/meson.build
index 075cddc..7953560 100644
--- a/meson.build
+++ b/meson.build
@@ -50,23 +50,11 @@
sources = []
deps = []
if get_option('associations').allowed()
- 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
sources += [
'association_manager.cpp',
]
deps += [
- nlohmann_json_dep,
+ dependency('nlohmann_json', include_type: 'system'),
]
endif