Skip to content

Commit 8926e6a

Browse files
author
litongjava
committed
add windows configuration
1 parent 8e6fa5a commit 8926e6a

File tree

4 files changed

+505
-4
lines changed

4 files changed

+505
-4
lines changed

CMakeLists.txt

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,33 @@ message(STATUS "SDL2 libraries: ${SDL2_LIBRARIES}")
99

1010
include_directories(${SDL2_INCLUDE_DIRS})
1111

12+
# 检测操作系统
13+
# 检测操作系统
14+
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
15+
# macOS
16+
include_directories(/Users/ping/code/cpp/project-litongjava/whisper.cpp)
17+
link_directories(/Users/ping/code/cpp/project-litongjava/whisper.cpp/cmake-build-release)
18+
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
19+
# Linux
20+
include_directories(/mnt/e/code/cpp/project-ping/whisper.cpp)
21+
link_directories(/mnt/e/code/cpp/project-ping/whisper.cpp/cmake-build-release)
22+
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Windows")
23+
# Windows
24+
# 添加你的 Windows 特定的 include 和 link 目录
25+
include_directories(E:\\code\\cpp\\project-ping\\whisper.cpp)
26+
link_directories(E:\\code\\cpp\\project-ping\\whisper.cpp\\cmake-build-release)
27+
link_directories(E:\\code\\cpp\\project-ping\\whisper.cpp\\cmake-build-release\\bin)
28+
endif ()
29+
30+
1231
add_executable(sdl_version sdl_version.cpp)
1332
target_link_libraries(sdl_version ${SDL2_LIBRARIES})
1433

15-
add_executable(stream_components stream_components.cpp)
16-
target_link_libraries(stream_components whisper ${SDL2_LIBRARIES})
34+
add_executable(simplest simplest.cpp common.cpp)
35+
target_link_libraries(simplest whisper)
36+
37+
add_executable(stream_components stream_components.cpp stream_components_audio.cpp stream_components_output.cpp stream_components_service.cpp)
38+
target_link_libraries(stream_components ${SDL2_LIBRARIES})
1739

1840
#add_executable(server server.cpp httplib.h json.hpp)
1941
#target_link_libraries(server common.cpp whisper)

0 commit comments

Comments
 (0)