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 integer_overflow = true 31 boundary_sanitize = true 32 ubsan = true 33 } 34 branch_protector_ret = "pac_ret" 35 include_dirs = [ "${screenlock_mgr_path}/services/include" ] 36 37 public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] 38 39 sources = [ 40 "src/async_call.cpp", 41 "src/napi_screenlock_ability.cpp", 42 "src/screenlock_callback.cpp", 43 "src/screenlock_js_util.cpp", 44 "src/screenlock_system_ability_callback.cpp", 45 "src/uv_queue.cpp", 46 ] 47 48 deps = [ 49 "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", 50 ] 51 52 external_deps = [ 53 "c_utils:utils", 54 "eventhandler:libeventhandler", 55 "hilog:libhilog", 56 "hitrace:hitrace_meter", 57 "ipc:ipc_single", 58 "napi:ace_napi", 59 ] 60 61 relative_install_dir = "module" 62 subsystem_name = "theme" 63 part_name = "screenlock_mgr" 64 } 65} 66 67ohos_static_library("screenlock_static") { 68 if (is_standard_system) { 69 sanitize = { 70 cfi = true 71 cfi_cross_dso = true 72 debug = false 73 integer_overflow = true 74 boundary_sanitize = true 75 ubsan = true 76 } 77 branch_protector_ret = "pac_ret" 78 testonly = true 79 include_dirs = [ "${screenlock_mgr_path}/services/include" ] 80 81 public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] 82 83 sources = [ 84 "src/async_call.cpp", 85 "src/napi_screenlock_ability.cpp", 86 "src/screenlock_callback.cpp", 87 "src/screenlock_js_util.cpp", 88 "src/screenlock_system_ability_callback.cpp", 89 "src/uv_queue.cpp", 90 ] 91 92 deps = [ 93 "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", 94 ] 95 96 external_deps = [ 97 "c_utils:utils", 98 "eventhandler:libeventhandler", 99 "hilog:libhilog", 100 "hitrace:hitrace_meter", 101 "ipc:ipc_single", 102 "napi:ace_napi", 103 ] 104 105 subsystem_name = "theme" 106 part_name = "screenlock_mgr" 107 } 108} 109