[build] Fix tflite nnapi delegate check meson logic
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Tue, 2 Jul 2024 03:59:23 +0000 (12:59 +0900)
committerMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 3 Jul 2024 06:12:53 +0000 (15:12 +0900)
- Check `delete` in meson.build. Recent versions of tflite need to check
  this.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
ext/nnstreamer/tensor_filter/meson.build

index d63de8e..ea303ad 100644 (file)
@@ -226,8 +226,11 @@ if tflite2_support_is_available
   ## nnapi delegate
   if cxx.links('''
         #include "tensorflow/lite/delegates/nnapi/nnapi_delegate.h"
-        tflite::StatefulNnApiDelegate::StatefulNnApiDelegate ();
-        int main() {return 0;}
+        int main() {
+          tflite::StatefulNnApiDelegate *nnapi_delegate = new tflite::StatefulNnApiDelegate ();
+          delete nnapi_delegate;
+          return 0;
+        }
       ''', dependencies : [tflite2_support_deps], name : 'nnapi delegate')
     tflite2_compile_args += '-DTFLITE_NNAPI_DELEGATE_SUPPORTED'
   endif