# Copyright (C) 2021 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") group("common_target") { deps = [ ":libtel_common" ] } config("telephony_log_config") { include_dirs = [ "log/include" ] } config("tel_napi_config") { include_dirs = [ "../frameworks/js/napi/", "../frameworks/js/network_search/include/", "../interfaces/innerkits/include/", ] } config("tel_utils_config") { include_dirs = [ "common/include", "preferences/include", "log/include", ] } ohos_shared_library("libtel_common") { version_script = "libtel_common.versionscript" sources = [ "../frameworks/js/napi/napi_util.cpp", "common/src/enum_convert.cpp", "common/src/str_convert.cpp", "common/src/telephony_common_utils.cpp", "common/src/telephony_config.cpp", "common/src/telephony_permission.cpp", "preferences/src/tel_profile_util.cpp", ] defines = [ "TELEPHONY_LOG_TAG = \"TelephonyCommon\"", "LOG_DOMAIN = 0xD001F04", ] if (is_standard_system) { defines += [ "STANDARD_SYSTEM_ENABLE" ] } configs = [ "../utils:telephony_log_config" ] public_configs = [ ":tel_napi_config", ":tel_utils_config", ] if (is_double_framework) { cflags_cc = [ "-DCONFIG_DUAL_FRAMEWORK" ] } external_deps = [ "access_token:libaccesstoken_sdk", "access_token:libprivacy_sdk", "access_token:libtokenid_sdk", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "init:libbegetutil", "ipc:ipc_single", "napi:ace_napi", "preferences:native_preferences", "samgr:samgr_proxy", ] innerapi_tags = [ "platformsdk" ] part_name = "core_service" subsystem_name = "telephony" }