tensor_query: nnstreamer-edge dependency fix
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Thu, 10 Aug 2023 05:40:37 +0000 (14:40 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Mon, 14 Aug 2023 04:28:59 +0000 (13:28 +0900)
1. nnstreamer-edge.h is from another package. Use #include appropriately.
2. dependency on nnstreamer-edge is not expressed proprely in meson.

Potential issue: Android build w/ nnstreamer-edge might need further care in /jni

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
gst/edge/meson.build
gst/nnstreamer/tensor_query/tensor_query_client.h
gst/nnstreamer/tensor_query/tensor_query_common.h
gst/nnstreamer/tensor_query/tensor_query_server.h
meson.build

index e907ba8..c3d6f59 100644 (file)
@@ -9,7 +9,7 @@ edge_dep = [
     glib_dep,
     gst_base_dep,
     gst_dep,
-    nnstreamer_edge_support_deps
+    nnstreamer_edge_dep,
 ]
 
 if build_platform == 'tizen'
index 0840589..3aa57d7 100644 (file)
@@ -16,7 +16,7 @@
 #include <gst/gst.h>
 #include <gio/gio.h>
 #include <tensor_common.h>
-#include "nnstreamer-edge.h"
+#include <nnstreamer-edge.h>
 
 G_BEGIN_DECLS
 
index 4351c43..1b7fb23 100644 (file)
@@ -16,7 +16,7 @@
 #include "tensor_typedef.h"
 #include "tensor_common.h"
 #include "tensor_meta.h"
-#include "nnstreamer-edge.h"
+#include <nnstreamer-edge.h>
 
 #ifdef __cplusplus
 extern "C" {
index 80ab732..cf1b385 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <gst/gst.h>
 #include <tensor_common.h>
-#include "nnstreamer-edge.h"
+#include <nnstreamer-edge.h>
 #include "tensor_meta.h"
 
 G_BEGIN_DECLS
index 56cca54..4d6604f 100644 (file)
@@ -325,6 +325,15 @@ if not get_option('mxnet-support').disabled()
   endif
 endif
 
+# nnstreamer-edge
+nnstreamer_edge_dep = dependency('nnstreamer-edge', method : 'pkg-config', required: false)
+if get_option('nnstreamer-edge-support').enabled()
+  if not nnstreamer_edge_dep.found()
+    error('nnstreamer-edge not found whilt it is enabled.')
+  endif
+endif
+## Without the explicit method designation, it fails to find cflags in older Meson
+
 # features registration to be controlled
 #
 # register feature as follows
@@ -421,7 +430,7 @@ features = {
     'project_args': { 'ENABLE_TRIX_ENGINE' : 1 }
   },
   'nnstreamer-edge-support': {
-    'target': 'nnstreamer-edge',
+    'extra_deps': [ nnstreamer_edge_dep ],
     'project_args': { 'ENABLE_NNSTREAMER_EDGE': 1 }
   },
   'mxnet-support': {