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. 13import("//base/hiviewdfx/hiview/hiview.gni") 14import("//build/ohos.gni") 15 16config("hiview_core_config") { 17 visibility = [ "*:*" ] 18 include_dirs = [ 19 ".", 20 "$hiview_root/include", 21 "$hiview_base/utility/include", 22 "$hiview_adapter/utility/include", 23 ] 24 cflags_cc = [ "-D__HIVIEW_OHOS__" ] 25} 26 27ohos_source_set("hiview_core") { 28 part_name = "hiview" 29 public_configs = [ ":hiview_core_config" ] 30 31 sources = [ 32 "hiview_platform.cpp", 33 "plugin_bundle.cpp", 34 "plugin_config.cpp", 35 ] 36 37 deps = [ 38 "$hiview_adapter/utility:hiview_adapter_utility", 39 "$hiview_base:hiviewbase", 40 "platform_config:hiviewplatform_config", 41 ] 42 43 external_deps = [ "hisysevent_native:libhisysevent" ] 44} 45 46ohos_prebuilt_etc("hiview.para.dac") { 47 source = "config/hiview.para.dac" 48 relative_install_dir = "param" 49 part_name = "hiview" 50 subsystem_name = "hiviewdfx" 51} 52 53ohos_prebuilt_etc("monitor_config") { 54 source = "config/monitor.cfg" 55 relative_install_dir = "hiview" 56 part_name = "hiview" 57 subsystem_name = "hiviewdfx" 58} 59 60ohos_source_set("sysevent_source") { 61 part_name = "hiview" 62 public_configs = [ ":hiview_core_config" ] 63 64 sources = [ 65 "event_server.cpp", 66 "monitor_config.cpp", 67 "platform_monitor.cpp", 68 "sysevent_source.cpp", 69 ] 70 71 deps = [ 72 ":hiview.para.dac", 73 ":monitor_config", 74 "$hiview_adapter/system_service:system_service", 75 "$hiview_base:hiviewbase", 76 ] 77 78 external_deps = [ "init:libbegetutil" ] 79} 80 81group("unittest") { 82 testonly = true 83 deps = [] 84} 85 86group("moduletest") { 87 testonly = true 88 deps = [] 89} 90