From 72cdfe65e386548979c654a063c2c6914a5c4feb Mon Sep 17 00:00:00 2001
From: zhaomingwork <61895407+zhaomingwork@users.noreply.github.com>
Date: 星期四, 08 六月 2023 11:30:01 +0800
Subject: [PATCH] Modified cpp ws server for centos (#610)

---
 funasr/runtime/websocket/CMakeLists.txt |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/funasr/runtime/websocket/CMakeLists.txt b/funasr/runtime/websocket/CMakeLists.txt
index e89537b..58ca972 100644
--- a/funasr/runtime/websocket/CMakeLists.txt
+++ b/funasr/runtime/websocket/CMakeLists.txt
@@ -2,6 +2,8 @@
 
 project(FunASRWebscoket) 
 
+set(CMAKE_CXX_STANDARD 14 CACHE STRING "The C++ version to be used.")
+set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 
 
@@ -55,10 +57,12 @@
 include_directories(${PROJECT_SOURCE_DIR}/../onnxruntime/third_party/glog)
 set(BUILD_TESTING OFF)
 add_subdirectory(${PROJECT_SOURCE_DIR}/../onnxruntime/third_party/glog glog)
- 
+
+# install openssl first apt-get install libssl-dev
+find_package(OpenSSL REQUIRED)
 
 add_executable(websocketmain "websocketmain.cpp" "websocketsrv.cpp")
 add_executable(websocketclient "websocketclient.cpp")
 
-target_link_libraries(websocketclient PUBLIC funasr)
-target_link_libraries(websocketmain PUBLIC funasr)
+target_link_libraries(websocketclient PUBLIC funasr ssl crypto)
+target_link_libraries(websocketmain PUBLIC funasr ssl crypto)

--
Gitblit v1.9.1