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