• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("../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  sources = [
46    "../dm/src/zidl/display_manager_agent_stub.cpp",
47    "src/display_lite.cpp",
48    "src/display_manager_adapter_lite.cpp",
49    "src/display_manager_lite.cpp",
50    "src/display_manager_lite_proxy.cpp",
51    "src/screen_manager_lite.cpp",
52  ]
53
54  configs = [
55    ":libdm_private_config",
56    "../resources/config/build:coverage_flags",
57  ]
58
59  public_configs = [ ":libdm_public_config" ]
60
61  deps = [ "${window_base_path}/utils:libwmutil_base" ]
62
63  external_deps = [
64    "c_utils:utils",
65    "hilog:libhilog",
66    "ipc:ipc_single",
67    "samgr:samgr_proxy",
68  ]
69
70  innerapi_tags = [ "platformsdk" ]
71  part_name = "window_manager"
72  subsystem_name = "window"
73
74  defines = []
75  if (build_variant == "user") {
76    defines += [ "IS_RELEASE_VERSION" ]
77  }
78
79  if (window_manager_use_sceneboard) {
80    defines += [ "SCENE_BOARD_ENABLED" ]
81  }
82}
83
84group("test") {
85  testonly = true
86  if (window_manager_use_sceneboard) {
87    deps = [ "test:test" ]
88  } else {
89    deps = []
90  }
91}
92