1# Copyright (c) 2023 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/hiview/hiview.gni")
15import("//build/ohos.gni")
16
17config("ucolletciton_utility_config") {
18  visibility = [ "*:*" ]
19  include_dirs = [
20    "$hiview_interfaces/inner_api/unified_collection",
21    "$hiview_interfaces/inner_api/unified_collection/utility",
22    "$hiview_interfaces/inner_api/unified_collection/resource",
23  ]
24}
25
26ohos_shared_library("libucollection_utility") {
27  public_configs = [ ":ucolletciton_utility_config" ]
28  sources = []
29
30  deps = [ "$hiview_framework/native/unified_collection:ucollection_source" ]
31
32  external_deps = [ "hilog:libhilog" ]
33
34  version_script = "libucollectionutility.map"
35
36  if (has_hiprofiler) {
37    external_deps += [ "hiprofiler:libnative_daemon_client" ]
38  }
39
40  innerapi_tags = [ "platformsdk" ]
41  part_name = "hiview"
42  subsystem_name = "hiviewdfx"
43}
44
45config("ucolletciton_graphic_config") {
46  visibility = [ "*:*" ]
47  include_dirs = [
48    "$hiview_base/utility/include",
49    "$hiview_framework/native/unified_collection/collector/inner_include",
50    "$hiview_framework/native/unified_collection/decorator/include",
51    "$hiview_framework/native/unified_collection/graphic_memory/include",
52    "$hiview_interfaces/inner_api/unified_collection",
53    "$hiview_interfaces/inner_api/unified_collection/resource",
54    "$hiview_interfaces/inner_api/unified_collection/utility",
55  ]
56}
57
58ohos_shared_library("libucollection_graphic") {
59  branch_protector_ret = "pac_ret"
60  sanitize = {
61    cfi = true
62    cfi_cross_dso = true
63    cfi_vcall_icall_only = true
64    debug = false
65  }
66  public_configs = [ ":ucolletciton_graphic_config" ]
67
68  sources = [
69    "$hiview_base/utility/time_util.cpp",
70    "$hiview_framework/native/unified_collection/collector/graphic_memory_collector_impl.cpp",
71    "$hiview_framework/native/unified_collection/decorator/decorator.cpp",
72    "$hiview_framework/native/unified_collection/decorator/graphic_memory_decorator.cpp",
73  ]
74
75  deps = [ "$hiview_framework/native/unified_collection/graphic_memory:libgraphic_memory" ]
76
77  external_deps = [ "hilog:libhilog" ]
78
79  version_script = "libucollectiongraphic.map"
80
81  innerapi_tags = [ "platformsdk" ]
82  part_name = "hiview"
83  subsystem_name = "hiviewdfx"
84}
85