Skip to content

Commit 9729379

Browse files
author
litongmacos
committed
Change CMakeLists.txt to English
1 parent 1f978cf commit 9729379

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

CMakeLists.txt

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ cmake_minimum_required(VERSION 3.23)
22
project(whisper_cpp_server)
33

44
set(CMAKE_CXX_STANDARD 20)
5-
# 查找 uWebSockets 的头文件路径
5+
# find uWebSockets head file path
66
find_path(UWEBSOCKETS_INCLUDE_DIRS "uwebsockets/App.h")
7-
# 查找 zlib
7+
# find zlib
88
find_package(ZLIB REQUIRED)
99

10-
# 查找 libuv
10+
# find libuv
1111
find_package(libuv CONFIG REQUIRED)
12-
# 查找 uSockets
12+
# find uSockets
1313
find_library(USOCKETS_LIBRARY uSockets)
1414

1515
# find SDL2 library
@@ -19,8 +19,7 @@ message(STATUS "SDL2 libraries: ${SDL2_LIBRARIES}")
1919

2020
include_directories(${SDL2_INCLUDE_DIRS})
2121

22-
# 检测操作系统
23-
# 检测操作系统
22+
# Detecting Operating Systems
2423
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
2524
# macOS
2625
include_directories(/Users/ping/code/cpp/project-litongjava/whisper.cpp)
@@ -31,7 +30,6 @@ elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
3130
link_directories(/mnt/e/code/cpp/project-ping/whisper.cpp/cmake-build-release)
3231
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
3332
# Windows
34-
# 添加你的 Windows 特定的 include 和 link 目录
3533
include_directories(E:\\code\\cpp\\project-ping\\whisper.cpp)
3634
link_directories(E:\\code\\cpp\\project-ping\\whisper.cpp\\cmake-build-release)
3735
link_directories(E:\\code\\cpp\\project-ping\\whisper.cpp\\cmake-build-release\\bin)
@@ -47,26 +45,26 @@ target_link_libraries(simplest whisper)
4745
add_executable(stream_local examples/stream_local.cpp common/common.cpp common/common-sdl.cpp
4846
stream/stream_components_service.cpp stream/stream_components_audio.cpp
4947
stream/stream_components_output.cpp
50-
)
48+
)
5149
target_link_libraries(stream_local whisper ${SDL2_LIBRARIES})
5250

5351
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)
5452
target_link_libraries(whisper_http_server_base_httplib whisper)
5553

5654
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
5856
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
6361
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
6664
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
6967
target_link_libraries(whisper_server_base_on_uwebsockets PRIVATE whisper ZLIB::ZLIB libuv::uv ${USOCKETS_LIBRARY})
70-
endif()
68+
endif ()
7169

7270

0 commit comments

Comments
 (0)