• 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  }
39  sources = [
40    "src/command.cpp",
41    "src/dump_helper.cpp",
42    "src/screenlock_callback_proxy.cpp",
43    "src/screenlock_get_info_callback.cpp",
44    "src/screenlock_manager_stub.cpp",
45    "src/screenlock_system_ability.cpp",
46    "src/screenlock_system_ability_proxy.cpp",
47  ]
48
49  public_configs = [ ":screenlock_mgr_service_config" ]
50
51  cflags = [
52    "-fdata-sections",
53    "-ffunction-sections",
54    "-fvisibility=hidden",
55    "-Os",
56  ]
57
58  deps = [ "${screenlock_mgr_path}/utils:screenlock_utils" ]
59
60  external_deps = [
61    "ability_base:want",
62    "access_token:libaccesstoken_sdk",
63    "access_token:libtokenid_sdk",
64    "c_utils:utils",
65    "common_event_service:cesfwk_innerkits",
66    "eventhandler:libeventhandler",
67    "ffrt:libffrt",
68    "hicollie:libhicollie",
69    "hilog:libhilog",
70    "hitrace:hitrace_meter",
71    "init:libbegetutil",
72    "ipc:ipc_single",
73    "os_account:os_account_innerkits",
74    "safwk:system_ability_fwk",
75    "user_auth_framework:userauth_client",
76    "window_manager:libdm",
77    "window_manager:libwm",
78    "window_manager:libwsutils",
79  ]
80
81  innerapi_tags = [ "platformsdk" ]
82  subsystem_name = "theme"
83  part_name = "screenlock_mgr"
84}
85
86ohos_static_library("screenlock_server_static") {
87  sources = [
88    "src/command.cpp",
89    "src/dump_helper.cpp",
90    "src/screenlock_callback_proxy.cpp",
91    "src/screenlock_get_info_callback.cpp",
92    "src/screenlock_manager_stub.cpp",
93    "src/screenlock_system_ability.cpp",
94    "src/screenlock_system_ability_proxy.cpp",
95  ]
96
97  public_configs = [ ":screenlock_mgr_service_config" ]
98
99  include_dirs = [
100    "${screenlock_mgr_path}/frameworks/native/include",
101    "${screenlock_mgr_path}/utils/include",
102  ]
103
104  deps = [ "${screenlock_mgr_path}/utils:screenlock_utils" ]
105
106  external_deps = [
107    "ability_base:want",
108    "access_token:libaccesstoken_sdk",
109    "access_token:libtokenid_sdk",
110    "c_utils:utils",
111    "common_event_service:cesfwk_innerkits",
112    "eventhandler:libeventhandler",
113    "ffrt:libffrt",
114    "hicollie:libhicollie",
115    "hilog:libhilog",
116    "hitrace:hitrace_meter",
117    "init:libbegetutil",
118    "ipc:ipc_single",
119    "os_account:os_account_innerkits",
120    "safwk:system_ability_fwk",
121    "user_auth_framework:userauth_client",
122    "window_manager:libdm",
123    "window_manager:libwm",
124    "window_manager:libwsutils",
125  ]
126
127  subsystem_name = "theme"
128  part_name = "screenlock_mgr"
129}
130