1# Copyright (c) 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/config/components/ets_frontend/es2abc_config.gni") 15import("//build/ohos.gni") 16import("//foundation/arkui/advanced_ui_component/atomicservice_config.gni") 17 18es2abc_gen_abc("gen_navpushpathhelper_abc") { 19 src_js = rebase_path("navpushpathhelper.js") 20 dst_file = rebase_path(target_out_dir + "/navpushpathhelper.abc") 21 in_puts = [ "navpushpathhelper.js" ] 22 out_puts = [ target_out_dir + "/navpushpathhelper.abc" ] 23 extra_args = [ "--module" ] 24} 25 26gen_js_obj("navpushpathhelper_abc") { 27 input = get_label_info(":gen_navpushpathhelper_abc", "target_out_dir") + 28 "/navpushpathhelper.abc" 29 output = target_out_dir + "/navpushpathhelper_abc.o" 30 dep = ":gen_navpushpathhelper_abc" 31} 32 33gen_obj("navpushpathhelper_abc_preview") { 34 input = get_label_info(":gen_navpushpathhelper_abc", "target_out_dir") + 35 "/navpushpathhelper.abc" 36 output = target_out_dir + "/navpushpathhelper_abc.c" 37 snapshot_dep = [ ":gen_navpushpathhelper_abc" ] 38} 39 40additional_include_dirs = [ "${ace_root}" ] 41 42ohos_shared_library("navpushpathhelper") { 43 sources = [ 44 "src/hsp_silentinstall.cpp", 45 "src/hsp_silentinstall_napi.cpp", 46 "src/navpushpathhelper.cpp", 47 ] 48 49 if (use_mingw_win || use_mac || use_linux) { 50 deps = [ ":gen_obj_src_navpushpathhelper_abc_preview" ] 51 } else { 52 deps = [ ":navpushpathhelper_abc" ] 53 } 54 55 include_dirs = additional_include_dirs 56 include_dirs += [ "${ace_root}/frameworks" ] 57 deps += [ "$ace_root/build:libace_compatible" ] 58 59 external_deps = [ 60 "ability_base:want", 61 "ability_runtime:abilitykit_native", 62 "bundle_framework:appexecfwk_base", 63 "bundle_framework:appexecfwk_core", 64 "c_utils:utils", 65 "hilog:libhilog", 66 "ipc:ipc_core", 67 "napi:ace_napi", 68 "samgr:samgr_proxy", 69 ] 70 71 relative_install_dir = "module/atomicservice" 72 subsystem_name = "arkui" 73 part_name = "advanced_ui_component" 74} 75