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_multimedia_movingphotoview_abc") { 24 src_js = rebase_path("multimedia_movingphotoview.js") 25 dst_file = rebase_path(target_out_dir + "/multimedia_movingphotoview.abc") 26 in_puts = [ "multimedia_movingphotoview.js" ] 27 out_puts = [ target_out_dir + "/multimedia_movingphotoview.abc" ] 28 extra_args = [ "--module" ] 29} 30 31gen_obj("multimedia_movingphotoview_js") { 32 input = "multimedia_movingphotoview.js" 33 output = target_out_dir + "/multimedia_movingphotoview.o" 34 snapshot_dep = [] 35} 36 37gen_obj("multimedia_movingphotoview_abc") { 38 input = get_label_info(":gen_multimedia_movingphotoview_abc", 39 "target_out_dir") + "/multimedia_movingphotoview.abc" 40 output = target_out_dir + "multimedia_movingphotoview_abc.o" 41 snapshot_dep = [ ":gen_multimedia_movingphotoview_abc" ] 42} 43 44ohos_shared_library("movingphotoview") { 45 defines = [ "USE_ARK_ENGINE" ] 46 sources = [ 47 "$ace_root/frameworks/core/components_ng/base/inspector_filter.cpp", 48 "${component_ext_path}/ext_common/ext_napi_utils.cpp", 49 "${component_ext_path}/movingphoto/movingphoto_layout_algorithm.cpp", 50 "${component_ext_path}/movingphoto/movingphoto_model_ng.cpp", 51 "${component_ext_path}/movingphoto/movingphoto_napi.cpp", 52 "${component_ext_path}/movingphoto/movingphoto_node.cpp", 53 "${component_ext_path}/movingphoto/movingphoto_pattern.cpp", 54 ] 55 56 include_dirs = [ 57 "${component_ext_path}/ext_common/", 58 "${component_ext_path}/movingphoto/", 59 "$ace_root/frameworks/", 60 ] 61 include_dirs += additional_include_dirs 62 63 deps = [ 64 ":gen_obj_src_multimedia_movingphotoview_abc", 65 ":gen_obj_src_multimedia_movingphotoview_js", 66 "$ace_root/build:libace_compatible", 67 "$ace_root/frameworks/core:ace_container_scope", 68 "$ace_root/interfaces/inner_api/ace:ace_uicontent", 69 "$ace_root/interfaces/napi/kits/plugincomponent:plugincomponent", 70 ] 71 72 external_deps = [ 73 "bounds_checking_function:libsec_static", 74 "data_share:datashare_consumer", 75 "hilog:libhilog", 76 "image_framework:image", 77 "image_framework:image_native", 78 "media_library:media_library_manager", 79 "napi:ace_napi", 80 ] 81 82 ldflags = [ "-Wl,--gc-sections" ] 83 84 cflags = [ 85 "-fvisibility=hidden", 86 "-fdata-sections", 87 "-ffunction-sections", 88 "-Os", 89 ] 90 91 cflags_cc = [ 92 "-fvisibility-inlines-hidden", 93 "-Os", 94 ] 95 96 relative_install_dir = "module/multimedia" 97 subsystem_name = ace_engine_subsystem 98 part_name = ace_engine_part 99} 100