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("//arkcompiler/ets_frontend/es2panda/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  ]
60  include_dirs += additional_include_dirs
61
62  deps = [
63    ":gen_obj_src_multimedia_movingphotoview_abc",
64    ":gen_obj_src_multimedia_movingphotoview_js",
65    "$ace_root/build:libace_compatible",
66    "$ace_root/interfaces/inner_api/ace:ace_uicontent",
67    "$ace_root/interfaces/napi/kits/plugincomponent:plugincomponent",
68  ]
69
70  external_deps = [
71    "bounds_checking_function:libsec_static",
72    "data_share:datashare_consumer",
73    "hilog:libhilog",
74    "image_framework:image",
75    "image_framework:image_native",
76    "media_library:media_library_manager",
77    "napi:ace_container_scope",
78    "napi:ace_napi",
79  ]
80
81  ldflags = [ "-Wl,--gc-sections" ]
82
83  cflags = [
84    "-fvisibility=hidden",
85    "-fdata-sections",
86    "-ffunction-sections",
87    "-Os",
88  ]
89
90  cflags_cc = [
91    "-fvisibility-inlines-hidden",
92    "-Os",
93  ]
94
95  relative_install_dir = "module/multimedia"
96  subsystem_name = ace_engine_subsystem
97  part_name = ace_engine_part
98}
99