cmake: Add GGML_BACKEND_DIR option (llama/15074)

* cmake: Add GGML_BACKEND_DIR option

This can be used by distributions to specify where to look for backends
when ggml is built with GGML_BACKEND_DL=ON.

* Fix phrasing
This commit is contained in:
Christian Kastner
2025-08-18 20:30:45 +03:00
committed by Georgi Gerganov
parent 00ff38376a
commit 349b9a2097
4 changed files with 19 additions and 4 deletions
+1 -1
View File
@@ -106,7 +106,7 @@ if(NOT TARGET ggml::ggml)
find_library(GGML_LIBRARY ggml
REQUIRED
HINTS ${GGML_LIB_DIR}
HINTS ${GGML_LIB_DIR} ${GGML_BACKEND_DIR}
NO_CMAKE_FIND_ROOT_PATH)
add_library(ggml::ggml UNKNOWN IMPORTED)