# Copyright (c) 2021 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. if (defined(ohos_lite)) { import("//build/lite/config/component/lite_component.gni") } else { import("//build/ohos.gni") } if (defined(ohos_lite)) { HDF_FWKS = "//drivers/framework" shared_library("hdi_input") { sources = [ "src/input_controller.c", "src/input_manager.c", "src/input_reporter.c", ] include_dirs = [ "include", "//drivers/peripheral/input/interfaces/include", "//drivers/adapter/uhdf/posix/include", "$HDF_FWKS/include/utils", "$HDF_FWKS/include/osal", "$HDF_FWKS/core/adapter/syscall/include", "$HDF_FWKS/include/core", "$HDF_FWKS/ability/sbuf/include", "$HDF_FWKS/core/shared/include", "$HDF_FWKS/utils/include", "//third_party/bounds_checking_function/include", "//third_party/FreeBSD/sys/dev/evdev", ] deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", "//drivers/adapter/uhdf/manager:hdf_core", "//drivers/adapter/uhdf/posix:hdf_posix_osal", "//third_party/bounds_checking_function:libsec_shared", ] defines = [ "__USER__" ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", ] } lite_component("hdi") { features = [ ":hdi_input" ] } } else { INPUT_ROOT_DIR = "//drivers/peripheral/input" config("input_hdi_public_config") { visibility = [ ":*" ] include_dirs = [ "$INPUT_ROOT_DIR/interfaces/include", "//third_party/FreeBSD/sys/dev/evdev", ] } ohos_shared_library("hdi_input") { sources = [ "src/input_controller.c", "src/input_manager.c", "src/input_reporter.c", ] public_configs = [ ":input_hdi_public_config" ] include_dirs = [ "$INPUT_ROOT_DIR/hal/include" ] deps = [ "//drivers/adapter/uhdf2/osal:libhdf_utils", "//utils/native/base:utils", ] defines = [ "__OHOS__USER__" ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", ] subsystem_name = "hdf" if (is_standard_system) { external_deps = [ "hiviewdfx_hilog_native:libhilog" ] } else { external_deps = [ "hilog:libhilog" ] } install_images = [ "system", "updater", ] part_name = "multimodalinput_base" } }