From 961a1cacf158ee0a9c1ac628c8e4c6a7e19a1196 Mon Sep 17 00:00:00 2001
From: 游雁 <zhifu.gzf@alibaba-inc.com>
Date: 星期二, 13 六月 2023 11:15:34 +0800
Subject: [PATCH] v0.6.1

---
 funasr/runtime/websocket/CMakeLists.txt |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/funasr/runtime/websocket/CMakeLists.txt b/funasr/runtime/websocket/CMakeLists.txt
index 07d96d9..58ca972 100644
--- a/funasr/runtime/websocket/CMakeLists.txt
+++ b/funasr/runtime/websocket/CMakeLists.txt
@@ -2,13 +2,15 @@
 
 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)
 
 
 option(ENABLE_WEBSOCKET "Whether to build websocket server" ON)
  
 if(ENABLE_WEBSOCKET)
-  cmake_policy(SET CMP0135 NEW)
+  # cmake_policy(SET CMP0135 NEW)
 
   include(FetchContent)
   FetchContent_Declare(websocketpp
@@ -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