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