From: Gilad S. Date: Sun, 30 Nov 2025 02:00:59 +0000 (+0200) Subject: ggml: fix: macOS build with `-DGGML_BACKEND_DL=ON` (#17581) X-Git-Tag: upstream/0.0.7446~241 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=fa0465954faef9d7170b967ad89f8bc5303a32f3;p=pkg%2Fggml%2Fsources%2Fllama.cpp ggml: fix: macOS build with `-DGGML_BACKEND_DL=ON` (#17581) --- diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index a36f5b66..d93664b8 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -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}"