• 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.
13
14import("//build/ohos.gni")
15import("//foundation/graphic/graphic_2d/graphic_config.gni")
16
17## Build libnative_image.so {{{
18config("native_image_config") {
19  visibility = [ ":*" ]
20
21  cflags = [
22    "-Wall",
23    "-Werror",
24    "-g3",
25  ]
26}
27
28config("libnative_image_public_config") {
29  include_dirs = [
30    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
31    "$graphic_2d_root/frameworks/surface/include",
32    "$graphic_2d_root/utils/sandbox",
33    "include",
34  ]
35}
36
37ohos_shared_library("libnative_image") {
38  sources = []
39  if (surface_enable_gpu) {
40    sources += [
41      "src/native_image.cpp",
42      "src/surface_image.cpp",
43    ]
44
45    if (defined(graphic_2d_ext_configs.vendor_root)) {
46      sources += graphic_2d_ext_configs.libnative_image_ext_sources
47      sources -= graphic_2d_ext_configs.libnative_image_ext_sources_del
48    }
49  }
50
51  configs = [ ":native_image_config" ]
52
53  public_configs = [ ":libnative_image_public_config" ]
54
55  deps = [
56    "$graphic_2d_root:libgl",
57    "$graphic_2d_root/frameworks/surface:surface",
58    "$graphic_2d_root/utils:sync_fence",
59  ]
60
61  output_extension = "so"
62
63  external_deps = [
64    "c_utils:utils",
65    "hilog:libhilog",
66    "ipc:ipc_single",
67  ]
68
69  part_name = "graphic_2d"
70  subsystem_name = "graphic"
71}
72## Build libnative_image.so }}}
73