'tensor_repo.c'
]
-tensor_commonOBJ = static_library('tensor_common',
+tensor_commonOBJ = static_library('tensor_common',
tensor_common_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_aggregatorOBJ = static_library('tensor_aggregator',
tensor_aggregator_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
).extract_all_objects()
objects += tensor_aggregatorOBJ
-
tensor_converterOBJ = static_library('tensor_converter',
tensor_converter_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_decoderOBJ = static_library('tensor_decoder',
tensor_decoder_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_demuxOBJ = static_library('tensor_demux',
tensor_demux_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
).extract_all_objects()
objects += tensor_demuxOBJ
-
'tensor_filter_custom.c'
]
-c_args = []
+tensor_filter_args = [nnstreamer_base_args]
if get_option('ENABLE_TENSORFLOW_LITE')
tensor_filter_sources += 'tensor_filter_tensorflow_lite.c'
dependencies += dependency('tensorflow-lite')
- c_args += '-DENABLE_TENSORFLOW_LITE'
+ tensor_filter_args += ['-DENABLE_TENSORFLOW_LITE']
tensor_filter_tflitecoreOBJ = static_library('tensor_filter_tflitecore',
'tensor_filter_tensorflow_lite_core.cc',
dependencies
],
include_directories: inc,
- cpp_args: '-Wno-sign-compare'
+ cpp_args: tensor_filter_args + ['-Wno-sign-compare']
).extract_all_objects()
objects += tensor_filter_tflitecoreOBJ
if get_option('ENABLE_TENSORFLOW')
tensor_filter_sources += 'tensor_filter_tensorflow.c'
dependencies += dependency('tensorflow')
- c_args += '-DENABLE_TENSORFLOW'
+ tensor_filter_args += ['-DENABLE_TENSORFLOW']
tensor_filter_tfcoreOBJ = static_library('tensor_filter_tfcore',
'tensor_filter_tensorflow_core.cc',
dependencies
],
include_directories: inc,
- cpp_args: '-Wno-sign-compare'
+ cpp_args: tensor_filter_args + ['-Wno-sign-compare']
).extract_all_objects()
objects += tensor_filter_tflitecoreOBJ
dependencies
],
include_directories: inc,
- c_args: c_args
+ c_args: tensor_filter_args
).extract_all_objects()
objects += tensor_filterOBJ
tensor_mergeOBJ = static_library('tensor_merge',
tensor_merge_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
- include_directories: inc
+ include_directories: inc
).extract_all_objects()
objects += tensor_mergeOBJ
tensor_muxOBJ = static_library('tensor_mux',
tensor_mux_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
).extract_all_objects()
objects += tensor_muxOBJ
-
tensor_reposinkOBJ = static_library('tensor_reposink',
tensor_reposink_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_reposrcOBJ = static_library('tensor_reposrc',
tensor_reposrc_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_saveloadOBJ = static_library('tensor_saveload',
tensor_saveload_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_sinkOBJ = static_library('tensor_sink',
tensor_sink_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
tensor_splitOBJ = static_library('tensor_split',
tensor_split_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
'tensor_transform.c'
]
+orcsrc = 'transform-orc'
+if have_orcc
+ # tensor_transform does not need to generate -dist files.
+ orc_h = custom_target(orcsrc + '.h',
+ input : orcsrc + '.orc',
+ output : orcsrc + '.h',
+ command : orcc_args + ['--header', '-o', '@OUTPUT@', '@INPUT@'])
+ orc_c = custom_target(orcsrc + '.c',
+ input : orcsrc + '.orc',
+ output : orcsrc + '.c',
+ command : orcc_args + ['--implementation', '-o', '@OUTPUT@', '@INPUT@'])
+ tensor_transform_sources += [orc_c, orc_h]
+endif
+
tensor_transformOBJ = static_library('tensor_transform',
tensor_transform_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
cxx.find_library('pthread', required: false) # pthread for tensor_filter_tensorflow_lite
]
+nnstreamer_base_args = []
+
inc = include_directories('gst/nnstreamer')
+# Orc
+have_orcc = false
+orcc_args = []
+
+orc_dep = dependency('orc-0.4', version : '>= 0.4.24', required : true)
+orcc = find_program('orcc', required : true)
+if orc_dep.found() and orcc.found()
+ have_orcc = true
+ orcc_args = [orcc, '--include', 'glib.h']
+ dependencies += [orc_dep]
+ nnstreamer_base_args += ['-DHAVE_ORC=1']
+else
+ message('Cannot find orc library')
+ nnstreamer_base_args += ['-DDISABLE_ORC=1']
+endif
+
projects = [
'nnstreamer',
'tensor_aggregator',
# "both_libraries" are supported from 0.46.
nnstreamer = shared_library('nnstreamer',
nnstreamer_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],
)
nnstreamer = static_library('nnstreamer',
nnstreamer_sources,
+ c_args: nnstreamer_base_args,
dependencies: [
dependencies
],