File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,25 @@ endif()
7676
7777add_subdirectory (${GGML_PATH} ggml )
7878
79+ # Remove SONAME versioning from ggml targets for Python wheel packaging.
80+ # ggml explicitly sets SOVERSION on its targets, which creates versioned symlinks
81+ # (libggml.so.0 -> libggml.so.0.10.0) that aren't preserved in wheels, causing
82+ # auditwheel/delocate to fail.
83+ if (RS_ENABLE_PYTHON)
84+ set (_ggml_targets ggml ggml-base ggml-cpu ggml-metal ggml-blas ggml-vulkan)
85+ foreach (_t IN LISTS _ggml_targets)
86+ if (TARGET ${_t} )
87+ set_target_properties (${_t} PROPERTIES
88+ SOVERSION ""
89+ VERSION ""
90+ NO_SONAME ON
91+ INSTALL_RPATH "@loader_path"
92+ BUILD_WITH_INSTALL_RPATH ON
93+ )
94+ endif ()
95+ endforeach ()
96+ endif ()
97+
7998# --- Core Source Files ---
8099include_directories (
81100 ${CMAKE_CURRENT_SOURCE_DIR} /include
@@ -128,6 +147,12 @@ if (NOT RS_ENABLE_PYTHON)
128147 VERSION ${PROJECT_VERSION}
129148 SOVERSION 1
130149 )
150+ else ()
151+ set_target_properties (rapidspeech-core PROPERTIES
152+ NO_SONAME ON
153+ INSTALL_RPATH "@loader_path"
154+ BUILD_WITH_INSTALL_RPATH ON
155+ )
131156endif ()
132157set_target_properties (rapidspeech-core PROPERTIES
133158 CXX_VISIBILITY_PRESET hidden
You can’t perform that action at this time.
0 commit comments