• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023-2025 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("../windowmanager_aafwk.gni")
16
17config("libdm_private_config") {
18  include_dirs = [
19    "include",
20    "../dm/include",
21    "../dmserver/include",
22  ]
23}
24
25config("libdm_public_config") {
26  include_dirs = [
27    "../interfaces/innerkits/dm",
28    "../interfaces/innerkits/dm_lite",
29    "../utils/include",
30    "../window_scene/screen_session_manager/include",
31    "../window_scene/session_manager/include",
32    "../wmserver/include",
33  ]
34}
35
36## Build libdm_lite.so
37ohos_shared_library("libdm_lite") {
38  branch_protector_ret = "pac_ret"
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    cfi_vcall_icall_only = true
43    debug = false
44  }
45
46  sources = [
47    "../dm/src/zidl/display_manager_agent_stub.cpp",
48    "src/display_lite.cpp",
49    "src/display_manager_adapter_lite.cpp",
50    "src/display_manager_lite.cpp",
51    "src/display_manager_lite_proxy.cpp",
52    "src/screen_manager_lite.cpp",
53  ]
54  if (!window_manager_use_sceneboard) {
55    sources += [ "src/display_manager_lite_proxy_idl.cpp" ]
56  }
57
58  configs = [
59    ":libdm_private_config",
60    "../resources/config/build:coverage_flags",
61  ]
62
63  public_configs = [ ":libdm_public_config" ]
64
65  deps = [ "${window_base_path}/utils:libwmutil_base" ]
66
67  external_deps = [
68    "c_utils:utils",
69    "hilog:libhilog",
70    "ipc:ipc_single",
71    "samgr:samgr_proxy",
72  ]
73
74  innerapi_tags = [ "platformsdk" ]
75  part_name = "window_manager"
76  subsystem_name = "window"
77
78  defines = []
79  if (build_variant == "user") {
80    defines += [ "IS_RELEASE_VERSION" ]
81  }
82
83  if (window_manager_use_sceneboard) {
84    defines += [ "SCENE_BOARD_ENABLED" ]
85  }
86  if (window_manager_feature_screenless) {
87    defines += [ "SCREENLESS_ENABLE" ]
88  }
89}
90
91group("test") {
92  testonly = true
93  if (window_manager_use_sceneboard) {
94    deps = [ "test:test" ]
95  } else {
96    deps = []
97  }
98}
99