From: Peter A. Date: Tue, 13 Jan 2026 07:08:18 +0000 (+0100) Subject: examples : fix executable example targets (#3600) X-Git-Tag: upstream/1.8.3~57 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a96310871a3b294f026c3bcad4e715d17b5905fe;p=pkg%2Fggml%2Fsources%2Fwhisper.cpp 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. * .github/workflows/build.yml: quantize -> whisper-quantize Signed-off-by: Peter A. --------- Signed-off-by: Peter A. --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3643aaf2..5c1cf93b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1252,7 +1252,7 @@ jobs: ./models/download-ggml-model.sh tiny.en cmake -B build 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: if: ${{ github.event.inputs.create_release == 'true' || github.event.inputs.pre_release_tag != '' || startsWith(github.ref, 'refs/tags/v') }} diff --git a/examples/lsp/CMakeLists.txt b/examples/lsp/CMakeLists.txt index 15b5be18..6dd96f53 100644 --- a/examples/lsp/CMakeLists.txt +++ b/examples/lsp/CMakeLists.txt @@ -1,9 +1,10 @@ if (WHISPER_SDL2) # stream - set(TARGET lsp) + set(TARGET whisper-lsp) add_executable(${TARGET} lsp.cpp) include(DefaultTargetOptions) target_link_libraries(${TARGET} PRIVATE common json_cpp common-sdl whisper ${CMAKE_THREAD_LIBS_INIT}) + install(TARGETS ${TARGET} RUNTIME) endif () diff --git a/examples/quantize/CMakeLists.txt b/examples/quantize/CMakeLists.txt index 8d2d2e4d..aa2828e3 100644 --- a/examples/quantize/CMakeLists.txt +++ b/examples/quantize/CMakeLists.txt @@ -1,6 +1,7 @@ -set(TARGET quantize) +set(TARGET whisper-quantize) add_executable(${TARGET} quantize.cpp) include(DefaultTargetOptions) target_link_libraries(${TARGET} PRIVATE common whisper ${CMAKE_THREAD_LIBS_INIT}) +install(TARGETS ${TARGET} RUNTIME) diff --git a/examples/talk-llama/CMakeLists.txt b/examples/talk-llama/CMakeLists.txt index deeab482..cac46705 100644 --- a/examples/talk-llama/CMakeLists.txt +++ b/examples/talk-llama/CMakeLists.txt @@ -36,6 +36,7 @@ if (WHISPER_SDL2) target_include_directories(${TARGET} PRIVATE ${SDL2_INCLUDE_DIRS}) target_link_libraries(${TARGET} PRIVATE common common-sdl whisper ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) + install(TARGETS ${TARGET} RUNTIME) if(WIN32) # It requires Windows 8.1 or later for PrefetchVirtualMemory diff --git a/examples/vad-speech-segments/CMakeLists.txt b/examples/vad-speech-segments/CMakeLists.txt index da685244..857b88c9 100644 --- a/examples/vad-speech-segments/CMakeLists.txt +++ b/examples/vad-speech-segments/CMakeLists.txt @@ -1,4 +1,4 @@ -set(TARGET vad-speech-segments) +set(TARGET whisper-vad-speech-segments) add_executable(${TARGET} speech.cpp) include(DefaultTargetOptions) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6030072d..095a2791 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -79,6 +79,7 @@ if (WHISPER_COREML) ) set_target_properties(${TARGET} PROPERTIES FOLDER "libs") + install(TARGETS ${TARGET} LIBRARY) endif() if (WHISPER_OPENVINO)