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