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/ace_engine/ace_config.gni") 17import("//foundation/arkui/ace_engine/build/ace_gen_obj.gni") 18 19component_ext_path = "${ace_root}/component_ext" 20 21additional_include_dirs = [ "${ace_root}" ] 22 23es2abc_gen_abc("gen_arkui_arcswiper_abc") { 24 src_js = rebase_path("arkui_arcswiper.js") 25 dst_file = rebase_path(target_out_dir + "/arkui_arcswiper.abc") 26 in_puts = [ "arkui_arcswiper.js" ] 27 out_puts = [ target_out_dir + "/arkui_arcswiper.abc" ] 28 extra_args = [ "--module" ] 29} 30 31gen_obj("arkui_arcswiper_abc") { 32 input = get_label_info(":gen_arkui_arcswiper_abc", "target_out_dir") + 33 "/arkui_arcswiper.abc" 34 output = target_out_dir + "arkui_arcswiper_abc.o" 35 if (use_mac || use_mingw_win || use_linux || target_os == "ios") { 36 output = target_out_dir + "arkui_arcswiper_abc.c" 37 } 38 snapshot_dep = [ ":gen_arkui_arcswiper_abc" ] 39} 40 41ohos_shared_library("arcswiper") { 42 defines = [ 43 "USE_ARK_ENGINE", 44 "NOGDI", 45 ] 46 sources = [ 47 "${component_ext_path}/arc_swiper/arc_swiper_napi.cpp", 48 "${component_ext_path}/ext_common/ext_napi_utils.cpp", 49 ] 50 51 include_dirs = [ 52 "${component_ext_path}/ext_common/", 53 "${component_ext_path}/arc_swiper/", 54 "${ace_root}/frameworks", 55 "$root_out_dir/arkui/framework", 56 ] 57 include_dirs += additional_include_dirs 58 59 deps = [ 60 ":gen_obj_src_arkui_arcswiper_abc", 61 "$ace_root/build:libace_compatible", 62 "$ace_root/frameworks/core:ace_container_scope", 63 "$ace_root/interfaces/inner_api/ace:ace_uicontent", 64 ] 65 66 external_deps = [ 67 "bounds_checking_function:libsec_static", 68 "ets_runtime:libark_jsruntime", 69 "hilog:libhilog", 70 "napi:ace_napi", 71 ] 72 73 if (!use_mac) { 74 ldflags = [ "-Wl,--gc-sections" ] 75 } 76 77 cflags = [ 78 "-fvisibility=hidden", 79 "-fdata-sections", 80 "-ffunction-sections", 81 "-Os", 82 ] 83 84 cflags_cc = [ 85 "-fvisibility-inlines-hidden", 86 "-Os", 87 ] 88 89 defines += [ "_USE_MATH_DEFINES" ] 90 91 relative_install_dir = "module/arkui" 92 subsystem_name = ace_engine_subsystem 93 part_name = ace_engine_part 94} 95