• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 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
14include_directories(../../../frameworks/js/napi/websocket/async_context/include)
15include_directories(../../../frameworks/js/napi/websocket/async_work/include)
16include_directories(../../../frameworks/js/napi/websocket/constant/include)
17include_directories(../../../frameworks/js/napi/websocket/websocket_exec/include)
18include_directories(../../../frameworks/js/napi/websocket/websocket_module/include)
19include_directories(../../../../../../third_party/libwebsockets/include)
20include_directories(../../../../../../third_party/libwebsockets/cmake-build-debug)
21
22link_directories(../../../../../../third_party/libwebsockets/cmake-build-debug/lib)
23
24add_executable(
25    test_napi_websocket_exec
26    test_napi_exec.cpp
27    ../log/test_hilog.cpp
28    ../../../frameworks/js/napi/websocket/async_context/src/connect_context.cpp
29    ../../../frameworks/js/napi/websocket/async_context/src/send_context.cpp
30    ../../../frameworks/js/napi/websocket/async_context/src/close_context.cpp
31    ../../../frameworks/js/napi/websocket/websocket_module/src/websocket_module.cpp
32    ../../../frameworks/js/napi/websocket/websocket_exec/src/websocket_exec.cpp
33    ../../../frameworks/js/napi/websocket/async_work/src/websocket_async_work.cpp
34    ../../../frameworks/js/napi/websocket/constant/src/constant.cpp
35)
36
37target_link_libraries(test_napi_websocket_exec websockets)
38target_link_libraries(test_napi_websocket_exec crypto)
39target_link_libraries(test_napi_websocket_exec ssl)
40target_link_libraries(test_napi_websocket_exec ace_napi_quickjs)
41target_link_libraries(test_napi_websocket_exec quickjs)
42target_link_libraries(test_napi_websocket_exec uv)
43target_link_libraries(test_napi_websocket_exec securec)
44target_link_libraries(test_napi_websocket_exec gtestd)
45target_link_libraries(test_napi_websocket_exec gmockd)
46target_link_libraries(test_napi_websocket_exec gtest_maind)
47target_link_libraries(test_napi_websocket_exec gmock_maind)
48target_link_libraries(test_napi_websocket_exec pthread)
49target_link_libraries(test_napi_websocket_exec dl)
50target_link_libraries(test_napi_websocket_exec nghttp2)
51target_link_libraries(test_napi_websocket_exec netstack_utils)
52
53set(CMAKE_CXX_FLAGS -g)
54