]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
ggml: fix: macOS build with `-DGGML_BACKEND_DL=ON` (llama/17581)
authorGilad S. <redacted>
Sun, 30 Nov 2025 02:00:59 +0000 (04:00 +0200)
committerGeorgi Gerganov <redacted>
Fri, 12 Dec 2025 15:53:13 +0000 (17:53 +0200)
ggml/src/CMakeLists.txt

index a36f5b664780d63e58c2a290670f00c1c1076ba1..d93664b8b58bb2029c921e4fafc0292d92a80dc0 100644 (file)
@@ -274,10 +274,13 @@ function(ggml_add_backend_library backend)
     endif()
 
     # Set versioning properties for all backend libraries
-    set_target_properties(${backend} PROPERTIES
-        VERSION ${GGML_VERSION}
-        SOVERSION ${GGML_VERSION_MAJOR}
-    )
+    # Building a MODULE library with a version is not supported on macOS (https://gitlab.kitware.com/cmake/cmake/-/issues/20782)
+    if (NOT (APPLE AND GGML_BACKEND_DL))
+        set_target_properties(${backend} PROPERTIES
+            VERSION ${GGML_VERSION}
+            SOVERSION ${GGML_VERSION_MAJOR}
+        )
+    endif()
 
     if(NOT GGML_AVAILABLE_BACKENDS)
         set(GGML_AVAILABLE_BACKENDS "${backend}"