# Copyright (c) 2022 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") SUBSYSTEM_DIR = "//base/sensors/miscdevice" ohos_ndk_library("liblight_ndk") { output_name = "light_agent" ndk_description_file = "./liblight.json" min_compact_version = "7" } ohos_ndk_headers("light_ndk_header") { dest_dir = "$ndk_headers_out_dir/sensors" sources = [ "./include/light_agent.h", "./include/light_agent_type.h", ] } config("light_config") { include_dirs = [ "include" ] } ohos_shared_library("light_interface_native") { output_name = "light_agent" sources = [ "src/light_agent.cpp" ] include_dirs = [ "include", "//base/sensors/miscdevice/frameworks/native/miscdevice/include", "//base/sensors/miscdevice/utils/include", "//commonlibrary/c_utils/base/include", "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", ] cflags = [ "-Wno-error=inconsistent-missing-override" ] deps = [ "$SUBSYSTEM_DIR/frameworks/native/miscdevice:liblight_native", "$SUBSYSTEM_DIR/interfaces/native/light:liblight_ndk", "$SUBSYSTEM_DIR/interfaces/native/light:light_ndk_header", ] external_deps = [ "c_utils:utils", "hiviewdfx_hilog_native:libhilog", "ipc:ipc_core", ] public_configs = [ ":light_config" ] part_name = "miscdevice" subsystem_name = "sensors" } group("light_target") { deps = [ ":light_interface_native" ] }