• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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/window/window_manager/windowmanager_aafwk.gni")
16
17## Build libdms.so
18config("libdms_private_config") {
19  include_dirs = [
20    "//foundation/window/window_manager/dm/include",
21    "//foundation/window/window_manager/interfaces/innerkits/dm",
22  ]
23}
24
25config("libdms_public_config") {
26  include_dirs = [ "include" ]
27}
28
29ohos_shared_library("libdms") {
30  sources = [
31    "../dm/src/zidl/display_manager_agent_proxy.cpp",
32    "src/abstract_display.cpp",
33    "src/abstract_display_controller.cpp",
34    "src/abstract_screen.cpp",
35    "src/abstract_screen_controller.cpp",
36    "src/display_cutout_controller.cpp",
37    "src/display_dumper.cpp",
38    "src/display_manager_agent_controller.cpp",
39    "src/display_manager_config.cpp",
40    "src/display_manager_service.cpp",
41    "src/display_manager_service_inner.cpp",
42    "src/display_manager_stub.cpp",
43    "src/display_power_controller.cpp",
44    "src/screen_rotation_controller.cpp",
45    "src/sensor_connector.cpp",
46  ]
47
48  configs = [
49    ":libdms_private_config",
50    "//foundation/window/window_manager/resources/config/build:coverage_flags",
51  ]
52
53  public_configs = [ ":libdms_public_config" ]
54
55  deps = [
56    "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client",
57    "//foundation/resourceschedule/resource_schedule_service/soc_perf:socperf_client",
58    "//foundation/window/window_manager/utils:libwmutil",
59    "//third_party/libxml2:libxml2",
60  ]
61
62  external_deps = [
63    "c_utils:utils",
64    "config_policy:configpolicy_util",
65    "eventhandler:libeventhandler",
66    "graphic_standard:surface",
67    "hilog_native:libhilog",
68    "hitrace_native:hitrace_meter",
69    "ipc:ipc_core",
70    "safwk:system_ability_fwk",
71    "sensor:sensor_interface_native",
72  ]
73
74  include_dirs = [ "//third_party/flutter/skia/src" ]
75
76  defines = []
77  if (window_manager_feature_subscribe_motion) {
78    if (defined(global_parts_info) && defined(global_parts_info.msdp_motion)) {
79      external_deps += [ "motion:motion_interface_native" ]
80      defines += [ "WM_SUBSCRIBE_MOTION_ENABLE" ]
81    }
82  }
83
84  if (is_standard_system) {
85    external_deps += [ "init:libbegetutil" ]
86  } else {
87    external_deps += [ "init_lite:libbegetutil" ]
88  }
89
90  part_name = "window_manager"
91  subsystem_name = "window"
92}
93
94group("test") {
95  testonly = true
96  deps = [ "test:test" ]
97}
98