• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 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.
13import("//build/ohos_var.gni")
14import("//foundation/arkui/ace_engine/adapter/preview/build/config.gni")
15
16# Avoid conditional judgment branches caused by dynamic library suffixes.
17if (use_mac) {
18  dylib_suffix = ".dylib"
19  label_res =
20      "//base/global/resource_management/frameworks/resmgr:global_resmgr_mac"
21  label_hilog =
22      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac"
23} else if (use_mingw_win) {
24  dylib_suffix = ".dll"
25  label_res =
26      "//base/global/resource_management/frameworks/resmgr:global_resmgr_win"
27  label_hilog =
28      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows"
29} else if (use_linux) {
30  dylib_suffix = ".so"
31  label_res =
32      "//base/global/resource_management/frameworks/resmgr:global_resmgr_linux"
33  label_hilog =
34      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_linux"
35}
36
37common_bin = [
38  {
39    label = "//third_party/curl:curl_shared"
40    subsystem_name = "thirdparty"
41    part_name = "curl"
42  },
43  {
44    label = "//third_party/nghttp2/lib:libnghttp2_shared"
45    subsystem_name = "thirdparty"
46    part_name = "nghttp2"
47  },
48  {
49    label = "//third_party/bounds_checking_function:libsec_shared"
50    subsystem_name = "thirdparty"
51    part_name = "bounds_checking_function"
52  },
53  {
54    label = "//foundation/arkui/napi:ace_napi"
55    subsystem_name = "arkui"
56    part_name = "napi"
57  },
58  {
59    label = "//third_party/cJSON:cjson"
60    subsystem_name = "thirdparty"
61    part_name = "cJSON"
62  },
63  {
64    label = "//third_party/icu/icu4c:shared_icui18n"
65    subsystem_name = "thirdparty"
66    part_name = "icu"
67    lib_names = [ "hmicui18n" ]
68  },
69  {
70    label = "//third_party/icu/icu4c:shared_icuuc"
71    subsystem_name = "thirdparty"
72    part_name = "icu"
73    lib_names = [ "hmicuuc" ]
74  },
75  {
76    label = "//third_party/libuv:uv"
77    subsystem_name = "thirdparty"
78    part_name = "libuv"
79  },
80  {
81    label = "//foundation/graphic/graphic_2d/rosen/modules/glfw_render_context:libglfw_render_context"
82    subsystem_name = "graphic"
83    part_name = "graphic_2d"
84  },
85  {
86    label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base"
87    subsystem_name = "graphic"
88    part_name = "graphic_2d"
89  },
90  {
91    label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client"
92    subsystem_name = "graphic"
93    part_name = "graphic_2d"
94  },
95  {
96    label = "//third_party/flutter/glfw:glfw"
97    subsystem_name = "graphic"
98    part_name = "graphic_2d"
99  },
100  {
101    label = "//third_party/flutter/build/skia:skia_shared"
102    subsystem_name = "thirdparty"
103    part_name = "flutter"
104  },
105  {
106    label = "//foundation/arkui/napi:ace_napi_ark"
107    subsystem_name = "arkui"
108    part_name = "napi"
109  },
110  {
111    label = "//arkcompiler/ets_runtime:libark_jsruntime"
112    subsystem_name = "arkcompiler"
113    part_name = "ets_runtime"
114  },
115  {
116    label = "//arkcompiler/toolchain/tooling:libark_ecma_debugger"
117    subsystem_name = "arkcompiler"
118    part_name = "toolchain"
119  },
120  {
121    label = "//arkcompiler/toolchain/inspector:ark_debugger"
122    subsystem_name = "arkcompiler"
123    part_name = "toolchain"
124  },
125  {
126    label = "//third_party/openssl:libssl_shared"
127    subsystem_name = "thirdparty"
128    part_name = "openssl"
129    lib_names = [ "ssl_openssl" ]
130  },
131  {
132    label = "//third_party/openssl:libcrypto_shared"
133    subsystem_name = "thirdparty"
134    part_name = "openssl"
135    lib_names = [ "crypto_openssl" ]
136  },
137  {
138    label = label_res
139    subsystem_name = "global"
140    part_name = "resource_management"
141  },
142  {
143    label = label_hilog
144    subsystem_name = "hiviewdfx"
145    part_name = "hilog"
146  },
147  {
148    label = "//foundation/arkui/ace_engine/build:libace"
149    subsystem_name = "arkui"
150    part_name = "ace_engine"
151  },
152  {
153    label =
154        "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent"
155    subsystem_name = "arkui"
156    part_name = "ace_engine"
157  },
158  {
159    label = "//foundation/arkui/ace_engine/interfaces/inner_api/drawable_descriptor:drawable_descriptor"
160    subsystem_name = "arkui"
161    part_name = "ace_engine"
162  },
163]
164
165if (defined(use_new_skia) && use_new_skia) {
166  common_bin += [
167    {
168      label = "//third_party/skia:skia_canvaskit"
169      subsystem_name = "thirdparty"
170      part_name = "skia"
171    },
172  ]
173}
174
175napi_modules = [
176  {
177    prefix = "arkui"
178    shard_libs = [
179      {
180        label = "//foundation/arkui/ace_engine/interfaces/napi/kits/drawabledescriptor:drawabledescriptor"
181        subsystem_name = "arkui"
182        part_name = "ace_engine"
183        lib_names = [ "drawabledescriptor" ]
184      },
185    ]
186  },
187  {
188    prefix = "multimedia"
189    shard_libs = [
190      {
191        label = "//foundation/multimedia/av_session/avpicker:avcastpicker"
192        subsystem_name = "multimedia"
193        part_name = "av_session"
194        lib_names = [ "avcastpicker" ]
195      },
196    ]
197  },
198  {
199    prefix = ""
200    shard_libs = [
201      {
202        label = "//base/hiviewdfx/hilog/interfaces/js/kits/napi:libhilognapi"
203        subsystem_name = "hiviewdfx"
204        part_name = "hilog"
205        lib_names = [ "hilog_napi" ]
206      },
207      {
208        label = "//commonlibrary/ets_utils/js_api_module/buffer:buffer_packages"
209        subsystem_name = "commonlibrary"
210        part_name = "ets_utils"
211        lib_names = [ "buffer" ]
212      },
213      {
214        label = "//foundation/arkui/ace_engine/interfaces/napi/kits:napi_group"
215        subsystem_name = "arkui"
216        part_name = "ace_engine"
217        lib_names = [
218          "configuration",
219          "device",
220          "font",
221          "grid",
222          "measure",
223          "mediaquery",
224          "prompt",
225          "promptaction",
226          "router",
227          "animator",
228        ]
229      },
230    ]
231  },
232  {
233    prefix = "util"
234    shard_libs = [
235      {
236        label = "//commonlibrary/ets_utils/js_util_module/container:container_packages"
237        subsystem_name = "commonlibrary"
238        part_name = "ets_utils"
239        lib_names = [
240          "arraylist",
241          "deque",
242          "queue",
243          "vector",
244          "linkedlist",
245          "list",
246          "stack",
247          "struct",
248          "treemap",
249          "treeset",
250          "hashmap",
251          "hashset",
252          "lightweightmap",
253          "lightweightset",
254          "plainarray",
255        ]
256      },
257    ]
258  },
259]
260if (use_mac || use_mingw_win) {
261  common_bin += [
262    {
263      label = "//foundation/distributeddatamgr/preferences/interfaces/inner_api:native_preferences"
264      subsystem_name = "distributeddatamgr"
265      part_name = "preferences"
266    },
267    {
268      label = "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb"
269      subsystem_name = "distributeddatamgr"
270      part_name = "relational_store"
271    },
272    {
273      label = "//third_party/sqlite:sqlite_sdk"
274      subsystem_name = "common"
275      part_name = "common"
276    },
277    {
278      label = "//third_party/openssl:libcrypto_restool"
279      subsystem_name = "thirdparty"
280      part_name = "openssl"
281    },
282    {
283      label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock"
284      subsystem_name = "distributeddatamgr"
285      part_name = "kv_store"
286    },
287    {
288      label = "//foundation/distributeddatamgr/kv_store/kvstoremock/distributeddb:distributeddb_mock"
289      subsystem_name = "distributeddatamgr"
290      part_name = "kv_store"
291    },
292    {
293      label = "//third_party/zlib:shared_libz"
294      subsystem_name = "thirdparty"
295      part_name = "zlib"
296      lib_names = [ "shared_libz" ]
297    },
298    {
299      label = "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog"
300      subsystem_name = "filemanagement"
301      part_name = "file_api"
302      lib_names = [ "filemgmt_libhilog" ]
303    },
304    {
305      label = "//foundation/filemanagement/file_api/utils/filemgmt_libn:filemgmt_libn"
306      subsystem_name = "filemanagement"
307      part_name = "file_api"
308      lib_names = [ "filemgmt_libn" ]
309    },
310  ]
311
312  napi_modules += [
313    {
314      prefix = "data"
315      shard_libs = [
316        {
317          label = "//foundation/distributeddatamgr/preferences/frameworks/js/napi/preferences:preferences"
318          subsystem_name = "distributeddatamgr"
319          part_name = "preferences"
320        },
321        {
322          label = "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb"
323          subsystem_name = "distributeddatamgr"
324          part_name = "relational_store"
325        },
326        {
327          label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:distributeddata"
328          subsystem_name = "distributeddatamgr"
329          part_name = "kv_store"
330        },
331        {
332          label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributedkvstore:distributedkvstore"
333          subsystem_name = "distributeddatamgr"
334          part_name = "kv_store"
335        },
336      ]
337    },
338    {
339      prefix = "net"
340      shard_libs = [
341        {
342          label =
343              "//foundation/communication/netstack/frameworks/js/napi/http:http"
344          subsystem_name = "communication"
345          part_name = "netstack"
346        },
347      ]
348    },
349    {
350      prefix = "file"
351      shard_libs = [
352        {
353          label = "//foundation/filemanagement/file_api/interfaces/kits/js:fs"
354          subsystem_name = "filemanagement"
355          part_name = "file_api"
356        },
357      ]
358    },
359  ]
360}
361