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_frameworks_js_napi_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ "include" ] 20 21 cflags_cc = [] 22} 23 24ohos_shared_library("screenlock") { 25 if (is_standard_system) { 26 sanitize = { 27 cfi = true 28 cfi_cross_dso = true 29 debug = false 30 } 31 include_dirs = [ 32 "${screenlock_mgr_path}/services/include", 33 "${screenlock_mgr_path}/utils/include", 34 ] 35 36 public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] 37 38 sources = [ 39 "src/async_call.cpp", 40 "src/napi_screenlock_ability.cpp", 41 "src/screenlock_callback.cpp", 42 "src/screenlock_js_util.cpp", 43 "src/screenlock_system_ability_callback.cpp", 44 "src/uv_queue.cpp", 45 ] 46 47 deps = [ "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client" ] 48 49 external_deps = [ 50 "c_utils:utils", 51 "hilog:libhilog", 52 "hitrace:hitrace_meter", 53 "ipc:ipc_single", 54 "napi:ace_napi", 55 ] 56 57 relative_install_dir = "module" 58 subsystem_name = "theme" 59 part_name = "screenlock_mgr" 60 } 61} 62 63ohos_static_library("screenlock_static") { 64 if (is_standard_system) { 65 testonly = true 66 include_dirs = [ 67 "${screenlock_mgr_path}/services/include", 68 "${screenlock_mgr_path}/utils/include", 69 ] 70 71 public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] 72 73 sources = [ 74 "src/async_call.cpp", 75 "src/napi_screenlock_ability.cpp", 76 "src/screenlock_callback.cpp", 77 "src/screenlock_js_util.cpp", 78 "src/screenlock_system_ability_callback.cpp", 79 "src/uv_queue.cpp", 80 ] 81 82 deps = [ "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client" ] 83 84 external_deps = [ 85 "c_utils:utils", 86 "hilog:libhilog", 87 "hitrace:hitrace_meter", 88 "ipc:ipc_single", 89 "napi:ace_napi", 90 ] 91 92 subsystem_name = "theme" 93 part_name = "screenlock_mgr" 94 } 95} 96