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 }, 481 { 482 prefix = "atomicservice" 483 shard_libs = [ 484 { 485 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicservicenavigation/interfaces:atomicservicenavigation" 486 subsystem_name = "arkui" 487 part_name = "ace_engine" 488 lib_names = [ "atomicservicenavigation" ] 489 }, 490 { 491 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicservicetabs/interfaces:atomicservicetabs" 492 subsystem_name = "arkui" 493 part_name = "ace_engine" 494 lib_names = [ "atomicservicetabs" ] 495 }, 496 { 497 label = "//foundation/arkui/ace_engine/advanced_ui_component/atomicserviceweb/interfaces:atomicserviceweb" 498 subsystem_name = "arkui" 499 part_name = "ace_engine" 500 lib_names = [ "atomicserviceweb" ] 501 }, 502 { 503 label = "//foundation/arkui/ace_engine/advanced_ui_component/interstitialdialogaction/interfaces:interstitialdialogaction" 504 subsystem_name = "arkui" 505 part_name = "ace_engine" 506 lib_names = [ "interstitialdialogaction" ] 507 }, 508 ] 509 }, 510] 511 512if (defined(use_rosen_drawing) && use_rosen_drawing) { 513 napi_modules += [ 514 { 515 prefix = "graphics" 516 shard_libs = [ 517 { 518 label = "//foundation/graphic/graphic_2d/interfaces/kits/napi/graphic/drawing:drawing_napi" 519 subsystem_name = "graphic" 520 part_name = "graphic_2d" 521 lib_names = [ "drawing_napi" ] 522 }, 523 ] 524 }, 525 ] 526} 527 528if (use_mac || use_mingw_win) { 529 common_bin += [ 530 { 531 label = "//foundation/distributeddatamgr/preferences/interfaces/inner_api:native_preferences" 532 subsystem_name = "distributeddatamgr" 533 part_name = "preferences" 534 }, 535 { 536 label = "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb" 537 subsystem_name = "distributeddatamgr" 538 part_name = "relational_store" 539 }, 540 { 541 label = "//third_party/sqlite:sqlite_sdk" 542 subsystem_name = "thirdparty" 543 part_name = "sqlite" 544 }, 545 { 546 label = "//third_party/openssl:libcrypto_restool" 547 subsystem_name = "thirdparty" 548 part_name = "openssl" 549 }, 550 { 551 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock" 552 subsystem_name = "distributeddatamgr" 553 part_name = "kv_store" 554 }, 555 { 556 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/distributeddb:distributeddb_mock" 557 subsystem_name = "distributeddatamgr" 558 part_name = "kv_store" 559 }, 560 { 561 label = "//third_party/zlib:shared_libz" 562 subsystem_name = "thirdparty" 563 part_name = "zlib" 564 lib_names = [ "shared_libz" ] 565 }, 566 { 567 label = "//foundation/filemanagement/file_api/utils/filemgmt_libhilog:filemgmt_libhilog" 568 subsystem_name = "filemanagement" 569 part_name = "file_api" 570 lib_names = [ "filemgmt_libhilog" ] 571 }, 572 { 573 label = "//foundation/filemanagement/file_api/utils/filemgmt_libn:filemgmt_libn" 574 subsystem_name = "filemanagement" 575 part_name = "file_api" 576 lib_names = [ "filemgmt_libn" ] 577 }, 578 ] 579 580 napi_modules += [ 581 { 582 prefix = "data" 583 shard_libs = [ 584 { 585 label = "//foundation/distributeddatamgr/preferences/frameworks/js/napi/preferences:preferences" 586 subsystem_name = "distributeddatamgr" 587 part_name = "preferences" 588 }, 589 { 590 label = "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb" 591 subsystem_name = "distributeddatamgr" 592 part_name = "relational_store" 593 }, 594 { 595 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:distributeddata" 596 subsystem_name = "distributeddatamgr" 597 part_name = "kv_store" 598 }, 599 { 600 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributedkvstore:distributedkvstore" 601 subsystem_name = "distributeddatamgr" 602 part_name = "kv_store" 603 }, 604 ] 605 }, 606 { 607 prefix = "net" 608 shard_libs = [ 609 { 610 label = 611 "//foundation/communication/netstack/frameworks/js/napi/http:http" 612 subsystem_name = "communication" 613 part_name = "netstack" 614 }, 615 ] 616 }, 617 { 618 prefix = "file" 619 shard_libs = [ 620 { 621 label = "//foundation/filemanagement/file_api/interfaces/kits/js:fs" 622 subsystem_name = "filemanagement" 623 part_name = "file_api" 624 }, 625 ] 626 }, 627 ] 628} 629