From 902965aa47226d49ba8b22fa14568be0eec5cc22 Mon Sep 17 00:00:00 2001
From: Anonymous <>
Date: Tue, 27 Jan 2026 00:00:00 +0000
Subject: [PATCH 3/6] Make backend library location a private macrodef in order to avoid needless recompilations.

---
 ggml/src/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt
index 714b9110..d3bdc40d 100644
--- a/ggml/src/CMakeLists.txt
+++ b/ggml/src/CMakeLists.txt
@@ -242,7 +242,7 @@ if (GGML_BACKEND_DIR)
     if (NOT GGML_BACKEND_DL)
         message(FATAL_ERROR "GGML_BACKEND_DIR requires GGML_BACKEND_DL")
     endif()
-    target_compile_definitions(ggml PUBLIC GGML_BACKEND_DIR="${GGML_BACKEND_DIR}")
+    target_compile_definitions(ggml PRIVATE GGML_BACKEND_DIR="${GGML_BACKEND_DIR}")
 endif()
 
 target_link_libraries(ggml PUBLIC ggml-base)
-- 
2.51.0

