mirror of
https://github.com/ggml-org/whisper.cpp.git
synced 2026-10-18 13:17:59 +02:00
examples : fix executable example targets (#3600)
* cmake:
- added `whisper-` prefix to unprefixed targets: `quantize`, `lsp`,
`vad-speech-segments`
- added `install(TARGETS ${TARGET} RUNTIME)` where it was missing
Signed-off-by: Peter A. <ink.splatters@pm.me>
* .github/workflows/build.yml: quantize -> whisper-quantize
Signed-off-by: Peter A. <ink.splatters@pm.me>
---------
Signed-off-by: Peter A. <ink.splatters@pm.me>
This commit is contained in:
@@ -1252,7 +1252,7 @@ jobs:
|
|||||||
./models/download-ggml-model.sh tiny.en
|
./models/download-ggml-model.sh tiny.en
|
||||||
cmake -B build
|
cmake -B build
|
||||||
cmake --build build --config Release
|
cmake --build build --config Release
|
||||||
./build/bin/quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0
|
./build/bin/whisper-quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0
|
||||||
|
|
||||||
release:
|
release:
|
||||||
if: ${{ github.event.inputs.create_release == 'true' || github.event.inputs.pre_release_tag != '' || startsWith(github.ref, 'refs/tags/v') }}
|
if: ${{ github.event.inputs.create_release == 'true' || github.event.inputs.pre_release_tag != '' || startsWith(github.ref, 'refs/tags/v') }}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
if (WHISPER_SDL2)
|
if (WHISPER_SDL2)
|
||||||
# stream
|
# stream
|
||||||
set(TARGET lsp)
|
set(TARGET whisper-lsp)
|
||||||
add_executable(${TARGET} lsp.cpp)
|
add_executable(${TARGET} lsp.cpp)
|
||||||
|
|
||||||
include(DefaultTargetOptions)
|
include(DefaultTargetOptions)
|
||||||
|
|
||||||
target_link_libraries(${TARGET} PRIVATE common json_cpp common-sdl whisper ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE common json_cpp common-sdl whisper ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
install(TARGETS ${TARGET} RUNTIME)
|
||||||
endif ()
|
endif ()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
set(TARGET quantize)
|
set(TARGET whisper-quantize)
|
||||||
add_executable(${TARGET} quantize.cpp)
|
add_executable(${TARGET} quantize.cpp)
|
||||||
|
|
||||||
include(DefaultTargetOptions)
|
include(DefaultTargetOptions)
|
||||||
|
|
||||||
target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
install(TARGETS ${TARGET} RUNTIME)
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ if (WHISPER_SDL2)
|
|||||||
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS})
|
target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS})
|
||||||
|
|
||||||
target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
install(TARGETS ${TARGET} RUNTIME)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# It requires Windows 8.1 or later for PrefetchVirtualMemory
|
# It requires Windows 8.1 or later for PrefetchVirtualMemory
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
set(TARGET vad-speech-segments)
|
set(TARGET whisper-vad-speech-segments)
|
||||||
add_executable(${TARGET} speech.cpp)
|
add_executable(${TARGET} speech.cpp)
|
||||||
|
|
||||||
include(DefaultTargetOptions)
|
include(DefaultTargetOptions)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ if (WHISPER_COREML)
|
|||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")
|
set_target_properties(${TARGET} PROPERTIES FOLDER "libs")
|
||||||
|
install(TARGETS ${TARGET} LIBRARY)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WHISPER_OPENVINO)
|
if (WHISPER_OPENVINO)
|
||||||
|
|||||||
Reference in New Issue
Block a user