• 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_arkui_arclist_abc") {
24  src_js = rebase_path("arkui_arclist.js")
25  dst_file = rebase_path(target_out_dir + "/arkui_arclist.abc")
26  in_puts = [ "arkui_arclist.js" ]
27  out_puts = [ target_out_dir + "/arkui_arclist.abc" ]
28  extra_args = [ "--module" ]
29}
30
31gen_obj("arkui_arclist_abc") {
32  input = get_label_info(":gen_arkui_arclist_abc", "target_out_dir") +
33          "/arkui_arclist.abc"
34  output = target_out_dir + "/arkui_arclist_abc.o"
35  if (use_mac || use_mingw_win || use_linux || target_os == "ios") {
36    output = target_out_dir + "arkui_arclist_abc.c"
37  }
38  snapshot_dep = [ ":gen_arkui_arclist_abc" ]
39}
40
41ohos_shared_library("arclist") {
42  defines = [ "USE_ARK_ENGINE" ]
43  sources = [
44    "${component_ext_path}/arc_list/arc_list_napi.cpp",
45    "${component_ext_path}/ext_common/ext_napi_utils.cpp",
46  ]
47
48  include_dirs = [
49    "${component_ext_path}/ext_common/",
50    "${component_ext_path}/arc_list/",
51    "${ace_root}/frameworks",
52    "$root_out_dir/arkui/framework",
53    "${ace_root}/interfaces/inner_api/ace_kit/include",
54  ]
55  include_dirs += additional_include_dirs
56
57  deps = [
58    ":gen_obj_src_arkui_arclist_abc",
59    "$ace_root/build:libace_compatible",
60  ]
61
62  external_deps = [
63    "bounds_checking_function:libsec_static",
64    "ets_runtime:libark_jsruntime",
65    "hilog:libhilog",
66    "napi:ace_napi",
67  ]
68
69  if (!use_mac) {
70    ldflags = [ "-Wl,--gc-sections" ]
71  }
72
73  cflags = [
74    "-fvisibility=hidden",
75    "-fdata-sections",
76    "-ffunction-sections",
77    "-Os",
78  ]
79
80  if (ace_engine_feature_enable_digital_crown) {
81    cflags += [ "-DSUPPORT_DIGITAL_CROWN" ]
82  }
83
84  cflags_cc = [
85    "-fvisibility-inlines-hidden",
86    "-Os",
87  ]
88
89  if (use_mingw_win || use_linux) {
90    cflags_cc += [ "-std=c++17" ]
91    defines += [ "_USE_MATH_DEFINES" ]
92  }
93
94  relative_install_dir = "module/arkui"
95  subsystem_name = ace_engine_subsystem
96  part_name = ace_engine_part
97}
98