1# Copyright (c) 2021 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("vibrator") { 18 include_dirs = [ 19 "$SUBSYSTEM_DIR/interfaces/inner_api/vibrator", 20 "$SUBSYSTEM_DIR/frameworks/js/napi/vibrator/include", 21 "$SUBSYSTEM_DIR/utils/common/include", 22 ] 23 defines = [ 24 "APP_LOG_TAG = \"vibratorJs\"", 25 "LOG_DOMAIN = 0xD002700", 26 ] 27 28 branch_protector_ret = "pac_ret" 29 sanitize = { 30 cfi = true 31 cfi_cross_dso = true 32 debug = false 33 } 34 35 sources = [ 36 "$SUBSYSTEM_DIR/frameworks/js/napi/vibrator/src/vibrator_js.cpp", 37 "$SUBSYSTEM_DIR/frameworks/js/napi/vibrator/src/vibrator_napi_error.cpp", 38 "$SUBSYSTEM_DIR/frameworks/js/napi/vibrator/src/vibrator_napi_utils.cpp", 39 ] 40 41 deps = [ 42 "$SUBSYSTEM_DIR/frameworks/native/vibrator:vibrator_interface_native", 43 "$SUBSYSTEM_DIR/utils/common:libmiscdevice_utils", 44 ] 45 46 external_deps = [ 47 "c_utils:utils", 48 "hilog:libhilog", 49 "napi:ace_napi", 50 ] 51 relative_install_dir = "module" 52 part_name = "miscdevice" 53 subsystem_name = "sensors" 54} 55 56group("vibrator_js_target") { 57 deps = [ ":vibrator" ] 58} 59