1# Copyright (c) 2024 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("./../../sensor.gni") 16 17ohos_shared_library("cj_sensor_ffi") { 18 branch_protector_ret = "pac_ret" 19 sanitize = { 20 cfi = true 21 cfi_cross_dso = true 22 debug = false 23 } 24 25 cflags = [ 26 "-fdata-sections", 27 "-ffunction-sections", 28 "-fvisibility=hidden", 29 ] 30 31 include_dirs = [ 32 "$SUBSYSTEM_DIR/frameworks/native/include", 33 "$SUBSYSTEM_DIR/interfaces/inner_api", 34 "$SUBSYSTEM_DIR/utils/common/include", 35 "include", 36 ] 37 38 sources = [ 39 "src/cj_sensor_ffi.cpp", 40 "src/cj_sensor_impl.cpp", 41 ] 42 43 deps = [ "$SUBSYSTEM_DIR/frameworks/native:sensor_interface_native" ] 44 45 external_deps = [ 46 "hilog:libhilog", 47 "napi:cj_bind_native", 48 ] 49 50 innerapi_tags = [ "platformsdk" ] 51 part_name = "sensor" 52 subsystem_name = "sensors" 53} 54