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")
15
16config("gralloc_client_public_config") {
17  include_dirs = [
18    "../../../interfaces/include",
19    "../include",
20  ]
21}
22if (defined(ohos_lite)) {
23  ohos_static_library("hdi_gralloc_client") {
24    deps = []
25    public_configs = []
26  }
27} else {
28  declare_args() {
29    drivers_peripheral_display_hdi_gralloc_client =
30        ":libhdi_display_gralloc_client"
31  }
32  ohos_static_library("hdi_gralloc_client") {
33    public_configs = [ ":gralloc_client_public_config" ]
34    subsystem_name = "hdf"
35    part_name = "drivers_peripheral_display"
36  }
37
38  ohos_shared_library("libhdi_display_gralloc_client") {
39    include_dirs = [
40      "../../../interfaces/include",
41      "../include",
42    ]
43    sources = [
44      "allocator_proxy.cpp",
45      "display_gralloc_client.cpp",
46      "mapper_adapter.cpp",
47    ]
48
49    if (is_standard_system) {
50      external_deps = [
51        "c_utils:utils",
52        "drivers_interface_display:libdisplay_gralloc",
53        "hdf_core:libhdf_host",
54        "hdf_core:libhdf_ipc_adapter",
55        "hdf_core:libhdi",
56        "hdf_core:libpub_utils",
57        "hilog:libhilog",
58        "ipc:ipc_single",
59      ]
60    } else {
61      external_deps = [ "hilog:libhilog" ]
62    }
63    external_deps += [ "graphic_surface:buffer_handle" ]
64    subsystem_name = "hdf"
65    part_name = "drivers_peripheral_display"
66  }
67}
68