Allow building code locally
json_c doesn't compile without warnings, but is a library so does need
to build when used as a subproject. Break out the subproject.
Tested: Unit tests pass
Change-Id: I7f50711d2ab972034ec5b7de96975084081c95ca
Signed-off-by: Ed Tanous <etanous@nvidia.com>
diff --git a/meson.build b/meson.build
index 1eee4ec..6e35406 100644
--- a/meson.build
+++ b/meson.build
@@ -67,7 +67,11 @@
cc = meson.get_compiler('c')
-json_c_dep = dependency('json-c', required: true, fallback: ['json-c', 'json_c_dep'])
+json_c_dep = dependency('json-c', required: false)
+if not json_c_dep.found()
+ json_c = subproject('json-c', required: true, default_options: ['warning_level=0'])
+ json_c_dep = json_c.get_variable('json_c_dep')
+endif
libcper_parse_sources = [
'base64.c',