diff --git a/BUILD.gn b/BUILD.gn index 1ed32764c20ef746e4d508e20fac3804df06675f..49988033f727a22370628d62359745a6a45a2cdd 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -241,11 +241,19 @@ ohos_static_library("websockets") { "-pipe", ] - deps = [ - "//third_party/openssl:libcrypto_shared", - "//third_party/openssl:libssl_shared", - "//third_party/zlib:libz", - ] + deps = [ "//third_party/zlib:libz" ] + + if (target_os == "ios") { + deps += [ + "//third_party/openssl:libcrypto_static", + "//third_party/openssl:ssl_source", + ] + } else { + deps += [ + "//third_party/openssl:libcrypto_shared", + "//third_party/openssl:libssl_shared", + ] + } } config("websocket_config") {