# Copyright (c) 2021-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/faultloggerd/faultloggerd.gni") dumpcatcherdemo_sources = [ "dump_catcher_demo.cpp" ] if (defined(ohos_lite)) { executable("dumpcatcherdemo") { sources = dumpcatcherdemo_sources visibility = [ "*:*" ] defines = [ "is_ohos_lite" ] include_dirs = [ ".", "$c_utils_include_path", "$faultloggerd_common_path/dfxlog", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", "$faultloggerd_interfaces_path/innerkits/backtrace/include/", "$faultloggerd_interfaces_path/innerkits/dump_catcher/include/", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client/include", "$hilog_lite_include_path", ] deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", "$faultloggerd_common_path/dfxutil:dfx_util", "$faultloggerd_interfaces_path/innerkits/dump_catcher:libdfx_dumpcatcher", "$faultloggerd_interfaces_path/innerkits/faultloggerd_client:libfaultloggerd", "$hilog_lite_deps_path", ] } } else { config("dumpcatcherdemo_config") { visibility = [ ":*" ] include_dirs = [ ".", "$faultloggerd_common_path/dfxutil", "$faultloggerd_interfaces_path/common", ] } ohos_executable("dumpcatcherdemo") { sources = dumpcatcherdemo_sources configs = [ ":dumpcatcherdemo_config" ] deps = [ "$faultloggerd_common_path/dfxlog:dfx_hilog", "$faultloggerd_interfaces_path/innerkits/dump_catcher:libdfx_dumpcatcher", "$faultloggerd_interfaces_path/innerkits/formatter:libjson_stack_formatter", ] external_deps = [ "c_utils:utils", "hilog:libhilog", "jsoncpp:jsoncpp", ] part_name = "faultloggerd" subsystem_name = "hiviewdfx" } }