]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
use libggml-cpu.so for Debian packaging
authorMathieu Baudier <redacted>
Wed, 22 Jan 2025 10:19:30 +0000 (11:19 +0100)
committerMathieu Baudier <redacted>
Wed, 22 Jan 2025 10:19:30 +0000 (11:19 +0100)
debian/cmake/debian-whisper.cpp.cmake

index 7d959c4273f956e340733ad6918e61033ca5ce86..e66fc203d84d18877df6883cd5c9d2d9f21ac232 100644 (file)
@@ -20,12 +20,12 @@ set_target_properties(ggml PROPERTIES IMPORTED_LOCATION ${GGML_LOCATION})
 # transitive dependency
 target_link_libraries(ggml INTERFACE ${GGML_BASE_LOCATION})
 
-# quite a few examples require direct reference to ggml-cpu
-#find_library(GGML_CPU_LOCATION ggml-cpu-sandybridge)
-#message (STATUS "Found GGML CPU library: ${GGML_CPU_LOCATION}")
-link_libraries("${CMAKE_INSTALL_PREFIX}/libexec/${CMAKE_LIBRARY_ARCHITECTURE}/ggml/libggml-cpu-sandybridge.so")
+# libwhisper actually link against a CPU backend
+find_library(GGML_CPU_LOCATION ggml-cpu)
+message (STATUS "Found GGML CPU library: ${GGML_CPU_LOCATION}")
+link_libraries(${GGML_CPU_LOCATION})
 
-# FIXME Not clear whether a libggml-cpu is actually needed.
+# Not clear whether a libggml-cpu is actually needed.
 # LD_LIBRARY_PATH=/usr/libexec/*/ggml would have to be used in that case
 # It could be more robust to set RPATH, but it causes lintian errors:
 #set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/libexec/${CMAKE_LIBRARY_ARCHITECTURE}/ggml")