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_ui_register.cpp", 51 ] 52 53 deps = [ 54 "${sec_comp_root_dir}/frameworks:security_component_no_cfi_enhance_adapter_src_set", 55 "${sec_comp_root_dir}/frameworks:security_component_no_cfi_framework_src_set", 56 "${sec_comp_root_dir}/frameworks/inner_api/enhance_kits:security_component_no_cfi_enhance_sdk_src_set", 57 "${sec_comp_root_dir}/services/security_component_service/sa:sec_comp_no_cfi_service_proxy", 58 ] 59 60 configs = [ 61 "${sec_comp_root_dir}/config:coverage_flags", 62 "${sec_comp_root_dir}/services/security_component_service/sa:sec_comp_service_gen_config", 63 ] 64 65 external_deps = [ 66 "access_token:libaccesstoken_sdk", 67 "bundle_framework:appexecfwk_base", 68 "bundle_framework:appexecfwk_core", 69 "c_utils:utils", 70 "hilog:libhilog", 71 "hisysevent:libhisysevent", 72 "ipc:ipc_core", 73 "json:nlohmann_json_static", 74 "samgr:samgr_proxy", 75 ] 76 77 cflags_cc = [ 78 "-DHILOG_ENABLE", 79 "-fvisibility=hidden", 80 ] 81} 82