1# Copyright (c) 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. 13 14import("//base/hiviewdfx/hitrace/hitrace.gni") 15import("//build/ohos.gni") 16 17ohos_source_set("hitrace_common_utils") { 18 include_dirs = [ 19 ".", 20 "$hitrace_common_path", 21 ] 22 sources = [ "common_utils.cpp" ] 23 if (defined(ohos_lite)) { 24 external_deps = [ "hilog_lite:hilog_lite" ] 25 } else { 26 external_deps = [ "hilog:libhilog" ] 27 } 28 external_deps += [ 29 "bounds_checking_function:libsec_shared", 30 "init:libbegetutil", 31 ] 32 part_name = "hitrace" 33 subsystem_name = "hiviewdfx" 34} 35 36ohos_source_set("hitrace_file_utils") { 37 include_dirs = [ 38 ".", 39 "$hitrace_common_path", 40 ] 41 sources = [ "trace_file_utils.cpp" ] 42 if (defined(ohos_lite)) { 43 external_deps = [ "hilog_lite:hilog_lite" ] 44 } else { 45 external_deps = [ "hilog:libhilog" ] 46 } 47 external_deps += [ "bounds_checking_function:libsec_shared" ] 48 part_name = "hitrace" 49 subsystem_name = "hiviewdfx" 50} 51 52ohos_source_set("hitrace_json_parser") { 53 include_dirs = [ 54 ".", 55 "$hitrace_common_path", 56 ] 57 sources = [ "trace_json_parser.cpp" ] 58 if (defined(ohos_lite)) { 59 external_deps = [ "hilog_lite:hilog_lite" ] 60 } else { 61 external_deps = [ "hilog:libhilog" ] 62 } 63 external_deps += [ "cJSON:cjson" ] 64 part_name = "hitrace" 65 subsystem_name = "hiviewdfx" 66} 67