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/ohos.gni")
15import("//build/ohos/ace/ace.gni")
16
17base_output_path = get_label_info(":calc", "target_out_dir")
18calc_obj_path = base_output_path + "/calc.o"
19gen_js_obj("calc_js") {
20  input = "calc.js"
21  output = calc_obj_path
22}
23
24ohos_shared_library("calc") {
25  sources = [ "napi_calc.cpp" ]
26
27  deps = [
28    ":calc_js",
29    "../..:ace_napi",
30  ]
31
32  external_deps = [ "node:node_header_notice" ]
33
34  relative_install_dir = "module"
35
36  subsystem_name = "arkui"
37  part_name = "napi"
38}
39
40ohos_shared_library("number") {
41  sources = [ "napi_number.cpp" ]
42
43  deps = [ "../..:ace_napi" ]
44
45  external_deps = [ "node:node_header_notice" ]
46
47  relative_install_dir = "module"
48
49  subsystem_name = "arkui"
50  part_name = "napi"
51}
52