• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2022-2023 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("../device_status.gni")
15
16config("devicestatus_private_config") {
17  include_dirs = [ "${device_status_interfaces_path}/innerkits/include" ]
18}
19
20config("devicestatus_srv_public_config") {
21  include_dirs = [
22    "include",
23    "interface",
24    "include/algorithm",
25    "include/datahub",
26  ]
27}
28
29ohos_shared_library("devicestatus_mock") {
30  sources = [
31    "src/devicestatus_data_parse.cpp",
32    "src/devicestatus_msdp_mock.cpp",
33  ]
34
35  configs = [
36    "${device_status_utils_path}:devicestatus_utils_config",
37    ":devicestatus_private_config",
38  ]
39
40  public_configs = [ ":devicestatus_srv_public_config" ]
41
42  deps = [
43    "${device_status_utils_path}:devicestatus_util",
44    "//third_party/cJSON:cjson_static",
45  ]
46
47  external_deps = [ "hilog:libhilog" ]
48
49  defines = []
50  if (device_status_sensor_enable) {
51    external_deps += [ "sensor:sensor_interface_native" ]
52    defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ]
53  }
54
55  subsystem_name = "${device_status_subsystem_name}"
56  part_name = "${device_status_part_name}"
57}
58
59ohos_shared_library("devicestatus_algo") {
60  branch_protector_ret = "pac_ret"
61  sanitize = {
62    integer_overflow = true
63    ubsan = true
64    boundary_sanitize = true
65    cfi = true
66    cfi_cross_dso = true
67    debug = false
68  }
69  sources = [
70    "src/algorithm/algo_absolute_still.cpp",
71    "src/algorithm/algo_base.cpp",
72    "src/algorithm/algo_horizontal.cpp",
73    "src/algorithm/algo_vertical.cpp",
74    "src/datahub/sensor_data_callback.cpp",
75    "src/devicestatus_algorithm_manager.cpp",
76  ]
77
78  configs = [
79    "${device_status_utils_path}:devicestatus_utils_config",
80    ":devicestatus_private_config",
81  ]
82
83  public_configs = [ ":devicestatus_srv_public_config" ]
84
85  deps = [
86    "${device_status_interfaces_path}/innerkits:devicestatus_client",
87    "${device_status_utils_path}:devicestatus_util",
88    "//third_party/cJSON:cjson_static",
89    "//third_party/jsoncpp",
90  ]
91
92  external_deps = [
93    "ability_base:base",
94    "hilog:libhilog",
95    "input:libmmi-client",
96    "ipc:ipc_single",
97    "safwk:system_ability_fwk",
98    "samgr:samgr_proxy",
99  ]
100  defines = []
101  if (device_status_sensor_enable) {
102    external_deps += [ "sensor:sensor_interface_native" ]
103    defines += [ "DEVICE_STATUS_SENSOR_ENABLE" ]
104  }
105
106  subsystem_name = "${device_status_subsystem_name}"
107  part_name = "${device_status_part_name}"
108}
109