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("//foundation/arkui/ace_engine/adapter/preview/build/config.gni") 14 15# Avoid conditional judgment branches caused by dynamic library suffixes. 16if (use_mac) { 17 dylib_suffix = ".dylib" 18 label_res = 19 "//base/global/resource_management/frameworks/resmgr:global_resmgr_mac" 20 label_hilog = 21 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac" 22 label_ace = 23 "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_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 label_ace = "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_windows" 31} else if (use_linux) { 32 dylib_suffix = ".so" 33 label_res = 34 "//base/global/resource_management/frameworks/resmgr:global_resmgr_linux" 35 label_hilog = 36 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_linux" 37 label_ace = 38 "//foundation/arkui/ace_engine/adapter/preview/build:libace_engine_linux" 39} 40 41common_bin = [ 42 { 43 label = "//third_party/curl:curl_shared" 44 subsystem_name = "thirdparty" 45 part_name = "curl" 46 }, 47 { 48 label = "//third_party/nghttp2/lib:libnghttp2_shared" 49 subsystem_name = "thirdparty" 50 part_name = "thirdparty_nghttp2" 51 }, 52 { 53 label = "//third_party/bounds_checking_function:libsec_shared" 54 subsystem_name = "thirdparty" 55 part_name = "bounds_checking_function" 56 }, 57 { 58 label = "//foundation/arkui/napi:ace_napi" 59 subsystem_name = "arkui" 60 part_name = "napi" 61 }, 62 { 63 label = "//third_party/cJSON:cjson" 64 subsystem_name = "thirdparty" 65 part_name = "cjson" 66 }, 67 { 68 label = "//third_party/icu/icu4c:shared_icui18n" 69 subsystem_name = "thirdparty" 70 part_name = "icu" 71 lib_names = [ "hmicui18n" ] 72 }, 73 { 74 label = "//third_party/icu/icu4c:shared_icuuc" 75 subsystem_name = "thirdparty" 76 part_name = "icu" 77 lib_names = [ "hmicuuc" ] 78 }, 79 { 80 label = "//third_party/libuv:uv" 81 subsystem_name = "thirdparty" 82 part_name = "libuv" 83 }, 84 { 85 label = "//foundation/graphic/graphic_2d/rosen/modules/glfw_render_context:libglfw_render_context" 86 subsystem_name = "graphic" 87 part_name = "graphic_standard" 88 }, 89 { 90 label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_base:librender_service_base" 91 subsystem_name = "graphic" 92 part_name = "graphic_standard" 93 }, 94 { 95 label = "//foundation/graphic/graphic_2d/rosen/modules/render_service_client:librender_service_client" 96 subsystem_name = "graphic" 97 part_name = "graphic_standard" 98 }, 99 { 100 label = "//third_party/flutter/glfw:glfw" 101 subsystem_name = "graphic" 102 part_name = "graphic_standard" 103 }, 104 { 105 label = "//third_party/flutter/build/skia:skia_shared" 106 subsystem_name = "thirdparty" 107 part_name = "flutter" 108 }, 109 { 110 label = "//foundation/arkui/napi:ace_napi_ark" 111 subsystem_name = "arkui" 112 part_name = "napi" 113 }, 114 { 115 label = "//arkcompiler/ets_runtime:libark_jsruntime" 116 subsystem_name = "arkcompiler" 117 part_name = "ets_runtime" 118 }, 119 { 120 label = "//third_party/openssl:libssl_shared" 121 subsystem_name = "developtools" 122 part_name = "profiler" 123 lib_names = [ "ssl_openssl" ] 124 }, 125 { 126 label = "//third_party/openssl:libcrypto_shared" 127 subsystem_name = "security" 128 part_name = "huks" 129 lib_names = [ "crypto_openssl" ] 130 }, 131 { 132 label = label_res 133 subsystem_name = "global" 134 part_name = "resource_management" 135 }, 136 { 137 label = label_hilog 138 subsystem_name = "hiviewdfx" 139 part_name = "hilog_native" 140 }, 141 { 142 label = label_ace 143 subsystem_name = "arkui" 144 part_name = "ace_engine" 145 }, 146] 147 148napi_modules = [ 149 { 150 prefix = "" 151 shard_libs = [ 152 { 153 label = "//base/hiviewdfx/hilog/interfaces/js/kits/napi:libhilognapi" 154 subsystem_name = "hiviewdfx" 155 part_name = "hilog_native" 156 lib_names = [ "hilog" ] 157 }, 158 { 159 label = "//foundation/arkui/ace_engine/interfaces/napi/kits:napi_group" 160 subsystem_name = "arkui" 161 part_name = "ace_engine" 162 lib_names = [ 163 "configuration", 164 "device", 165 "grid", 166 "measure", 167 "mediaquery", 168 "prompt", 169 "promptaction", 170 "router", 171 "animator", 172 ] 173 }, 174 ] 175 }, 176] 177if (use_mac || use_mingw_win) { 178 common_bin += [ 179 { 180 label = "//foundation/distributeddatamgr/preferences/interfaces/inner_api:native_preferences" 181 subsystem_name = "distributeddatamgr" 182 part_name = "preferences" 183 }, 184 { 185 label = "//foundation/distributeddatamgr/relational_store/interfaces/inner_api/rdb:native_rdb" 186 subsystem_name = "distributeddatamgr" 187 part_name = "relational_store" 188 }, 189 { 190 label = "//third_party/sqlite:sqlite_sdk" 191 subsystem_name = "common" 192 part_name = "common" 193 }, 194 { 195 label = "//third_party/openssl:libcrypto_restool" 196 subsystem_name = "security" 197 part_name = "huks" 198 }, 199 { 200 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/innerkits/distributeddata:distributeddata_inner_mock" 201 subsystem_name = "distributeddatamgr" 202 part_name = "kv_store" 203 }, 204 { 205 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/distributeddb:distributeddb_mock" 206 subsystem_name = "distributeddatamgr" 207 part_name = "kv_store" 208 }, 209 { 210 label = "//third_party/zlib:shared_libz" 211 subsystem_name = "thirdparty" 212 part_name = "zlib" 213 lib_names = [ "shared_libz" ] 214 }, 215 ] 216 217 napi_modules += [ 218 { 219 prefix = "data" 220 shard_libs = [ 221 { 222 label = "//foundation/distributeddatamgr/preferences/frameworks/js/napi/preferences:preferences" 223 subsystem_name = "distributeddatamgr" 224 part_name = "preferences" 225 }, 226 { 227 label = "//foundation/distributeddatamgr/relational_store/frameworks/js/napi/rdb:rdb" 228 subsystem_name = "distributeddatamgr" 229 part_name = "relational_store" 230 }, 231 { 232 label = "//foundation/distributeddatamgr/kv_store/kvstoremock/interfaces/jskits/distributeddata:distributeddata" 233 subsystem_name = "distributeddatamgr" 234 part_name = "kv_store" 235 }, 236 ] 237 }, 238 { 239 prefix = "net" 240 shard_libs = [ 241 { 242 label = 243 "//foundation/communication/netstack/frameworks/js/napi/http:http" 244 subsystem_name = "communication" 245 part_name = "netstack" 246 }, 247 ] 248 }, 249 ] 250} 251