I installed whisper in MyPrj :
~/Downloads/whisper.cpp$ cmake --install builddir/ --prefix=/home/me/MyPrj/src/whisperLib
-- Install configuration: "Release"
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1.7.4
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libwhisper.so.1.7.4" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libwhisper.so
-- Installing: /home/me/MyPrj/src/whisperLib/include/whisper.h
-- Installing: /home/me/MyPrj/src/whisperLib/lib/cmake/whisper/whisper-config.cmake
-- Installing: /home/me/MyPrj/src/whisperLib/lib/cmake/whisper/whisper-version.cmake
-- Installing: /home/me/MyPrj/src/whisperLib/lib/pkgconfig/whisper.pc
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml-cpu.so
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libggml-cpu.so" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml.so
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/lib/libggml.so" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cpu.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-alloc.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-backend.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-blas.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cann.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-cuda.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-kompute.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-opt.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-metal.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-rpc.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-sycl.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/ggml-vulkan.h
-- Installing: /home/me/MyPrj/src/whisperLib/include/gguf.h
-- Installing: /home/me/MyPrj/src/whisperLib/lib/libggml-base.so
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-cli
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-cli" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-bench
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-bench" to ""
-- Installing: /home/me/MyPrj/src/whisperLib/bin/whisper-server
-- Set non-toolchain portion of runtime path of "/home/me/MyPrj/src/whisperLib/bin/whisper-server" to ""
/MyPrj/src/whisperLib$ ls
bin include lib
/MPrj/srs/whisperLib$ ls ./lib/
cmake libggml-cpu.so libwhisper.so libwhisper.so.1.7.4
libggml-base.so libggml.so libwhisper.so.1 pkgconfig
in CMakeLists.txt I’ve put :
add_library(libwhisper SHARED IMPORTED)
set_target_properties(libwhisper PROPERTIES
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so"
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so.1"
IMPORTED_LOCATION "${CMAKE_SOURCE_DIR}/src/whisperLib/lib/libwhisper.so.1.7.4"
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/src/whisperLib/include"
target_link_libraries(whisper)
)
But executing I get :
error while loading shared libraries: libwhisper.so.1: cannot open shared object file: No such file or directory
cmake version 3.28.3
OS: Ubuntu 24.04
How make the libwhisper visible?