# Copyright (c) 2022-2024 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/hiview/hiview.gni") import("//build/ohos.gni") config("usage_report_config") { visibility = [ "*:*" ] include_dirs = [ "../cache/include", "../event/include", "../include", "factory/include", "include", ] } ohos_executable("usage_report") { branch_protector_ret = "pac_ret" sanitize = { cfi = true cfi_cross_dso = true cfi_vcall_icall_only = true debug = false } configs = [ ":usage_report_config" ] sources = [ "../cache/event_db_helper.cpp", "../cache/json_parser.cpp", "../cache/usage_event_cacher.cpp", "../event/app_usage_event.cpp", "../event/sys_usage_event.cpp", "factory/app_usage_event_factory.cpp", "factory/sys_usage_event_factory.cpp", "main.cpp", "usage_event_report_service.cpp", ] deps = [ "$hiview_base:hiviewbase" ] external_deps = [ "ability_runtime:wantagent_innerkits", "bundle_framework:appexecfwk_base", "bundle_framework:appexecfwk_core", "c_utils:utils", "hilog:libhilog", "hisysevent:libhisysevent", "ipc:ipc_single", "jsoncpp:jsoncpp", "os_account:os_account_innerkits", "relational_store:native_rdb", "time_service:time_client", ] defines = [] if (device_usage_statistics_enable) { external_deps += [ "device_usage_statistics:usagestatsinner" ] defines += [ "DEVICE_USAGE_STATISTICS_ENABLE" ] } part_name = "hiview" subsystem_name = "hiviewdfx" }