ggml: fix: macOS build with `-DGGML_BACKEND_DL=ON` (#17581)

This commit is contained in:
Gilad S. 2025-11-30 04:00:59 +02:00 committed by GitHub
parent 5a6241feb0
commit fa0465954f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 4 deletions

View File

@ -274,10 +274,13 @@ function(ggml_add_backend_library backend)
endif()
# Set versioning properties for all backend libraries
# 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}"