• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022 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")
15
16SUBSYSTEM_DIR = "//base/sensors/miscdevice"
17ohos_ndk_library("liblight_ndk") {
18  output_name = "light_agent"
19  ndk_description_file = "./liblight.json"
20  min_compact_version = "7"
21}
22
23ohos_ndk_headers("light_ndk_header") {
24  dest_dir = "$ndk_headers_out_dir/sensors"
25  sources = [
26    "./include/light_agent.h",
27    "./include/light_agent_type.h",
28  ]
29}
30
31config("light_config") {
32  include_dirs = [ "include" ]
33}
34
35ohos_shared_library("light_interface_native") {
36  output_name = "light_agent"
37  sources = [ "src/light_agent.cpp" ]
38
39  include_dirs = [
40    "include",
41    "//base/sensors/miscdevice/frameworks/native/miscdevice/include",
42    "//base/sensors/miscdevice/utils/include",
43    "//commonlibrary/c_utils/base/include",
44    "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include",
45  ]
46
47  cflags = [ "-Wno-error=inconsistent-missing-override" ]
48
49  deps = [
50    "$SUBSYSTEM_DIR/frameworks/native/miscdevice:liblight_native",
51    "$SUBSYSTEM_DIR/interfaces/native/light:liblight_ndk",
52    "$SUBSYSTEM_DIR/interfaces/native/light:light_ndk_header",
53  ]
54
55  external_deps = [
56    "c_utils:utils",
57    "hiviewdfx_hilog_native:libhilog",
58    "ipc:ipc_core",
59  ]
60
61  public_configs = [ ":light_config" ]
62  part_name = "miscdevice"
63  subsystem_name = "sensors"
64}
65
66group("light_target") {
67  deps = [ ":light_interface_native" ]
68}
69