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 include_dirs = [ 26 "//third_party/node/src", 27 "//foundation/arkui/napi/interfaces/kits", 28 ] 29 30 sources = [ "napi_calc.cpp" ] 31 32 deps = [ 33 ":calc_js", 34 "//foundation/arkui/napi:ace_napi", 35 ] 36 37 relative_install_dir = "module" 38 39 subsystem_name = "arkui" 40 part_name = "napi" 41} 42 43ohos_shared_library("number") { 44 include_dirs = [ 45 "//third_party/node/src", 46 "//foundation/arkui/napi/interfaces/kits", 47 ] 48 49 sources = [ "napi_number.cpp" ] 50 51 deps = [ "//foundation/arkui/napi:ace_napi" ] 52 53 relative_install_dir = "module" 54 55 subsystem_name = "arkui" 56 part_name = "napi" 57} 58