[Ext/Filter/Meson] Make meson support the CPU extensions of OpenVino
authorWook Song <wook16.song@samsung.com>
Thu, 2 Jan 2020 07:39:48 +0000 (16:39 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 8 Jan 2020 01:52:31 +0000 (10:52 +0900)
This patch updates the meson build script for tensor filter sub-plugins
to support the CPU extensions of the OpenVino toolkit.

Signed-off-by: Wook Song <wook16.song@samsung.com>
ext/nnstreamer/tensor_filter/meson.build

index 6fc3ac5..6d3141b 100644 (file)
@@ -307,6 +307,15 @@ if get_option('enable-openvino')
   openvino_deps = []
   openvino_cpp_args = []
   openvino_deps += dependency('openvino', required: true)
+  if cxx.has_header('ext_list.hpp')
+    openvino_cpuext_lib = cxx.find_library('cpu_extension', required: true)
+    if openvino_cpuext_lib.found()
+      openvino_cpp_args += '-D__OPENVINO_CPU_EXT__=1'
+      openvino_deps += openvino_cpuext_lib
+    else
+      error('Cannot find the shared object, libcpu_extension.')
+    endif
+  endif
   filter_sub_openvino_sources = ['tensor_filter_openvino.cc']
 
   nnstreamer_filter_openvino_sources = []