1# Copyright (c) 2023-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. 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 = "//base/global/i18n/frameworks/intl:intl_util" 78 subsystem_name = "global" 79 part_name = "i18n" 80 lib_names = [ "intl_util" ] 81 }, 82 { 83 label = "//third_party/libuv:uv" 84 subsystem_name = "thirdparty" 85 part_name = "libuv" 86 }, 87 { 88 label = "//foundation/graphic/graphic_2d/rosen/modules/glfw_render_context:libglfw_render_context" 89 subsystem_name = "graphic" 90 part_name = "graphic_2d" 91 }, 92 { 93 label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base" 94 subsystem_name = "graphic" 95 part_name = "graphic_2d" 96 }, 97 { 98 label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client" 99 subsystem_name = "graphic" 100 part_name = "graphic_2d" 101 }, 102 { 103 label = "//third_party/glfw:glfw" 104 subsystem_name = "thirdparty" 105 part_name = "glfw" 106 }, 107 { 108 label = "//foundation/graphic/graphic_2d/rosen/modules/texgine:libtexgine" 109 subsystem_name = "graphic" 110 part_name = "graphic_2d" 111 }, 112 { 113 label = "//foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing:libtexgine_drawing" 114 subsystem_name = "graphic" 115 part_name = "graphic_2d" 116 }, 117 { 118 label = "//foundation/graphic/graphic_2d/rosen/modules/graphics_effect:libgraphics_effect" 119 subsystem_name = "graphic" 120 part_name = "graphic_2d" 121 }, 122 { 123 label = "//third_party/jsoncpp:jsoncpp" 124 subsystem_name = "thirdparty" 125 part_name = "jsoncpp" 126 }, 127 { 128 label = "//third_party/skia:skia_canvaskit" 129 subsystem_name = "thirdparty" 130 part_name = "skia" 131 }, 132 { 133 label = "//arkcompiler/ets_runtime:libark_jsruntime" 134 subsystem_name = "arkcompiler" 135 part_name = "ets_runtime" 136 }, 137 { 138 label = "//arkcompiler/toolchain/tooling:libark_ecma_debugger" 139 subsystem_name = "arkcompiler" 140 part_name = "toolchain" 141 lib_names = [ "ark_tooling" ] 142 }, 143 { 144 label = "//arkcompiler/toolchain/inspector:ark_debugger" 145 subsystem_name = "arkcompiler" 146 part_name = "toolchain" 147 lib_names = [ "ark_inspector" ] 148 }, 149 { 150 label = "//third_party/openssl:libssl_shared" 151 subsystem_name = "thirdparty" 152 part_name = "openssl" 153 lib_names = [ "ssl_openssl" ] 154 }, 155 { 156 label = "//third_party/openssl:libcrypto_shared" 157 subsystem_name = "thirdparty" 158 part_name = "openssl" 159 lib_names = [ "crypto_openssl" ] 160 }, 161 { 162 label = label_res 163 subsystem_name = "global" 164 part_name = "resource_management" 165 }, 166 { 167 label = label_hilog 168 subsystem_name = "hiviewdfx" 169 part_name = "hilog" 170 }, 171 { 172 label = "//foundation/arkui/ace_engine/build:libace_compatible" 173 subsystem_name = "arkui" 174 part_name = "ace_engine" 175 }, 176 { 177 label = "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_forward_compatibility" 178 subsystem_name = "arkui" 179 part_name = "ace_engine" 180 }, 181 { 182 label = 183 "//foundation/arkui/ace_engine/interfaces/inner_api/ace:ace_uicontent" 184 subsystem_name = "arkui" 185 part_name = "ace_engine" 186 }, 187 { 188 label = "//foundation/arkui/ace_engine/interfaces/inner_api/drawable_descriptor:drawable_descriptor" 189 subsystem_name = "arkui" 190 part_name = "ace_engine" 191 }, 192] 193 194if (enable_graphic_text_gine) { 195 common_bin += [ 196 { 197 label = "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics_new" 198 subsystem_name = "graphic" 199 part_name = "graphic_2d" 200 }, 201 { 202 label = "//foundation/graphic/graphic_2d/rosen/modules/2d_engine/rosen_text:rosen_text" 203 subsystem_name = "graphic" 204 part_name = "graphic_2d" 205 }, 206 ] 207} 208 209if (defined(use_rosen_drawing) && use_rosen_drawing) { 210 common_bin += [ 211 { 212 label = "//foundation/graphic/graphic_2d/rosen/modules/2d_graphics:2d_graphics" 213 subsystem_name = "graphic" 214 part_name = "graphic_2d" 215 }, 216 ] 217 218 common_bin += [ 219 { 220 label = "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi_impl" 221 subsystem_name = "graphic" 222 part_name = "graphic_2d" 223 }, 224 ] 225 226 common_bin -= [ 227 { 228 label = "//foundation/graphic/graphic_2d/rosen/modules/texgine/texgine_drawing:libtexgine_drawing" 229 subsystem_name = "graphic" 230 part_name = "graphic_2d" 231 }, 232 ] 233} 234 235napi_modules = [ 236 { 237 prefix = "arkui" 238 shard_libs = [ 239 { 240 label = "//foundation/arkui/ace_engine/interfaces/napi/kits/drawabledescriptor:drawabledescriptor" 241 subsystem_name = "arkui" 242 part_name = "ace_engine" 243 lib_names = [ "drawabledescriptor" ] 244 }, 245 ] 246 }, 247 { 248 prefix = "multimedia" 249 shard_libs = [ 250 { 251 label = "//foundation/multimedia/av_session/avpicker:avcastpicker" 252 subsystem_name = "multimedia" 253 part_name = "av_session" 254 lib_names = [ "avcastpicker" ] 255 }, 256 ] 257 }, 258 { 259 prefix = "" 260 shard_libs = [ 261 { 262 label = "//base/hiviewdfx/hilog/interfaces/js/kits/napi:libhilognapi" 263 subsystem_name = "hiviewdfx" 264 part_name = "hilog" 265 lib_names = [ "hilog_napi" ] 266 }, 267 { 268 label = "//commonlibrary/ets_utils/js_api_module/buffer:buffer_packages" 269 subsystem_name = "commonlibrary" 270 part_name = "ets_utils" 271 lib_names = [ "buffer" ] 272 }, 273 { 274 label = 275 "//foundation/window/window_manager/previewer:previewer_window_napi" 276 subsystem_name = "window" 277 part_name = "window_manager" 278 lib_names = [ "previewer_window_napi" ] 279 }, 280 { 281 label = "//foundation/arkui/ace_engine/interfaces/napi/kits:napi_group" 282 subsystem_name = "arkui" 283 part_name = "ace_engine" 284 lib_names = [ 285 "configuration", 286 "device", 287 "font", 288 "grid", 289 "measure", 290 "mediaquery", 291 "prompt", 292 "promptaction", 293 "router", 294 "animator", 295 ] 296 }, 297 ] 298 }, 299 { 300 prefix = "util" 301 shard_libs = [ 302 { 303 label = "//commonlibrary/ets_utils/js_util_module/container:container_packages" 304 subsystem_name = "commonlibrary" 305 part_name = "ets_utils" 306 lib_names = [ 307 "arraylist", 308 "deque", 309 "queue", 310 "vector", 311 "linkedlist", 312 "list", 313 "stack", 314 "struct", 315 "treemap", 316 "treeset", 317 "hashmap", 318 "hashset", 319 "lightweightmap", 320 "lightweightset", 321 "plainarray", 322 ] 323 }, 324 ] 325 }, 326 { 327 prefix = "arkui/advanced" 328 shard_libs = [ 329 { 330 label = "//foundation/arkui/ace_engine/advanced_ui_component/chip/interfaces:chip" 331 subsystem_name = "arkui" 332 part_name = "ace_engine" 333 lib_names = [ "chip" ] 334 }, 335 { 336 label = "//foundation/arkui/ace_engine/advanced_ui_component/chipgroup/interfaces:chipgroup" 337 subsystem_name = "arkui" 338 part_name = "ace_engine" 339 lib_names = [ "chipgroup" ] 340 }, 341 { 342 label = "//foundation/arkui/ace_engine/advanced_ui_component/counter/interfaces:counter" 343 subsystem_name = "arkui" 344 part_name = "ace_engine" 345 lib_names = [ "counter" ] 346 }, 347 { 348 label = "//foundation/arkui/ace_engine/advanced_ui_component/segmentbutton/interfaces:segmentbutton" 349 subsystem_name = "arkui" 350 part_name = "ace_engine" 351 lib_names = [ "segmentbutton" ] 352 }, 353 { 354 label = "//foundation/arkui/ace_engine/advanced_ui_component/composelistitem/interfaces:composelistitem" 355 subsystem_name = "arkui" 356 part_name = "ace_engine" 357 lib_names = [ "composelistitem" ] 358 }, 359 { 360 label = "//foundation/arkui/ace_engine/advanced_ui_component/composetitlebar/interfaces:composetitlebar" 361 subsystem_name = "arkui" 362 part_name = "ace_engine" 363 lib_names = [ "composetitlebar" ] 364 }, 365 { 366 label = "//foundation/arkui/ace_engine/advanced_ui_component/dialog/interfaces:dialog" 367 subsystem_name = "arkui" 368 part_name = "ace_engine" 369 lib_names = [ "dialog" ] 370 }, 371 { 372 label = "//foundation/arkui/ace_engine/advanced_ui_component/editabletitlebar/interfaces:editabletitlebar" 373 subsystem_name = "arkui" 374 part_name = "ace_engine" 375 lib_names = [ "editabletitlebar" ] 376 }, 377 { 378 label = "//foundation/arkui/ace_engine/advanced_ui_component/filter/interfaces:filter" 379 subsystem_name = "arkui" 380 part_name = "ace_engine" 381 lib_names = [ "filter" ] 382 }, 383 { 384 label = "//foundation/arkui/ace_engine/advanced_ui_component/progressbutton/interfaces:progressbutton" 385 subsystem_name = "arkui" 386 part_name = "ace_engine" 387 lib_names = [ "progressbutton" ] 388 }, 389 { 390 label = "//foundation/arkui/ace_engine/advanced_ui_component/selecttitlebar/interfaces:selecttitlebar" 391 subsystem_name = "arkui" 392 part_name = "ace_engine" 393 lib_names = [ "selecttitlebar" ] 394 }, 395 { 396 label = "//foundation/arkui/ace_engine/advanced_ui_component/splitlayout/interfaces:splitlayout" 397 subsystem_name = "arkui" 398 part_name = "ace_engine" 399 lib_names = [ "splitlayout" ] 400 }, 401 { 402 label = "//foundation/arkui/ace_engine/advanced_ui_component/subheader/interfaces:subheader" 403 subsystem_name = "arkui" 404 part_name = "ace_engine" 405 lib_names = [ "subheader" ] 406 }, 407 { 408 label = "//foundation/arkui/ace_engine/advanced_ui_component/swiperefresher/interfaces:swiperefresher" 409 subsystem_name = "arkui" 410 part_name = "ace_engine" 411 lib_names = [ "swiperefresher" ] 412 }, 413 { 414 label = "//foundation/arkui/ace_engine/advanced_ui_component/tabtitlebar/interfaces:tabtitlebar" 415 subsystem_name = "arkui" 416 part_name = "ace_engine" 417 lib_names = [ "tabtitlebar" ] 418 }, 419 { 420 label = "//foundation/arkui/ace_engine/advanced_ui_component/toolbar/interfaces:toolbar" 421 subsystem_name = "arkui" 422 part_name = "ace_engine" 423 lib_names = [ "toolbar" ] 424 }, 425 { 426 label = "//foundation/arkui/ace_engine/advanced_ui_component/treeview/interfaces:treeview" 427 subsystem_name = "arkui" 428 part_name = "ace_engine" 429 lib_names = [ "treeview" ] 430 }, 431 { 432 label = "//foundation/arkui/ace_engine/advanced_ui_component/selectionmenu/interfaces:selectionmenu" 433 subsystem_name = "arkui" 434 part_name = "ace_engine" 435 lib_names = [ "selectionmenu" ] 436 }, 437 { 438 label = "//foundation/arkui/ace_engine/advanced_ui_component/popup/interfaces:popup" 439 subsystem_name = "arkui" 440 part_name = "ace_engine" 441 lib_names = [ "popup" ] 442 }, 443 { 444 label = "//foundation/arkui/ace_engine/advanced_ui_component/gridobjectsortcomponent/interfaces:gridobjectsortcomponent" 445 subsystem_name = "arkui" 446 part_name = "ace_engine" 447 lib_names = [ "gridobjectsortcomponent" ] 448 }, 449 { 450 label = "//foundation/arkui/ace_engine/advanced_ui_component/exceptionprompt/interfaces:exceptionprompt" 451 subsystem_name = "arkui" 452 part_name = "ace_engine" 453 lib_names = [ "exceptionprompt" ] 454 }, 455 { 456 label = "//foundation/arkui/ace_engine/advanced_ui_component/fullscreenlaunchcomponent/interfaces:fullscreenlaunchcomponent" 457 subsystem_name = "arkui" 458 part_name = "ace_engine" 459 lib_names = [ "fullscreenlaunchcomponent" ] 460 }, 461 { 462 label = "//foundation/arkui/ace_engine/advanced_ui_component/innerfullscreenlaunchcomponent/interfaces:innerfullscreenlaunchcomponent" 463 subsystem_name = "arkui" 464 part_name = "ace_engine" 465 lib_names = [ "innerfullscreenlaunchcomponent" ] 466 }, 467 { 468 label = "//foundation/arkui/ace_engine/advanced_ui_component/formmenu/interfaces:formmenu" 469 subsystem_name = "arkui" 470 part_name = "ace_engine" 471 lib_names = [ "formmenu" ] 472 }, 473 { 474 label = "//foundation/arkui/ace_engine/advanced_ui_component/foldsplitcontainer/interfaces:foldsplitcontainer" 475 subsystem_name = "arkui" 476 part_name = "ace_engine" 477 lib_names = [ "foldsplitcontainer" ] 478 }, 479 { 480 label = "//foundation/arkui/ace_engine/advanced_ui_component/downloadfilebutton/interfaces:downloadfilebutton" 481 subsystem_name = "arkui" 482 part_name = "ace_engine" 483 lib_names = [ "downloadfilebutton" ] 484 }, 485 ] 486 }, 487 { 488 prefix = "atomicservice" 489 shard_libs = [ 490 { 491 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicservicenavigation/interfaces:atomicservicenavigation" 492 subsystem_name = "arkui" 493 part_name = "ace_engine" 494 lib_names = [ "atomicservicenavigation" ] 495 }, 496 { 497 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicservicetabs/interfaces:atomicservicetabs" 498 subsystem_name = "arkui" 499 part_name = "ace_engine" 500 lib_names = [ "atomicservicetabs" ] 501 }, 502 { 503 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicserviceweb/interfaces:atomicserviceweb" 504 subsystem_name = "arkui" 505 part_name = "ace_engine" 506 lib_names = [ "atomicserviceweb" ] 507 }, 508 { 509 label = "//foundation/arkui/ace_engine/advanced_ui_component/interstitialdialogaction/interfaces:interstitialdialogaction" 510 subsystem_name = "arkui" 511 part_name = "ace_engine" 512 lib_names = [ "interstitialdialogaction" ] 513 }, 514 ] 515 }, 516] 517 518if (defined(use_rosen_drawing) && use_rosen_drawing) { 519 napi_modules += [ 520 { 521 prefix = "graphics" 522 shard_libs = [ 523 { 524 label = "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi" 525 subsystem_name = "graphic" 526 part_name = "graphic_2d" 527 lib_names = [ "drawing_napi" ] 528 }, 529 ] 530 }, 531 ] 532} 533 534if (use_mac || use_mingw_win) { 535 common_bin += [ 536 { 537 label = "//foundation/distributeddatamgr/preferences/interfaces/inner_api:native_preferences" 538 subsystem_name = "distributeddatamgr" 539 part_name = "preferences" 540 }, 541 { 542 label = "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb" 543 subsystem_name = "distributeddatamgr" 544 part_name = "relational_store" 545 }, 546 { 547 label = "//third_party/sqlite:sqlite_sdk" 548 subsystem_name = "thirdparty" 549 part_name = "sqlite" 550 }, 551 { 552 label = "//third_party/openssl:libcrypto_restool" 553 subsystem_name = "thirdparty" 554 part_name = "openssl" 555 }, 556 { 557 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock" 558 subsystem_name = "distributeddatamgr" 559 part_name = "kv_store" 560 }, 561 { 562 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/distributeddb:distributeddb_mock" 563 subsystem_name = "distributeddatamgr" 564 part_name = "kv_store" 565 }, 566 { 567 label = "//third_party/zlib:shared_libz" 568 subsystem_name = "thirdparty" 569 part_name = "zlib" 570 lib_names = [ "shared_libz" ] 571 }, 572 { 573 label = "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog" 574 subsystem_name = "filemanagement" 575 part_name = "file_api" 576 lib_names = [ "filemgmt_libhilog" ] 577 }, 578 { 579 label = "//foundation/filemanagement/file_api/utils/filemgmt_libn:filemgmt_libn" 580 subsystem_name = "filemanagement" 581 part_name = "file_api" 582 lib_names = [ "filemgmt_libn" ] 583 }, 584 ] 585 586 napi_modules += [ 587 { 588 prefix = "data" 589 shard_libs = [ 590 { 591 label = "//foundation/distributeddatamgr/preferences/frameworks/js/napi/preferences:preferences" 592 subsystem_name = "distributeddatamgr" 593 part_name = "preferences" 594 }, 595 { 596 label = "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb" 597 subsystem_name = "distributeddatamgr" 598 part_name = "relational_store" 599 }, 600 { 601 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:distributeddata" 602 subsystem_name = "distributeddatamgr" 603 part_name = "kv_store" 604 }, 605 { 606 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributedkvstore:distributedkvstore" 607 subsystem_name = "distributeddatamgr" 608 part_name = "kv_store" 609 }, 610 ] 611 }, 612 { 613 prefix = "net" 614 shard_libs = [ 615 { 616 label = 617 "//foundation/communication/netstack/frameworks/js/napi/http:http" 618 subsystem_name = "communication" 619 part_name = "netstack" 620 }, 621 ] 622 }, 623 { 624 prefix = "file" 625 shard_libs = [ 626 { 627 label = "//foundation/filemanagement/file_api/interfaces/kits/js:fs" 628 subsystem_name = "filemanagement" 629 part_name = "file_api" 630 }, 631 ] 632 }, 633 ] 634} 635