1# Copyright (c) 2021-2024 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
16ohos_shared_library("hiappevent") {
17  include_dirs = [ "include/" ]
18
19  sources = [
20    "./src/napi_hiappevent_builder.cpp",
21    "./src/napi_hiappevent_config.cpp",
22    "./src/napi_hiappevent_init.cpp",
23    "./src/napi_hiappevent_js.cpp",
24    "./src/napi_hiappevent_write.cpp",
25    "./src/napi_util.cpp",
26  ]
27
28  deps = [ "../../native/libhiappevent:libhiappevent_base" ]
29
30  external_deps = [
31    "hilog:libhilog",
32    "napi:ace_napi",
33  ]
34
35  relative_install_dir = "module"
36
37  part_name = "hiappevent"
38  subsystem_name = "hiviewdfx"
39}
40
41ohos_shared_library("hiappevent_v9") {
42  include_dirs = [ "include/" ]
43
44  sources = [
45    "./src/napi_app_event_holder.cpp",
46    "./src/napi_app_event_watcher.cpp",
47    "./src/napi_hiappevent_builder.cpp",
48    "./src/napi_hiappevent_config.cpp",
49    "./src/napi_hiappevent_init.cpp",
50    "./src/napi_hiappevent_js_v9.cpp",
51    "./src/napi_hiappevent_processor.cpp",
52    "./src/napi_hiappevent_userinfo.cpp",
53    "./src/napi_hiappevent_watch.cpp",
54    "./src/napi_hiappevent_write.cpp",
55    "./src/napi_param_builder.cpp",
56    "./src/napi_util.cpp",
57  ]
58
59  deps = [
60    "../../native/libhiappevent:libhiappevent_base",
61    "../../native/libhiappevent/utility:hiappevent_utility",
62  ]
63
64  external_deps = [
65    "ffrt:libffrt",
66    "hilog:libhilog",
67    "jsoncpp:jsoncpp",
68    "napi:ace_napi",
69    "relational_store:native_rdb",
70  ]
71
72  output_name = "hiappevent_napi"
73  relative_install_dir = "module/hiviewdfx"
74
75  part_name = "hiappevent"
76  subsystem_name = "hiviewdfx"
77}
78