1# Copyright (c) 2023-2024 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") 15 16sec_comp_root_dir = "../../.." 17 18config("sec_comp_config") { 19 visibility = [ ":*" ] 20 include_dirs = 21 [ "${sec_comp_root_dir}/interfaces/inner_api/security_component/include" ] 22} 23 24ohos_shared_library("libsecurity_component_sdk") { 25 branch_protector_ret = "pac_ret" 26 subsystem_name = "security" 27 part_name = "security_component_manager" 28 output_name = "libsecurity_component_sdk" 29 30 public_configs = [ ":sec_comp_config" ] 31 innerapi_tags = [ "sasdk" ] 32 33 include_dirs = [ 34 "include", 35 "${sec_comp_root_dir}/frameworks/common/include", 36 "${sec_comp_root_dir}/frameworks/enhance_adapter/include/", 37 "${sec_comp_root_dir}/frameworks/inner_api/enhance_kits/include", 38 "${sec_comp_root_dir}/frameworks/security_component/include", 39 "${sec_comp_root_dir}/interfaces/inner_api/security_component_common", 40 ] 41 42 sources = [ 43 "src/sec_comp_caller_authorization.cpp", 44 "src/sec_comp_client.cpp", 45 "src/sec_comp_death_recipient.cpp", 46 "src/sec_comp_dialog_callback.cpp", 47 "src/sec_comp_dialog_callback_stub.cpp", 48 "src/sec_comp_kit.cpp", 49 "src/sec_comp_load_callback.cpp", 50 "src/sec_comp_proxy.cpp", 51 "src/sec_comp_ui_register.cpp", 52 ] 53 54 deps = [ 55 "${sec_comp_root_dir}/frameworks:security_component_no_cfi_enhance_adapter_src_set", 56 "${sec_comp_root_dir}/frameworks:security_component_no_cfi_framework_src_set", 57 "${sec_comp_root_dir}/frameworks/inner_api/enhance_kits:security_component_no_cfi_enhance_sdk_src_set", 58 ] 59 60 configs = [ "${sec_comp_root_dir}/config:coverage_flags" ] 61 62 external_deps = [ 63 "access_token:libaccesstoken_sdk", 64 "bundle_framework:appexecfwk_core", 65 "c_utils:utils", 66 "hilog:libhilog", 67 "hisysevent:libhisysevent", 68 "ipc:ipc_core", 69 "samgr:samgr_proxy", 70 ] 71 72 public_external_deps = [ "json:nlohmann_json_static" ] 73 74 cflags_cc = [ 75 "-DHILOG_ENABLE", 76 "-fvisibility=hidden", 77 ] 78} 79