• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_executable("hitrace_example") {
18  sources = [ "hitrace_example.cpp" ]
19  deps = [ "$hitrace_interfaces_path/native/innerkits:hitrace_meter" ]
20
21  if (defined(ohos_lite)) {
22    external_deps = [ "hilog_lite:hilog_lite" ]
23  } else {
24    external_deps = [ "hilog:libhilog" ]
25  }
26  install_enable = false
27  subsystem_name = "hiviewdfx"
28  part_name = "hitrace"
29}
30
31ohos_rust_executable("hitrace_example_rust") {
32  sources = [ "rust/main.rs" ]
33
34  deps = [
35    "$hitrace_interfaces_path/rust/innerkits/hitrace_meter:hitrace_meter_rust",
36  ]
37  install_enable = false
38  subsystem_name = "hiviewdfx"
39  part_name = "hitrace"
40}
41
42group("hitrace_example_target") {
43  if (device_company != "qemu" && hitrace_support_executable_file &&
44      hiview_enable) {
45    deps = [
46      ":hitrace_example",
47      ":hitrace_example_rust",
48    ]
49  }
50}
51