• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("demo_image_for_test") {
16  sources = [ "resources/image_classification_demo.jpg" ]
17  outputs = [ "$root_out_dir/data/image_classification_demo.jpg" ]
18}
19
20executable("ic_app") {
21  sources = [
22    "camera_manager.cpp",
23    "image_classification_sample.cpp",
24    "picture_utils.cpp",
25    "resize_computer.cpp",
26  ]
27  cflags = [ "-Wall" ]
28  cflags_cc = cflags
29  include_dirs = [
30    "//third_party/libjpeg",
31    "//foundation/ai/engine/interfaces/kits",
32    "//foundation/ai/engine/interfaces/kits/cv/image_classification",
33    "//foundation/ai/engine/services/client/algorithm_sdk/cv/image_classification/include",
34    "//foundation/multimedia/media_lite/interfaces/kits/recorder_lite",
35  ]
36
37  ldflags = [ "-lstdc++" ]
38  ldflags += [ "-lpthread" ]
39  ldflags += [ "-Wl,-rpath-link=$ohos_root_path/$root_out_dir" ]
40
41  deps = [
42    "//foundation/ai/engine/services/client/algorithm_sdk/cv/image_classification:image_classification_sdk",
43    "//foundation/multimedia/camera_lite/frameworks:camera_lite",
44    "//foundation/multimedia/media_lite/frameworks/recorder_lite:recorder_lite",
45    "//third_party/libjpeg",
46  ]
47  output_dir = "$root_out_dir/dev_tools"
48}
49
50lite_component("ic") {
51  features = [
52    ":ic_app",
53    ":demo_image_for_test",
54  ]
55}
56