From 98a618211120306a37646b02752c4227bfff52c6 Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Wed, 17 May 2023 14:55:10 +0900 Subject: [PATCH] datarepo: dependency management. Datarepo has its own unique dependency. Thus, make datarepo optional at build so that we can cut the dependency. It's set "enabled by default" because most releases will be using it anyway. Signed-off-by: MyungJoo Ham --- gst/datarepo/meson.build | 2 ++ gst/meson.build | 5 ++++- meson.build | 1 - meson_options.txt | 1 + 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gst/datarepo/meson.build b/gst/datarepo/meson.build index 8cfc02d..d2cf638 100644 --- a/gst/datarepo/meson.build +++ b/gst/datarepo/meson.build @@ -4,6 +4,8 @@ repo_sources = [ 'gstdatareposink.c' ] +json_glib_dep = dependency('json-glib-1.0') + gstdatarepo_shared = shared_library('gstdatarepo', repo_sources, dependencies: [nnstreamer_dep, json_glib_dep], diff --git a/gst/meson.build b/gst/meson.build index a20797a..50cf011 100644 --- a/gst/meson.build +++ b/gst/meson.build @@ -6,4 +6,7 @@ if mqtt_support_is_available subdir('mqtt') endif subdir('nnstreamer') -subdir('datarepo') + +if get_option('enable-datarepo') + subdir('datarepo') +endif diff --git a/meson.build b/meson.build index bcab9c7..56cca54 100644 --- a/meson.build +++ b/meson.build @@ -145,7 +145,6 @@ gst_video_dep = dependency('gstreamer-video-' + gst_api_verision) gst_audio_dep = dependency('gstreamer-audio-' + gst_api_verision) gst_app_dep = dependency('gstreamer-app-' + gst_api_verision) gst_check_dep = dependency('gstreamer-check-' + gst_api_verision) -json_glib_dep = dependency('json-glib-1.0') libm_dep = cc.find_library('m') # cmath library libdl_dep = cc.find_library('dl') # DL library diff --git a/meson_options.txt b/meson_options.txt index 524f86c..bcee95f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -50,6 +50,7 @@ option('framework-priority-bin', type: 'string', value: '', description: 'A comm 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) -- 2.7.4