# Copyright (c) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
import("./../../sensor.gni")
ohos_shared_library("libsensor_utils") {
sources = [
"src/active_info.cpp",
"src/motion_plugin.cpp",
"src/permission_util.cpp",
"src/print_sensor_data.cpp",
"src/report_data_callback.cpp",
"src/security_privacy_manager_plugin.cpp",
"src/sensor.cpp",
"src/sensor_basic_data_channel.cpp",
"src/sensor_basic_info.cpp",
"src/sensor_channel_info.cpp",
"src/sensor_xcollie.cpp",
]
cflags = [
"-ffunction-sections",
"-fdata-sections",
"-Oz",
]
cflags_cc = [
"-ffunction-sections",
"-fdata-sections",
"-Oz",
]
branch_protector_ret = "pac_ret"
sanitize = {
cfi = true
cfi_cross_dso = true
debug = false
}
include_dirs = [
"$SUBSYSTEM_DIR/interfaces/inner_api",
"$SUBSYSTEM_DIR/frameworks/native/include",
"$SUBSYSTEM_DIR/utils/common/include",
]
external_deps = [
"access_token:libaccesstoken_sdk",
"access_token:libprivacy_sdk",
"c_utils:utils",
"hicollie:libhicollie",
"hilog:libhilog",
"ipc:ipc_single",
]
defines = sensor_default_defines
if (hiviewdfx_hisysevent_enable) {
external_deps += [ "hisysevent:libhisysevent" ]
}
innerapi_tags = [ "platformsdk_indirect" ]
part_name = "sensor"
subsystem_name = "sensors"
}