Exclude tensor_query from nnstreamer plugins if nnsquery is not available.
Signed-off-by: gichan <gichan2.jang@samsung.com>
gst_video_dep,
gst_audio_dep,
libm_dep,
- thread_dep,
- nns_query_dep
+ thread_dep
]
if orcc_support_is_available
'tensor_filter',
'tensor_repo',
'tensor_if',
- 'tensor_rate',
- 'tensor_query'
+ 'tensor_rate'
]
foreach p : nnst_plugins
subdir(p)
endforeach
+if nnsquery_support_is_available
+ nnstreamer_base_deps += nnsquery_support_deps
+ subdir('tensor_query')
+endif
+
subdir('include')
# Private header for sub-plugins and native APIs
#include <tensor_transform/tensor_transform.h>
#include <tensor_if/gsttensorif.h>
#include <tensor_rate/gsttensorrate.h>
+#if (ENABLE_NNS_QUERY == 1)
#include <tensor_query/tensor_query_serversrc.h>
#include <tensor_query/tensor_query_serversink.h>
#include <tensor_query/tensor_query_client.h>
+#endif
#define NNSTREAMER_INIT(plugin,name,type) \
do { \
NNSTREAMER_INIT (plugin, transform, TRANSFORM);
NNSTREAMER_INIT (plugin, if, IF);
NNSTREAMER_INIT (plugin, rate, RATE);
+#if (ENABLE_NNS_QUERY == 1)
NNSTREAMER_INIT (plugin, query_serversrc, QUERY_SERVERSRC);
NNSTREAMER_INIT (plugin, query_serversink, QUERY_SERVERSINK);
NNSTREAMER_INIT (plugin, query_client, QUERY_CLIENT);
+#endif
#if defined(__gnu_linux__) && !defined(__ANDROID__)
/* IIO requires Linux / non-Android */
#if (GST_VERSION_MAJOR == 1) && (GST_VERSION_MINOR >= 8)
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)
-nns_query_dep = dependency('nnsquery')
libm_dep = cc.find_library('m') # cmath library
libdl_dep = cc.find_library('dl') # DL library
'tvm-support': {
'target': 'tvm_runtime',
'project_args': { 'ENABLE_TVM' : 1 }
+ },
+ 'nnsquery-support': {
+ 'target': 'nnsquery',
+ 'project_args': { 'ENABLE_NNS_QUERY' : 1 }
}
}
option('lua-support', type: 'feature', value: 'auto')
option('mqtt-support', type: 'feature', value: 'auto')
option('tvm-support', type: 'feature', value: 'auto')
+option('nnsquery-support', type: 'feature', value: 'auto')
# booleans & other options
option('enable-test', type: 'boolean', value: true)
test('unittest_join', unittest_join, env: testenv)
# Run unittest_query
- unittest_query = executable('unittest_query',
- join_paths('nnstreamer_query', 'unittest_query.cc'),
- dependencies: [nnstreamer_unittest_deps, unittest_util_dep],
- install: get_option('install-test'),
- install_dir: unittest_install_dir
- )
+ if nnsquery_support_is_available
+ unittest_query = executable('unittest_query',
+ join_paths('nnstreamer_query', 'unittest_query.cc'),
+ dependencies: [nnstreamer_unittest_deps, unittest_util_dep],
+ install: get_option('install-test'),
+ install_dir: unittest_install_dir
+ )
- test('unittest_query', unittest_query, env: testenv)
+ test('unittest_query', unittest_query, env: testenv)
+ endif
# Run unittest_mqtt
if mqtt_support_is_available