# Copyright (c) 2023 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("//base/hiviewdfx/hilog/hilog.gni") import("//base/hiviewdfx/hilog/platformlog.gni") import("//build/ohos.gni") template("libhilog_platform_source") { forward_variables_from(invoker, "*") ohos_source_set(target_name) { defines = [ "DFX_PLATFORM_LOG_TAG=\"Ace\"" ] include_dirs = [ "${PLATFORM_HILOG_PATH}/frameworks/libhilog/param/include", "${PLATFORM_HILOG_PATH}/interfaces/native/innerkits/include", ] if (target_os == "android") { defines += [ "ANDROID_PLATFORM" ] libs = [ "log" ] } else if (target_os == "ios") { include_dirs += [ "//third_party/bounds_checking_function/include" ] defines += [ "IOS_PLATFORM" ] } sources = [ "hilog.cpp", "hilog_printf.cpp", "hilog_utils.cpp", "interface/native/log.cpp", ] subsystem_name = "hiviewdfx" part_name = "hilog" } } foreach(item, platforms) { libhilog_platform_source("libhilog_platform_source_" + item) { } }