@@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.23)
2
2
project (whisper_cpp_server )
3
3
4
4
set (CMAKE_CXX_STANDARD 20 )
5
- # 查找 uWebSockets 的头文件路径
5
+ # find uWebSockets head file path
6
6
find_path (UWEBSOCKETS_INCLUDE_DIRS "uwebsockets/App.h" )
7
- # 查找 zlib 库
7
+ # find zlib
8
8
find_package (ZLIB REQUIRED )
9
9
10
- # 查找 libuv 库
10
+ # find libuv
11
11
find_package (libuv CONFIG REQUIRED )
12
- # 查找 uSockets 库
12
+ # find uSockets
13
13
find_library (USOCKETS_LIBRARY uSockets )
14
14
15
15
# find SDL2 library
@@ -19,8 +19,7 @@ message(STATUS "SDL2 libraries: ${SDL2_LIBRARIES}")
19
19
20
20
include_directories (${SDL2_INCLUDE_DIRS} )
21
21
22
- # 检测操作系统
23
- # 检测操作系统
22
+ # Detecting Operating Systems
24
23
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
25
24
# macOS
26
25
include_directories (/Users/ping/code/cpp/project-litongjava/whisper.cpp )
@@ -31,7 +30,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
31
30
link_directories (/mnt/e/code/cpp/project-ping/whisper.cpp/cmake-build-release )
32
31
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows" )
33
32
# Windows
34
- # 添加你的 Windows 特定的 include 和 link 目录
35
33
include_directories (E:\\ code\\ cpp\\ project-ping\\ whisper.cpp )
36
34
link_directories (E:\\ code\\ cpp\\ project-ping\\ whisper.cpp\\ cmake-build-release )
37
35
link_directories (E:\\ code\\ cpp\\ project-ping\\ whisper.cpp\\ cmake-build-release\\ bin )
@@ -47,26 +45,26 @@ target_link_libraries(simplest whisper)
47
45
add_executable (stream_local examples/stream_local.cpp common/common.cpp common/common-sdl.cpp
48
46
stream/stream_components_service.cpp stream/stream_components_audio.cpp
49
47
stream/stream_components_output.cpp
50
- )
48
+ )
51
49
target_link_libraries (stream_local whisper ${SDL2_LIBRARIES} )
52
50
53
51
add_executable (whisper_http_server_base_httplib whisper_http_server_base_httplib.cpp common/common.cpp httplib/httplib.h nlohmann/json.hpp handler/inference_handler.cpp params/whisper_params.cpp )
54
52
target_link_libraries (whisper_http_server_base_httplib whisper )
55
53
56
54
add_executable (whisper_server_base_on_uwebsockets whisper_server_base_on_uwebsockets.cpp stream/stream_components_service.cpp utils/utils.cpp )
57
- #添加头文件
55
+ #add uwebsockets head files
58
56
target_include_directories (whisper_server_base_on_uwebsockets PRIVATE ${UWEBSOCKETS_INCLUDE_DIRS} )
59
- # 链接 uWebSockets、zlib、libuv 和 uSockets 库
60
- # 检测操作系统
61
- if (WIN32 )
62
- # 如果是 Windows
57
+ # linked uWebSockets、zlib、libuv 和 uSockets libs
58
+ # Detecting Operating Systems
59
+ if (WIN32 )
60
+ # if Windows
63
61
target_link_libraries (whisper_server_base_on_uwebsockets PRIVATE whisper ZLIB::ZLIB libuv::uv ${USOCKETS_LIBRARY} )
64
- elseif (APPLE )
65
- # 如果是 MacOS
62
+ elseif (APPLE )
63
+ # if MacOS
66
64
target_link_libraries (whisper_server_base_on_uwebsockets PRIVATE whisper ZLIB::ZLIB libuv::uv_a ${USOCKETS_LIBRARY} )
67
- else ()
68
- # 对于其他系统,比如 Linux
65
+ else ()
66
+ # if others eg. Linux
69
67
target_link_libraries (whisper_server_base_on_uwebsockets PRIVATE whisper ZLIB::ZLIB libuv::uv ${USOCKETS_LIBRARY} )
70
- endif ()
68
+ endif ()
71
69
72
70
0 commit comments