@@ -9,11 +9,33 @@ message(STATUS "SDL2 libraries: ${SDL2_LIBRARIES}")
9
9
10
10
include_directories (${SDL2_INCLUDE_DIRS} )
11
11
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
+
12
31
add_executable (sdl_version sdl_version.cpp )
13
32
target_link_libraries (sdl_version ${SDL2_LIBRARIES} )
14
33
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} )
17
39
18
40
#add_executable(server server.cpp httplib.h json.hpp)
19
41
#target_link_libraries(server common.cpp whisper)
0 commit comments