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 relative_install_dir = "module" 33 34 subsystem_name = "arkui" 35 part_name = "napi" 36} 37 38ohos_shared_library("number") { 39 sources = [ "napi_number.cpp" ] 40 41 deps = [ "../..:ace_napi" ] 42 43 relative_install_dir = "module" 44 45 subsystem_name = "arkui" 46 part_name = "napi" 47} 48