1# Copyright (c) 2023 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("./../../display_config.gni")
16
17group("display_composer_hdi_service") {
18  deps = [
19    ":libdisplay_composer_driver_1.0",
20    ":libdisplay_composer_service_1.2",
21  ]
22}
23
24ohos_shared_library("libdisplay_composer_service_1.2") {
25  defines = []
26  defines += display_defines
27  include_dirs = [
28    "../../utils/include",
29    "include",
30  ]
31  sources = [ "src/display_composer_service.cpp" ]
32
33  external_deps = [
34    "c_utils:utils",
35    "drivers_interface_display:libcomposer_buffer_cache",
36    "drivers_interface_display:libdisplay_buffer_stub_1.0",
37    "drivers_interface_display:libdisplay_buffer_stub_1.1",
38    "drivers_interface_display:libdisplay_buffer_stub_1.2",
39    "drivers_interface_display:libdisplay_composer_hdi_impl_1.2",
40    "drivers_interface_display:libdisplay_composer_stub_1.0",
41    "drivers_interface_display:libdisplay_composer_stub_1.1",
42    "drivers_interface_display:libdisplay_composer_stub_1.2",
43    "graphic_surface:buffer_handle",
44    "hdf_core:libhdf_ipc_adapter",
45    "hdf_core:libhdf_utils",
46    "hdf_core:libhdi",
47    "hilog:libhilog",
48    "hitrace:hitrace_meter",
49    "init:libbegetutil",
50    "ipc:ipc_single",
51  ]
52
53  if (build_variant != "user") {
54    include_dirs += [ "../../hal" ]
55    sources += [
56      "src/display_dump_disp.cpp",
57      "src/display_dump_service.cpp",
58      "src/display_dump_vdi.cpp",
59    ]
60    external_deps += [ "hdf_core:libhdf_host" ]
61    cflags_cc = [ "-DUSING_OHOS" ]
62    defines += [
63      "DISPLAY_COMPOSER_SERVICE_HIDUMPER",
64      "DISPLAY_COMSPOER_DEBUG_DUMP",
65    ]
66  }
67
68  install_images = [ chipset_base_dir ]
69  subsystem_name = "hdf"
70  part_name = "drivers_peripheral_display"
71}
72
73ohos_shared_library("libdisplay_composer_driver_1.0") {
74  include_dirs = []
75  sources = [ "src/display_composer_driver.cpp" ]
76
77  external_deps = [
78    "c_utils:utils",
79    "drivers_interface_display:libdisplay_buffer_stub_1.0",
80    "drivers_interface_display:libdisplay_composer_stub_1.0",
81    "drivers_interface_display:libdisplay_composer_stub_1.1",
82    "drivers_interface_display:libdisplay_composer_stub_1.2",
83    "hdf_core:libhdf_host",
84    "hdf_core:libhdf_ipc_adapter",
85    "hdf_core:libhdf_utils",
86    "hdf_core:libhdi",
87    "hilog:libhilog",
88    "hitrace:hitrace_meter",
89    "init:libbegetutil",
90    "ipc:ipc_single",
91  ]
92
93  if (drivers_peripheral_display_hicollie_enable) {
94    external_deps += [ "hicollie:libhicollie" ]
95  }
96
97  shlib_type = "hdi"
98  install_images = [ chipset_base_dir ]
99  subsystem_name = "hdf"
100  part_name = "drivers_peripheral_display"
101}
102