diff --git a/websocket/BUILD.gn b/websocket/BUILD.gn index 84faa5f48b351800dc52211385104434461971a9..7ab7df7c59e9ac4945e0a453c82e53b8bf7891c9 100644 --- a/websocket/BUILD.gn +++ b/websocket/BUILD.gn @@ -77,18 +77,27 @@ ohos_source_set("websocket") { include_dirs += [ "$toolchain_root/inspector", "//third_party/openssl/include", - "//third_party/openssl:libcrypto_static", "//utils/native/base/include", ] sources = [ "websocket.cpp" ] deps += [ - "//third_party/openssl:libcrypto_static", - "//third_party/openssl:ssl_source", sdk_libc_secshared_dep, ] + if (defined(build_cross_platform_version) && build_cross_platform_version) { + deps += [ + "//third_party/openssl:libcrypto_static", + "//third_party/openssl:ssl_source", + ] + } else { + deps += [ + "//third_party/openssl:libcrypto_shared", + "//third_party/openssl:libssl_shared", + ] + } + configs += [ ":websocket_config", ":websocket_platform_config",