• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("//base/hiviewdfx/hilog/hilog.gni")
15import("//build/ohos.gni")
16
17config("libhilog_pub_config") {
18  visibility = [ ":*" ]
19  include_dirs = [ "include" ]
20}
21
22template("libhilog") {
23  forward_variables_from(invoker, "*")
24  ohos_shared_library(target_name) {
25    public_configs = [ ":libhilog_pub_config" ]
26
27    deps = [
28      "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_source_$platform",
29    ]
30
31    if (platform == "ohos") {
32      output_extension = "so"
33    }
34
35    install_enable = !hilog_native_feature_ohcore
36    install_images = [
37      "system",
38      "updater",
39    ]
40    part_name = "hilog_native"
41    subsystem_name = "hiviewdfx"
42  }
43}
44
45foreach(item, platforms) {
46  if (item == "ohos") {
47    libhilog("libhilog") {
48      platform = item
49    }
50  }
51  if (item == "windows" || item == "mac" || item == "linux") {
52    libhilog("libhilog_" + item) {
53      platform = item
54    }
55  }
56}
57
58config("libhilog_base_pub_cfg") {
59  visibility = [ "*:*" ]
60  include_dirs = [ "include" ]
61}
62
63ohos_static_library("libhilog_base") {
64  public_configs = [ ":libhilog_base_pub_cfg" ]
65
66  deps = [ "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_base_source" ]
67
68  subsystem_name = "hiviewdfx"
69  part_name = "hilog_native"
70}
71