endif
subdir('nnstreamer')
-if get_option('enable-datarepo')
- json_glib_dep = dependency('json-glib-1.0', required : true, \
- not_found_message : 'json-glib-1.0 package should be installed to build the datarepo elements.')
+if datarepo_support_is_available
subdir('datarepo')
endif
endif
## Without the explicit method designation, it fails to find cflags in older Meson
+# datarepo requires json-glib-1.0 in the name of json_glib_dep
+json_glib_dep = dependency('json-glib-1.0', required: false)
+if get_option('datarepo-support').enabled() and not json_glib_dep.found()
+ error('json-glib-1.0 is required for datarepo-support option.')
+endif
+if not get_option('datarepo-support').disabled() and not json_glib_dep.found()
+ message('datarepo-support is off because json-glib-1.0 is not available.')
+endif
+
# features registration to be controlled
#
# register feature as follows
'mxnet-support': {
'extra_deps': [ mxnet_dep ],
'project_args': { 'ENABLE_MXNET' : 1 }
- }
+ },
+ 'datarepo-support': {
+ 'extra_deps': [ json_glib_dep ],
+ },
}
project_args = {}
option('nnstreamer-edge-support', type: 'feature', value: 'auto')
option('mxnet-support', type: 'feature', value: 'auto')
option('parser-support', type: 'feature', value: 'auto') # gstreamer pipeline description <--> pbtxt pipeline
+option('datarepo-support', type: 'feature', value: 'auto', description: 'Data repository sink/src for in-pipeline training') # this required json-glib-1.0.
# booleans & other options
option('enable-test', type: 'boolean', value: true)
option('skip-tflite-flatbuf-check', type: 'boolean', value: false, description: 'Do not check the availability of flatbuf for tensorflow-lite build. In some systems, flatbuffers\' dependency cannot be found with meson.')
option('trix-engine-alias', type: 'string', value: 'srnpu', description: 'The alias name list of trix-engine sub-plugin. This option provides backward compatibility of the previous framework name.')
option('enable-float16', type: 'boolean', value: false, description: 'Support float16 streams with GCC extensions')
-option('enable-datarepo', type: 'boolean', value: true, description: 'Data repository sink/src for in-pipeline training')
# Utilities
option('enable-nnstreamer-check', type: 'boolean', value: true)
test('unittest_filter_shared_model', unittest_filter_shared_model, timeout: 30, env: testenv)
endif
- if get_option('enable-datarepo')
+ if datarepo_support_is_available
subdir('nnstreamer_datarepo')
endif