# Copyright (c) 2022 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../../screenlock.gni") config("screenlock_mgr_frameworks_js_napi_config") { visibility = [ ":*" ] include_dirs = [ "include" ] cflags_cc = [] } ohos_shared_library("screenlock") { if (is_standard_system) { sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true boundary_sanitize = true ubsan = true } branch_protector_ret = "pac_ret" include_dirs = [ "${screenlock_mgr_path}/services/include", "${screenlock_mgr_path}/utils/include", ] public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] sources = [ "src/async_call.cpp", "src/napi_screenlock_ability.cpp", "src/screenlock_callback.cpp", "src/screenlock_js_util.cpp", "src/screenlock_system_ability_callback.cpp", "src/uv_queue.cpp", ] deps = [ "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", ] external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "napi:ace_napi", ] relative_install_dir = "module" subsystem_name = "theme" part_name = "screenlock_mgr" } } ohos_static_library("screenlock_static") { if (is_standard_system) { sanitize = { cfi = true cfi_cross_dso = true debug = false integer_overflow = true boundary_sanitize = true ubsan = true } branch_protector_ret = "pac_ret" testonly = true include_dirs = [ "${screenlock_mgr_path}/services/include", "${screenlock_mgr_path}/utils/include", ] public_configs = [ ":screenlock_mgr_frameworks_js_napi_config" ] sources = [ "src/async_call.cpp", "src/napi_screenlock_ability.cpp", "src/screenlock_callback.cpp", "src/screenlock_js_util.cpp", "src/screenlock_system_ability_callback.cpp", "src/uv_queue.cpp", ] deps = [ "${screenlock_mgr_path}/interfaces/inner_api:screenlock_client_static", ] external_deps = [ "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_single", "napi:ace_napi", ] subsystem_name = "theme" part_name = "screenlock_mgr" } }