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