1# Copyright (c) 2022-2024 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("usage_report_config") { 17 visibility = [ "*:*" ] 18 include_dirs = [ 19 "../cache/include", 20 "../event/include", 21 "../include", 22 "factory/include", 23 "include", 24 ] 25} 26 27ohos_executable("usage_report") { 28 branch_protector_ret = "pac_ret" 29 sanitize = { 30 cfi = true 31 cfi_cross_dso = true 32 cfi_vcall_icall_only = true 33 debug = false 34 } 35 configs = [ ":usage_report_config" ] 36 37 sources = [ 38 "../cache/event_db_helper.cpp", 39 "../cache/json_parser.cpp", 40 "../cache/usage_event_cacher.cpp", 41 "../event/app_usage_event.cpp", 42 "../event/sys_usage_event.cpp", 43 "factory/app_usage_event_factory.cpp", 44 "factory/sys_usage_event_factory.cpp", 45 "main.cpp", 46 "usage_event_report_service.cpp", 47 ] 48 49 deps = [ "$hiview_base:hiviewbase" ] 50 51 external_deps = [ 52 "ability_runtime:wantagent_innerkits", 53 "bundle_framework:appexecfwk_base", 54 "bundle_framework:appexecfwk_core", 55 "c_utils:utils", 56 "hilog:libhilog", 57 "hisysevent:libhisysevent", 58 "ipc:ipc_single", 59 "jsoncpp:jsoncpp", 60 "os_account:os_account_innerkits", 61 "relational_store:native_rdb", 62 "time_service:time_client", 63 ] 64 65 defines = [] 66 if (device_usage_statistics_enable) { 67 external_deps += [ "device_usage_statistics:usagestatsinner" ] 68 defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] 69 } 70 71 part_name = "hiview" 72 subsystem_name = "hiviewdfx" 73} 74