1# Copyright (C) 2021 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("//foundation/distributeddatamgr/preferences/preferences.gni") 16 17group("common_target") { 18 deps = [ ":libtel_common" ] 19} 20 21config("telephony_log_config") { 22 include_dirs = [ "log/include" ] 23} 24 25config("tel_utils_config") { 26 include_dirs = [ 27 "common/include", 28 "preferences/include", 29 "log/include", 30 ] 31} 32 33ohos_shared_library("libtel_common") { 34 include_dirs = [ "//base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent/include" ] 35 36 sources = [ 37 "common/src/enum_convert.cpp", 38 "common/src/str_convert.cpp", 39 "common/src/telephony_common_utils.cpp", 40 "common/src/telephony_permission.cpp", 41 "preferences/src/tel_profile_util.cpp", 42 ] 43 44 defines = [ 45 "TELEPHONY_LOG_TAG = \"TelephonyCommon\"", 46 "LOG_DOMAIN = 0xD001F04", 47 ] 48 49 if (is_standard_system) { 50 defines += [ "STANDARD_SYSTEM_ENABLE" ] 51 } 52 53 configs = [ "//base/telephony/core_service/utils:telephony_log_config" ] 54 55 public_configs = [ ":tel_utils_config" ] 56 57 public_deps = [ "//commonlibrary/c_utils/base:utils" ] 58 59 if (is_double_framework) { 60 cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ] 61 } 62 63 if (is_standard_system) { 64 external_deps = [ "hiviewdfx_hilog_native:libhilog" ] 65 } else { 66 external_deps = [ "hilog:libhilog" ] 67 } 68 69 external_deps += [ 70 "access_token:libaccesstoken_sdk", 71 "access_token:libprivacy_sdk", 72 "bundle_framework:appexecfwk_base", 73 "bundle_framework:appexecfwk_core", 74 "ipc:ipc_single", 75 "preferences:native_preferences", 76 "samgr:samgr_proxy", 77 ] 78 79 part_name = "core_service" 80 subsystem_name = "telephony" 81} 82