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