• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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/config/components/ets_frontend/es2abc_config.gni")
15import("//build/ohos.gni")
16
17config("calendarmanager_public_config") {
18  include_dirs = [
19    "./common",
20    "./native/include",
21    "./napi/include",
22  ]
23  configs = [ "//build/config/compiler:exceptions" ]
24}
25
26jspath = "js/editor.js"
27
28# compile .js to .abc.
29es2abc_gen_abc("gen_editor_abc") {
30  src_js = rebase_path(jspath)
31  dst_file = rebase_path(target_out_dir + "/editor.abc")
32  in_puts = [jspath]
33  out_puts = [target_out_dir + "/editor.abc"]
34  extra_args = ["--module"]
35}
36
37base_output_path = get_label_info(":editor_js", "target_out_dir")
38editor_obj_path = base_output_path + "/editor.o"
39gen_js_obj("editor_js") {
40  input = jspath
41  output = editor_obj_path
42  dep = ":gen_editor_abc"
43}
44
45abc_output_path = get_label_info(":editor_abc", "target_out_dir")
46editor_abc_obj_path = abc_output_path + "/editor_abc.o"
47gen_js_obj("editor_abc") {
48  input = "$target_out_dir/editor.abc"
49  output = editor_abc_obj_path
50  dep = ":gen_editor_abc"
51}
52
53ohos_shared_library("calendarmanager") {
54  sources = [
55    "./napi/src/calendar_enum_napi.cpp",
56    "./napi/src/calendar_manager_napi.cpp",
57    "./napi/src/calendar_napi.cpp",
58    "./napi/src/event_filter_napi.cpp",
59    "./napi/src/module_init.cpp",
60    "./napi/src/module_register.cpp",
61    "./napi/src/napi_env.cpp",
62    "./napi/src/napi_queue.cpp",
63    "./napi/src/napi_util.cpp",
64    "./native/src/calendar_env.cpp",
65    "./native/src/data_share_helper_manager.cpp",
66    "./native/src/event_filter.cpp",
67    "./native/src/native_calendar.cpp",
68    "./native/src/native_calendar_manager.cpp",
69    "./native/src/native_util.cpp",
70  ]
71
72  deps = [
73    ":editor_abc",
74    ":editor_js",
75  ]
76
77  public_configs = [ ":calendarmanager_public_config" ]
78
79  external_deps = [
80    "ability_base:want",
81    "ability_base:zuri",
82    "ability_runtime:ability_context_native",
83    "ability_runtime:ability_manager",
84    "ability_runtime:abilitykit_native",
85    "ability_runtime:data_ability_helper",
86    "ability_runtime:napi_base_context",
87    "access_token:libaccesstoken_sdk",
88    "ace_engine:ace_uicontent",
89    "c_utils:utils",
90    "data_share:datashare_common",
91    "data_share:datashare_consumer",
92    "hilog:libhilog",
93    "ipc:ipc_single",
94    "napi:ace_napi",
95
96  ]
97
98  public_deps = []
99  relative_install_dir = "module"
100  part_name = "calendar_data"
101  subsystem_name = "applications"
102}
103
104ohos_static_library("calendarmanager_static") {
105  branch_protector_ret = "pac_ret"
106  sanitize = {
107    cfi = true
108    cfi_cross_dso = true
109    debug = false
110  }
111  sources = [
112    "./napi/src/napi_env.cpp",
113    "./native/src/calendar_env.cpp",
114    "./native/src/data_share_helper_manager.cpp",
115    "./native/src/event_filter.cpp",
116    "./native/src/native_calendar.cpp",
117    "./native/src/native_calendar_manager.cpp",
118    "./native/src/native_util.cpp",
119  ]
120
121  deps = []
122
123  public_configs = [ ":calendarmanager_public_config" ]
124
125  external_deps = [
126    "ability_base:want",
127    "ability_base:zuri",
128    "ability_runtime:ability_context_native",
129    "ability_runtime:ability_manager",
130    "ability_runtime:abilitykit_native",
131    "ability_runtime:data_ability_helper",
132    "ability_runtime:napi_base_context",
133    "access_token:libaccesstoken_sdk",
134    "c_utils:utils",
135    "data_share:datashare_common",
136    "data_share:datashare_consumer",
137    "hilog:libhilog",
138    "ipc:ipc_single",
139    "napi:ace_napi",
140  ]
141
142  public_deps = []
143  part_name = "calendar_data"
144  subsystem_name = "applications"
145}
146