• 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("../screenlock.gni")
16
17config("screenlock_mgr_service_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "include",
21    "${screenlock_mgr_path}/frameworks/native/include",
22    "${screenlock_mgr_path}/interfaces/inner_api/include",
23    "${screenlock_mgr_path}/utils/include",
24    "${resourceschedule_ffrt_path}/interfaces/kits",
25  ]
26}
27
28ohos_shared_library("screenlock_server") {
29  version_mode = getenv("versionmode")
30  if (version_mode == "factory") {
31    cflags_cc = [ "-DCONFIG_FACTORY_MODE" ]
32  }
33
34  sanitize = {
35    cfi = true
36    cfi_cross_dso = true
37    debug = false
38    integer_overflow = true
39    boundary_sanitize = true
40    ubsan = true
41  }
42  branch_protector_ret = "pac_ret"
43  sources = [
44    "src/command.cpp",
45    "src/dump_helper.cpp",
46    "src/screenlock_callback_proxy.cpp",
47    "src/screenlock_get_info_callback.cpp",
48    "src/screenlock_manager_stub.cpp",
49    "src/screenlock_system_ability.cpp",
50    "src/screenlock_system_ability_proxy.cpp",
51  ]
52
53  public_configs = [ ":screenlock_mgr_service_config" ]
54
55  cflags = [
56    "-fdata-sections",
57    "-ffunction-sections",
58    "-fvisibility=hidden",
59    "-Os",
60  ]
61
62  deps = [ "${screenlock_mgr_path}/utils:screenlock_utils" ]
63
64  external_deps = [
65    "ability_base:want",
66    "ability_runtime:ability_manager",
67    "access_token:libaccesstoken_sdk",
68    "access_token:libtokenid_sdk",
69    "c_utils:utils",
70    "common_event_service:cesfwk_innerkits",
71    "eventhandler:libeventhandler",
72    "ffrt:libffrt",
73    "hicollie:libhicollie",
74    "hilog:libhilog",
75    "hitrace:hitrace_meter",
76    "init:libbegetutil",
77    "ipc:ipc_single",
78    "os_account:os_account_innerkits",
79    "safwk:system_ability_fwk",
80    "user_auth_framework:userauth_client",
81    "window_manager:libdm",
82    "window_manager:libwm",
83  ]
84
85  innerapi_tags = [ "platformsdk" ]
86  subsystem_name = "theme"
87  part_name = "screenlock_mgr"
88}
89
90ohos_static_library("screenlock_server_static") {
91  sanitize = {
92    cfi = true
93    cfi_cross_dso = true
94    debug = false
95    integer_overflow = true
96    boundary_sanitize = true
97    ubsan = true
98  }
99  branch_protector_ret = "pac_ret"
100  sources = [
101    "src/command.cpp",
102    "src/dump_helper.cpp",
103    "src/screenlock_callback_proxy.cpp",
104    "src/screenlock_get_info_callback.cpp",
105    "src/screenlock_manager_stub.cpp",
106    "src/screenlock_system_ability.cpp",
107    "src/screenlock_system_ability_proxy.cpp",
108  ]
109
110  public_configs = [ ":screenlock_mgr_service_config" ]
111
112  include_dirs = [
113    "${screenlock_mgr_path}/frameworks/native/include",
114    "${screenlock_mgr_path}/utils/include",
115  ]
116
117  deps = [ "${screenlock_mgr_path}/utils:screenlock_utils" ]
118
119  external_deps = [
120    "ability_base:want",
121    "ability_runtime:ability_manager",
122    "access_token:libaccesstoken_sdk",
123    "access_token:libtokenid_sdk",
124    "c_utils:utils",
125    "common_event_service:cesfwk_innerkits",
126    "eventhandler:libeventhandler",
127    "ffrt:libffrt",
128    "hicollie:libhicollie",
129    "hilog:libhilog",
130    "hitrace:hitrace_meter",
131    "init:libbegetutil",
132    "ipc:ipc_single",
133    "os_account:os_account_innerkits",
134    "safwk:system_ability_fwk",
135    "user_auth_framework:userauth_client",
136    "window_manager:libdm",
137    "window_manager:libwm",
138  ]
139
140  subsystem_name = "theme"
141  part_name = "screenlock_mgr"
142}
143