api: clean up dependencies
authorMyungJoo Ham <myungjoo.ham@samsung.com>
Wed, 23 Mar 2022 10:14:32 +0000 (19:14 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Fri, 1 Apr 2022 01:02:36 +0000 (10:02 +0900)
Remove unnecessary dependencies.

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
api/capi/include/nntrainer.h
api/capi/meson.build
api/ccapi/include/layer.h
api/ccapi/include/optimizer.h
api/meson.build

index 22a2323..43f6e4d 100644 (file)
@@ -29,7 +29,6 @@
 #include <stdbool.h>
 #include <stddef.h>
 
-#include <ml-api-common.h>
 #include <nnstreamer.h>
 #include <nntrainer-api-common.h>
 
index 147f103..eaf224a 100644 (file)
@@ -9,7 +9,7 @@ capi_inc_abs = [
 capi_src = []
 capi_src += meson.current_source_dir() / 'src' / 'nntrainer.cpp'
 
-if not nnstreamer_capi_dep.found() and get_option('platform') != 'android'
+if not nnstreamer_capi_dep.found() and get_option('platform') == 'tizen'
   error('nnstreamer capi dependency not found for tizen')
 endif
 
index 1907a20..d2fd89f 100644 (file)
@@ -23,7 +23,6 @@
 #include <string>
 #include <vector>
 
-#include <ml-api-common.h>
 #include <nntrainer-api-common.h>
 
 namespace ml {
index bb56e73..011b9f8 100644 (file)
@@ -21,7 +21,6 @@
 #include <string>
 #include <vector>
 
-#include <ml-api-common.h>
 #include <nntrainer-api-common.h>
 
 namespace ml {
index 41b7440..d170d5c 100644 (file)
@@ -1,10 +1,15 @@
 if get_option('enable-ccapi')
+  enable_ccapi = true
   subdir('ccapi')
 endif
 
-if get_option('enable-capi')
+if get_option('enable-capi').enabled()
   if not get_option('enable-ccapi')
     error('enable-ccapi must be set for capi as well')
   endif
+  enable_capi = true
+  subdir('capi')
+elif get_option('enable-capi').auto() and get_option('enable-ccapi') and nnstreamer_capi_dep.found()
+  enable_capi = true
   subdir('capi')
 endif