• 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("//foundation/multimedia/player_framework/config.gni")
16
17config("audio_haptic_client_public_config") {
18  visibility = [ ":*" ]
19  include_dirs =
20      [ "./../../../interfaces/inner_api/native/audio_haptic/include" ]
21}
22
23ohos_shared_library("audio_haptic") {
24  branch_protector_ret = "pac_ret"
25  sanitize = {
26    integer_overflow = true
27    ubsan = true
28    boundary_sanitize = true
29    cfi = true
30    cfi_cross_dso = true
31    debug = false
32  }
33
34  install_enable = true
35  sources = [
36    "audio_haptic_manager_impl.cpp",
37    "audio_haptic_player_impl.cpp",
38    "audio_haptic_sound_low_latency_impl.cpp",
39    "audio_haptic_sound_normal_impl.cpp",
40    "audio_haptic_vibrator_impl.cpp",
41  ]
42
43  include_dirs = [
44    "./",
45    "./../../../interfaces/inner_api/native/audio_haptic/include",
46    "./../../../interfaces/inner_api/native/soundpool/include",
47    "./../../../services/utils/include",
48  ]
49
50  deps = [
51    "./../../../interfaces/inner_api/native:media_client",
52    "./../soundpool:soundpool_client",
53  ]
54
55  external_deps = [
56    "access_token:libaccesstoken_sdk",
57    "access_token:libtokenid_sdk",
58    "audio_framework:audio_client",
59    "c_utils:utils",
60    "graphic_surface:surface",
61    "hilog:libhilog",
62    "init:libbegetutil",
63    "ipc:ipc_core",
64    "media_foundation:media_monitor_client",
65    "media_foundation:media_monitor_common",
66    "samgr:samgr_proxy",
67  ]
68
69  if (player_framework_support_vibrator) {
70    external_deps += [ "miscdevice:vibrator_interface_native" ]
71  }
72
73  cflags = [
74    "-Wall",
75    "-Werror",
76  ]
77
78  public_configs = [ ":audio_haptic_client_public_config" ]
79
80  defines = []
81  defines += player_framework_defines
82  innerapi_tags = [ "platformsdk" ]
83  subsystem_name = "multimedia"
84  part_name = "player_framework"
85}
86