• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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("//build/ohos.gni")
15import("//build/test.gni")
16
17# NOSORT
18import("../../../camera.gni")
19
20# NOSORT
21module_output_path = "drivers_peripheral_camera/camera"
22
23config("hdf_camera_benchmark_test_config") {
24  visibility = [ ":*" ]
25  cflags_cc = [
26    "-DGST_DISABLE_DEPRECATED",
27    "-DHAVE_CONFIG_H",
28    "-DCOLORSPACE=\"videoconvert\"",
29  ]
30  cflags_cc += [ "-std=c++17" ]
31}
32
33ohos_benchmarktest("hdf_camera_benchmark_test") {
34  module_out_path = module_output_path
35
36  sources = [
37    "$camera_common_path/v1_0/src/hdi_common.cpp",
38    "./src/camera_benchmark_test.cpp",
39  ]
40
41  include_dirs = [
42    "./include/",
43    "$camera_common_path/v1_0/include/",
44    "$camera_path/../../interfaces/include",
45    "$camera_path/include",
46  ]
47
48  deps = []
49
50  if (is_standard_system) {
51    external_deps = [
52      "c_utils:utils",
53      "drivers_interface_camera:libcamera_proxy_1.0",
54      "hdf_core:libhdf_utils",
55      "hilog:libhilog",
56      "ipc:ipc_single",
57    ]
58  } else {
59    external_deps = [ "hilog:libhilog" ]
60  }
61  external_deps += [
62    "benchmark:benchmark",
63    "drivers_interface_camera:libbuffer_producer_sequenceable_1.0",
64    "drivers_interface_camera:metadata",
65    "googletest:gmock_main",
66    "googletest:gtest",
67    "googletest:gtest_main",
68    "graphic_surface:surface",
69    "samgr:samgr_proxy",
70  ]
71  public_configs = [ ":hdf_camera_benchmark_test_config" ]
72}
73