[Android] disable nnstreamer layer
authorJihoon Lee <jhoon.it.lee@samsung.com>
Fri, 22 Oct 2021 12:22:53 +0000 (21:22 +0900)
committerJijoong Moon <jijoong.moon@samsung.com>
Tue, 26 Oct 2021 00:04:49 +0000 (09:04 +0900)
This patch disables nnstreamer backbone because of the package issue for
android build

**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped

Signed-off-by: Jihoon Lee <jhoon.it.lee@samsung.com>
api/capi/meson.build
jni/Android-prebuilt.mk
jni/meson.build
meson.build
nntrainer/layers/meson.build

index 60ae08c..147f103 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()
+if not nnstreamer_capi_dep.found() and get_option('platform') != 'android'
   error('nnstreamer capi dependency not found for tizen')
 endif
 
index 7ef09ae..698d069 100644 (file)
@@ -7,3 +7,12 @@ LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/arm64-v8a/libccapi-nntrainer.so
 LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
 
 include $(PREBUILT_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := nntrainer
+
+LOCAL_SRC_FILES := $(LOCAL_PATH)/lib/$(TARGET_ARCH_ABI)/libnntrainer.so
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include $(LOCAL_PATH)/include/nntrainer
+
+include $(PREBUILT_SHARED_LIBRARY)
index a727fec..b656c9b 100644 (file)
@@ -41,11 +41,12 @@ configure_file(input: 'Application.mk', output: 'Application.mk',
   copy: true
 )
 
+# below is list of file that meson acknowledges this is the output of custom target so that
+# this has to be installed by meson
 outputs= [
   'libc++_shared.so',
   'libcapi-nntrainer.so',
   'libccapi-nntrainer.so',
-  'libnnstreamer-native.so',
   'libnntrainer.so'
 ]
 
index 0ec4123..aa93252 100644 (file)
@@ -219,10 +219,9 @@ else
   run_command(meson.source_root() / 'jni' / 'prepare_ml-api.sh', meson.build_root() / 'ml-api-inference', check: true)
   ml_api_common_root = meson.build_root() / 'ml-api-inference'
   ml_api_common_dep = found_dummy_dep
-  nnstreamer_capi_dep = found_dummy_dep
 endif
 
-if get_option('enable-nnstreamer-backbone')
+if get_option('enable-nnstreamer-backbone') and get_option('platform') != 'android'
   extra_defines += '-DENABLE_NNSTREAMER_BACKBONE=1'
 endif
 
@@ -311,6 +310,7 @@ if get_option('enable-app')
   if get_option('platform') == 'android'
     warning('android app is not supported for now, building app skipped')
   else
+    # this is needed for reinforcement application. We can move this to reinforecement app dependency
     jsoncpp_dep = dependency('jsoncpp') # jsoncpp
     libcurl_dep = dependency('libcurl')
     if not tflite_dep.found()
index b5e8e31..e45ef88 100644 (file)
@@ -44,7 +44,8 @@ layer_headers = [
 
 layer_deps = []
 
-if get_option('enable-nnstreamer-backbone')
+# for android, it is disabled until we have support for the nnstreamer package
+if get_option('enable-nnstreamer-backbone') and get_option('platform') != 'android'
   if not nnstreamer_capi_dep.found()
     error('NNStreamer CAPI dependency not found')
   endif