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_util_private_config") {
17  include_dirs = [
18    ".",
19    "include",
20  ]
21}
22
23config("devicestatus_util_public_config") {
24  include_dirs = [
25    ".",
26    "include",
27    "${device_status_interfaces_path}/innerkits/interaction/include",
28  ]
29}
30
31ohos_shared_library("devicestatus_util") {
32  sanitize = {
33    integer_overflow = true
34    ubsan = true
35    boundary_sanitize = true
36    cfi = true
37    cfi_cross_dso = true
38    debug = false
39  }
40
41  branch_protector_ret = "pac_ret"
42
43  version_script = "libdevicestatus_util_map"
44  sources = [
45    "src/animation_curve.cpp",
46    "src/drag_data_packer.cpp",
47    "src/preview_style_packer.cpp",
48    "src/util.cpp",
49    "src/util_napi.cpp",
50    "src/util_napi_error.cpp",
51    "src/utility.cpp",
52  ]
53
54  configs = [ ":devicestatus_util_private_config" ]
55
56  public_configs = [ ":devicestatus_util_public_config" ]
57
58  external_deps = [
59    "cJSON:cjson",
60    "c_utils:utils",
61    "graphic_2d:librender_service_client",
62    "hilog:libhilog",
63    "image_framework:image_native",
64    "init:libbegetutil",
65    "napi:ace_napi",
66  ]
67
68  innerapi_tags = [ "platformsdk" ]
69  subsystem_name = "${device_status_subsystem_name}"
70  part_name = "${device_status_part_name}"
71}
72
73config("devicestatus_utils_config") {
74  include_dirs = [
75    ".",
76    "include",
77  ]
78}
79