1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13import("//build/lite/config/component/lite_component.gni")
14
15copy("ic_model") {
16  sources = [ "model/image_classification.wk" ]
17  outputs = [ "$root_out_dir/data/image_classification.wk" ]
18}
19
20lite_library("cv_image_classification") {
21  target_type = "shared_library"
22  sources = [ "source/ic_plugin.cpp" ]
23  cflags = [ "-fPIC" ]
24  cflags_cc = cflags
25  include_dirs = [
26    "include",
27    "//foundation/ai/ai_engine/interfaces",
28    "//foundation/ai/ai_engine/interfaces/kits",
29    "//foundation/ai/ai_engine/interfaces/kits/cv/image_classification",
30    "//foundation/ai/ai_engine/services/common",
31    "//foundation/ai/ai_engine/services/common/platform/os_wrapper",
32    "//foundation/ai/ai_engine/services/common/platform/os_wrapper/utils",
33    "//foundation/ai/ai_engine/services/common/platform/os_wrapper/engine_hal/interfaces",
34    "//foundation/ai/ai_engine/services/common/platform/os_wrapper/feature/interfaces",
35    "//foundation/ai/ai_engine/services/common/protocol/struct_definition",
36    "//foundation/ai/ai_engine/services/common/protocol/retcode_inner",
37    "//foundation/ai/ai_engine/services/common/protocol/plugin_config",
38    "//foundation/ai/ai_engine/services/common/utils",
39    "//foundation/ai/ai_engine/services/common/utils/encdec/include",
40    "//foundation/ai/ai_engine/services/common/utils/log",
41    "//foundation/ai/ai_engine/services/server",
42  ]
43  ldflags = [ "-lstdc++" ]
44  ldflags += [ "-lnnie_adapter" ]
45  defines = [ "USE_NNIE" ]
46  deps = [
47    "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
48    "//device/soc/hisilicon/common/hal/ai:engine_nnie_sdk",
49    "//foundation/ai/ai_engine/services/common/platform/os_wrapper/utils:plugin_helper",
50    "//foundation/ai/ai_engine/services/common/protocol/data_channel:data_channel",
51    "//foundation/ai/ai_engine/services/common/utils/encdec:encdec",
52    "//third_party/bounds_checking_function:libsec_shared",
53  ]
54}
55