• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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  configs = [ "$ace_root/interfaces/inner_api/ace_kit:ace_kit_config" ]
64
65  deps = [
66    ":gen_obj_src_multimedia_movingphotoview_abc",
67    ":gen_obj_src_multimedia_movingphotoview_js",
68    "$ace_root/build:libace_compatible",
69    "$ace_root/frameworks/core:ace_container_scope",
70    "$ace_root/interfaces/inner_api/ace:ace_uicontent",
71    "$ace_root/interfaces/napi/kits/plugincomponent:plugincomponent",
72  ]
73
74  external_deps = [
75    "bounds_checking_function:libsec_static",
76    "data_share:datashare_consumer",
77    "hilog:libhilog",
78    "image_framework:image",
79    "image_framework:image_native",
80    "napi:ace_napi",
81  ]
82
83  if (defined(global_parts_info) &&
84      !defined(global_parts_info.multimedia_media_library)) {
85    external_deps += [ "media_library:media_library_manager" ]
86  }
87
88  ldflags = [ "-Wl,--gc-sections" ]
89
90  cflags = [
91    "-fvisibility=hidden",
92    "-fdata-sections",
93    "-ffunction-sections",
94    "-Os",
95  ]
96
97  cflags_cc = [
98    "-fvisibility-inlines-hidden",
99    "-Os",
100  ]
101
102  relative_install_dir = "module/multimedia"
103  subsystem_name = ace_engine_subsystem
104  part_name = ace_engine_part
105}
106