• 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/ace_config.gni")
15import("//foundation/arkui/ace_engine/adapter/preview/build/config.gni")
16
17# Avoid conditional judgment branches caused by dynamic library suffixes.
18if (use_mac) {
19  dylib_suffix = ".dylib"
20  label_res =
21      "//base/global/resource_management/frameworks/resmgr:global_resmgr_mac"
22  label_hilog =
23      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac"
24} else if (use_mingw_win) {
25  dylib_suffix = ".dll"
26  label_res =
27      "//base/global/resource_management/frameworks/resmgr:global_resmgr_win"
28  label_hilog =
29      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows"
30} else if (use_linux) {
31  dylib_suffix = ".so"
32  label_res =
33      "//base/global/resource_management/frameworks/resmgr:global_resmgr_linux"
34  label_hilog =
35      "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_linux"
36}
37
38common_bin = [
39  {
40    label = "//third_party/curl:curl_shared"
41    subsystem_name = "thirdparty"
42    part_name = "curl"
43  },
44  {
45    label = "//third_party/nghttp2/lib:libnghttp2_shared"
46    subsystem_name = "thirdparty"
47    part_name = "nghttp2"
48  },
49  {
50    label = "//third_party/bounds_checking_function:libsec_shared"
51    subsystem_name = "thirdparty"
52    part_name = "bounds_checking_function"
53  },
54  {
55    label = "//foundation/arkui/napi:ace_napi"
56    subsystem_name = "arkui"
57    part_name = "napi"
58  },
59  {
60    label = "//third_party/cJSON:cjson"
61    subsystem_name = "thirdparty"
62    part_name = "cJSON"
63  },
64  {
65    label = "//third_party/icu/icu4c:shared_icui18n"
66    subsystem_name = "thirdparty"
67    part_name = "icu"
68    lib_names = [ "hmicui18n" ]
69  },
70  {
71    label = "//third_party/icu/icu4c:shared_icuuc"
72    subsystem_name = "thirdparty"
73    part_name = "icu"
74    lib_names = [ "hmicuuc" ]
75  },
76  {
77    label = "//third_party/libuv:uv"
78    subsystem_name = "thirdparty"
79    part_name = "libuv"
80  },
81  {
82    label = "//foundation/graphic/graphic_2d/rosen/modules/glfw_render_context:libglfw_render_context"
83    subsystem_name = "graphic"
84    part_name = "graphic_2d"
85  },
86  {
87    label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base"
88    subsystem_name = "graphic"
89    part_name = "graphic_2d"
90  },
91  {
92    label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client"
93    subsystem_name = "graphic"
94    part_name = "graphic_2d"
95  },
96  {
97    label = "//third_party/glfw:glfw"
98    subsystem_name = "thirdparty"
99    part_name = "glfw"
100  },
101  {
102    label = "//foundation/graphic/graphic_2d/rosen/modules/texgine:libtexgine"
103    subsystem_name = "graphic"
104    part_name = "graphic_2d"
105  },
106  {
107    label = "//foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing:libtexgine_drawing"
108    subsystem_name = "graphic"
109    part_name = "graphic_2d"
110  },
111  {
112    label = "//third_party/jsoncpp:jsoncpp"
113    subsystem_name = "thirdparty"
114    part_name = "jsoncpp"
115  },
116  {
117    label = "//third_party/skia:skia_canvaskit"
118    subsystem_name = "thirdparty"
119    part_name = "skia"
120  },
121  {
122    label = "//arkcompiler/ets_runtime:libark_jsruntime"
123    subsystem_name = "arkcompiler"
124    part_name = "ets_runtime"
125  },
126  {
127    label = "//arkcompiler/toolchain/tooling:libark_ecma_debugger"
128    subsystem_name = "arkcompiler"
129    part_name = "toolchain"
130  },
131  {
132    label = "//arkcompiler/toolchain/inspector:ark_debugger"
133    subsystem_name = "arkcompiler"
134    part_name = "toolchain"
135  },
136  {
137    label = "//third_party/openssl:libssl_shared"
138    subsystem_name = "thirdparty"
139    part_name = "openssl"
140    lib_names = [ "ssl_openssl" ]
141  },
142  {
143    label = "//third_party/openssl:libcrypto_shared"
144    subsystem_name = "thirdparty"
145    part_name = "openssl"
146    lib_names = [ "crypto_openssl" ]
147  },
148  {
149    label = label_res
150    subsystem_name = "global"
151    part_name = "resource_management"
152  },
153  {
154    label = label_hilog
155    subsystem_name = "hiviewdfx"
156    part_name = "hilog"
157  },
158  {
159    label = "//foundation/arkui/ace_engine/build:libace_compatible"
160    subsystem_name = "arkui"
161    part_name = "ace_engine"
162  },
163  {
164    label = "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_forward_compatibility"
165    subsystem_name = "arkui"
166    part_name = "ace_engine"
167  },
168  {
169    label =
170        "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent"
171    subsystem_name = "arkui"
172    part_name = "ace_engine"
173  },
174  {
175    label = "//foundation/arkui/ace_engine/interfaces/inner_api/drawable_descriptor:drawable_descriptor"
176    subsystem_name = "arkui"
177    part_name = "ace_engine"
178  },
179]
180
181if (enable_graphic_text_gine) {
182  common_bin += [
183    {
184      label = "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics_new"
185      subsystem_name = "graphic"
186      part_name = "graphic_2d"
187    },
188    {
189      label = "//foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text:rosen_text"
190      subsystem_name = "graphic"
191      part_name = "graphic_2d"
192    },
193  ]
194}
195
196if (defined(use_rosen_drawing) && use_rosen_drawing) {
197  common_bin += [
198    {
199      label = "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics"
200      subsystem_name = "graphic"
201      part_name = "graphic_2d"
202    },
203  ]
204
205  common_bin += [
206    {
207      label = "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl"
208      subsystem_name = "graphic"
209      part_name = "graphic_2d"
210    },
211  ]
212
213  common_bin -= [
214    {
215      label = "//foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing:libtexgine_drawing"
216      subsystem_name = "graphic"
217      part_name = "graphic_2d"
218    },
219  ]
220}
221
222napi_modules = [
223  {
224    prefix = "arkui"
225    shard_libs = [
226      {
227        label = "//foundation/arkui/ace_engine/interfaces/napi/kits/drawabledescriptor:drawabledescriptor"
228        subsystem_name = "arkui"
229        part_name = "ace_engine"
230        lib_names = [ "drawabledescriptor" ]
231      },
232    ]
233  },
234  {
235    prefix = "multimedia"
236    shard_libs = [
237      {
238        label = "//foundation/multimedia/av_session/avpicker:avcastpicker"
239        subsystem_name = "multimedia"
240        part_name = "av_session"
241        lib_names = [ "avcastpicker" ]
242      },
243    ]
244  },
245  {
246    prefix = ""
247    shard_libs = [
248      {
249        label = "//base/hiviewdfx/hilog/interfaces/js/kits/napi:libhilognapi"
250        subsystem_name = "hiviewdfx"
251        part_name = "hilog"
252        lib_names = [ "hilog_napi" ]
253      },
254      {
255        label = "//commonlibrary/ets_utils/js_api_module/buffer:buffer_packages"
256        subsystem_name = "commonlibrary"
257        part_name = "ets_utils"
258        lib_names = [ "buffer" ]
259      },
260      {
261        label = "//foundation/arkui/ace_engine/interfaces/napi/kits:napi_group"
262        subsystem_name = "arkui"
263        part_name = "ace_engine"
264        lib_names = [
265          "configuration",
266          "device",
267          "font",
268          "grid",
269          "measure",
270          "mediaquery",
271          "prompt",
272          "promptaction",
273          "router",
274          "animator",
275        ]
276      },
277    ]
278  },
279  {
280    prefix = "util"
281    shard_libs = [
282      {
283        label = "//commonlibrary/ets_utils/js_util_module/container:container_packages"
284        subsystem_name = "commonlibrary"
285        part_name = "ets_utils"
286        lib_names = [
287          "arraylist",
288          "deque",
289          "queue",
290          "vector",
291          "linkedlist",
292          "list",
293          "stack",
294          "struct",
295          "treemap",
296          "treeset",
297          "hashmap",
298          "hashset",
299          "lightweightmap",
300          "lightweightset",
301          "plainarray",
302        ]
303      },
304    ]
305  },
306  {
307    prefix = "arkui/advanced"
308    shard_libs = [
309      {
310        label = "//foundation/arkui/ace_engine/advanced_ui_component/chip/interfaces:chip"
311        subsystem_name = "arkui"
312        part_name = "ace_engine"
313        lib_names = [ "chip" ]
314      },
315      {
316        label = "//foundation/arkui/ace_engine/advanced_ui_component/counter/interfaces:counter"
317        subsystem_name = "arkui"
318        part_name = "ace_engine"
319        lib_names = [ "counter" ]
320      },
321      {
322        label = "//foundation/arkui/ace_engine/advanced_ui_component/segmentbutton/interfaces:segmentbutton"
323        subsystem_name = "arkui"
324        part_name = "ace_engine"
325        lib_names = [ "segmentbutton" ]
326      },
327      {
328        label = "//foundation/arkui/ace_engine/advanced_ui_component/composelistitem/interfaces:composelistitem"
329        subsystem_name = "arkui"
330        part_name = "ace_engine"
331        lib_names = [ "composelistitem" ]
332      },
333      {
334        label = "//foundation/arkui/ace_engine/advanced_ui_component/composetitlebar/interfaces:composetitlebar"
335        subsystem_name = "arkui"
336        part_name = "ace_engine"
337        lib_names = [ "composetitlebar" ]
338      },
339      {
340        label = "//foundation/arkui/ace_engine/advanced_ui_component/dialog/interfaces:dialog"
341        subsystem_name = "arkui"
342        part_name = "ace_engine"
343        lib_names = [ "dialog" ]
344      },
345      {
346        label = "//foundation/arkui/ace_engine/advanced_ui_component/editabletitlebar/interfaces:editabletitlebar"
347        subsystem_name = "arkui"
348        part_name = "ace_engine"
349        lib_names = [ "editabletitlebar" ]
350      },
351      {
352        label = "//foundation/arkui/ace_engine/advanced_ui_component/filter/interfaces:filter"
353        subsystem_name = "arkui"
354        part_name = "ace_engine"
355        lib_names = [ "filter" ]
356      },
357      {
358        label = "//foundation/arkui/ace_engine/advanced_ui_component/progressbutton/interfaces:progressbutton"
359        subsystem_name = "arkui"
360        part_name = "ace_engine"
361        lib_names = [ "progressbutton" ]
362      },
363      {
364        label = "//foundation/arkui/ace_engine/advanced_ui_component/selecttitlebar/interfaces:selecttitlebar"
365        subsystem_name = "arkui"
366        part_name = "ace_engine"
367        lib_names = [ "selecttitlebar" ]
368      },
369      {
370        label = "//foundation/arkui/ace_engine/advanced_ui_component/splitlayout/interfaces:splitlayout"
371        subsystem_name = "arkui"
372        part_name = "ace_engine"
373        lib_names = [ "splitlayout" ]
374      },
375      {
376        label = "//foundation/arkui/ace_engine/advanced_ui_component/subheader/interfaces:subheader"
377        subsystem_name = "arkui"
378        part_name = "ace_engine"
379        lib_names = [ "subheader" ]
380      },
381      {
382        label = "//foundation/arkui/ace_engine/advanced_ui_component/swiperefresher/interfaces:swiperefresher"
383        subsystem_name = "arkui"
384        part_name = "ace_engine"
385        lib_names = [ "swiperefresher" ]
386      },
387      {
388        label = "//foundation/arkui/ace_engine/advanced_ui_component/tabtitlebar/interfaces:tabtitlebar"
389        subsystem_name = "arkui"
390        part_name = "ace_engine"
391        lib_names = [ "tabtitlebar" ]
392      },
393      {
394        label = "//foundation/arkui/ace_engine/advanced_ui_component/toolbar/interfaces:toolbar"
395        subsystem_name = "arkui"
396        part_name = "ace_engine"
397        lib_names = [ "toolbar" ]
398      },
399      {
400        label = "//foundation/arkui/ace_engine/advanced_ui_component/treeview/interfaces:treeview"
401        subsystem_name = "arkui"
402        part_name = "ace_engine"
403        lib_names = [ "treeview" ]
404      },
405      {
406        label = "//foundation/arkui/ace_engine/advanced_ui_component/selectionmenu/interfaces:selectionmenu"
407        subsystem_name = "arkui"
408        part_name = "ace_engine"
409        lib_names = [ "selectionmenu" ]
410      },
411      {
412        label = "//foundation/arkui/ace_engine/advanced_ui_component/popup/interfaces:popup"
413        subsystem_name = "arkui"
414        part_name = "ace_engine"
415        lib_names = [ "popup" ]
416      },
417      {
418        label = "//foundation/arkui/ace_engine/advanced_ui_component/gridobjectsortcomponent/interfaces:gridobjectsortcomponent"
419        subsystem_name = "arkui"
420        part_name = "ace_engine"
421        lib_names = [ "gridobjectsortcomponent" ]
422      },
423      {
424        label = "//foundation/arkui/ace_engine/advanced_ui_component/exceptionprompt/interfaces:exceptionprompt"
425        subsystem_name = "arkui"
426        part_name = "ace_engine"
427        lib_names = [ "exceptionprompt" ]
428      },
429    ]
430  },
431]
432if (use_mac || use_mingw_win) {
433  common_bin += [
434    {
435      label = "//foundation/distributeddatamgr/preferences/interfaces/inner_api:native_preferences"
436      subsystem_name = "distributeddatamgr"
437      part_name = "preferences"
438    },
439    {
440      label = "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb"
441      subsystem_name = "distributeddatamgr"
442      part_name = "relational_store"
443    },
444    {
445      label = "//third_party/sqlite:sqlite_sdk"
446      subsystem_name = "thirdparty"
447      part_name = "sqlite"
448    },
449    {
450      label = "//third_party/openssl:libcrypto_restool"
451      subsystem_name = "thirdparty"
452      part_name = "openssl"
453    },
454    {
455      label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock"
456      subsystem_name = "distributeddatamgr"
457      part_name = "kv_store"
458    },
459    {
460      label = "//foundation/distributeddatamgr/kv_store/kvstoremock/distributeddb:distributeddb_mock"
461      subsystem_name = "distributeddatamgr"
462      part_name = "kv_store"
463    },
464    {
465      label = "//third_party/zlib:shared_libz"
466      subsystem_name = "thirdparty"
467      part_name = "zlib"
468      lib_names = [ "shared_libz" ]
469    },
470    {
471      label = "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog"
472      subsystem_name = "filemanagement"
473      part_name = "file_api"
474      lib_names = [ "filemgmt_libhilog" ]
475    },
476    {
477      label = "//foundation/filemanagement/file_api/utils/filemgmt_libn:filemgmt_libn"
478      subsystem_name = "filemanagement"
479      part_name = "file_api"
480      lib_names = [ "filemgmt_libn" ]
481    },
482  ]
483
484  napi_modules += [
485    {
486      prefix = "data"
487      shard_libs = [
488        {
489          label = "//foundation/distributeddatamgr/preferences/frameworks/js/napi/preferences:preferences"
490          subsystem_name = "distributeddatamgr"
491          part_name = "preferences"
492        },
493        {
494          label = "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb"
495          subsystem_name = "distributeddatamgr"
496          part_name = "relational_store"
497        },
498        {
499          label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:distributeddata"
500          subsystem_name = "distributeddatamgr"
501          part_name = "kv_store"
502        },
503        {
504          label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributedkvstore:distributedkvstore"
505          subsystem_name = "distributeddatamgr"
506          part_name = "kv_store"
507        },
508      ]
509    },
510    {
511      prefix = "net"
512      shard_libs = [
513        {
514          label =
515              "//foundation/communication/netstack/frameworks/js/napi/http:http"
516          subsystem_name = "communication"
517          part_name = "netstack"
518        },
519      ]
520    },
521    {
522      prefix = "file"
523      shard_libs = [
524        {
525          label = "//foundation/filemanagement/file_api/interfaces/kits/js:fs"
526          subsystem_name = "filemanagement"
527          part_name = "file_api"
528        },
529      ]
530    },
531  ]
532}
533