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    "audio_framework:audio_client",
57    "c_utils:utils",
58    "graphic_surface:surface",
59    "hilog:libhilog",
60    "ipc:ipc_core",
61  ]
62
63  if (player_framework_support_vibrator) {
64    external_deps += [ "miscdevice:vibrator_interface_native" ]
65  }
66
67  cflags = [
68    "-Wall",
69    "-Werror",
70  ]
71
72  public_configs = [ ":audio_haptic_client_public_config" ]
73
74  defines = []
75  defines += player_framework_defines
76  innerapi_tags = [ "platformsdk" ]
77  subsystem_name = "multimedia"
78  part_name = "player_framework"
79}
80