• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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.
13
14import("//build/ohos.gni")
15import("//foundation/communication/netstack/netstack_config.gni")
16
17ohos_shared_library("websocket") {
18  include_dirs = [
19    "async_context/include",
20    "async_work/include",
21    "constant/include",
22    "websocket_exec/include",
23    "websocket_module/include",
24    "$THIRD_PARTY_ROOT/libwebsockets/include",
25  ]
26
27  sources = [
28    "async_context/src/close_context.cpp",
29    "async_context/src/connect_context.cpp",
30    "async_context/src/send_context.cpp",
31    "async_work/src/websocket_async_work.cpp",
32    "constant/src/constant.cpp",
33    "websocket_exec/src/websocket_exec.cpp",
34    "websocket_module/src/websocket_module.cpp",
35  ]
36
37  defines = [ "OHOS_LIBWEBSOCKETS=1" ]
38
39  deps = [
40    "$NETSTACK_DIR/utils/napi_utils:napi_utils",
41    "$THIRD_PARTY_ROOT/libwebsockets:websockets",
42    "$THIRD_PARTY_ROOT/openssl:libcrypto_shared",
43    "$THIRD_PARTY_ROOT/openssl:libssl_shared",
44    "$THIRD_PARTY_ROOT/zlib:shared_libz",
45  ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hiviewdfx_hilog_native:libhilog",
50    "napi:ace_napi",
51  ]
52
53  relative_install_dir = "module/net"
54  part_name = "netstack"
55  subsystem_name = "communication"
56}
57