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("./../../../miscdevice.gni")
16
17ohos_shared_library("libvibrator_decoder") {
18  sources = [
19    "../interface/vibrator_decoder_creator.cpp",
20    "src/default_vibrator_decoder.cpp",
21    "src/default_vibrator_decoder_factory.cpp",
22  ]
23
24  branch_protector_ret = "pac_ret"
25  sanitize = {
26    cfi = true
27    cfi_cross_dso = true
28    debug = false
29    boundary_sanitize = true
30    integer_overflow = true
31    ubsan = true
32  }
33
34  include_dirs = [
35    "include",
36    "$SUBSYSTEM_DIR/utils/common/include",
37    "$SUBSYSTEM_DIR/utils/haptic_decoder/interface",
38    "$SUBSYSTEM_DIR/utils/haptic_decoder/he_json/include/",
39  ]
40
41  deps = [
42    "$SUBSYSTEM_DIR/utils/common:libmiscdevice_utils",
43    "$SUBSYSTEM_DIR/utils/haptic_decoder/he_json:libhe_vibrator_decoder",
44  ]
45
46  external_deps = [
47    "access_token:libaccesstoken_sdk",
48    "cJSON:cjson",
49    "c_utils:utils",
50    "hilog:libhilog",
51  ]
52
53  innerapi_tags = [ "platformsdk" ]
54  part_name = "miscdevice"
55  subsystem_name = "sensors"
56}
57