File tree Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Expand file tree Collapse file tree 3 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,11 @@ add_library(ggml-base
211211 ggml-quants.h
212212 gguf.cpp)
213213
214+ set_target_properties (ggml-base PROPERTIES
215+ VERSION ${GGML_VERSION}
216+ SOVERSION ${GGML_VERSION_MAJOR}
217+ )
218+
214219target_include_directories (ggml-base PRIVATE .)
215220if (GGML_BACKEND_DL)
216221 target_compile_definitions (ggml-base PUBLIC GGML_BACKEND_DL)
@@ -220,6 +225,11 @@ add_library(ggml
220225 ggml-backend-reg.cpp)
221226add_library (ggml::ggml ALIAS ggml)
222227
228+ set_target_properties (ggml PROPERTIES
229+ VERSION ${GGML_VERSION}
230+ SOVERSION ${GGML_VERSION_MAJOR}
231+ )
232+
223233if (GGML_BACKEND_DIR)
224234 if (NOT GGML_BACKEND_DL)
225235 message (FATAL_ERROR "GGML_BACKEND_DIR requires GGML_BACKEND_DL" )
@@ -259,6 +269,12 @@ function(ggml_add_backend_library backend)
259269 target_compile_definitions (${backend} PUBLIC GGML_BACKEND_SHARED)
260270 endif ()
261271
272+ # Set versioning properties for all backend libraries
273+ set_target_properties (${backend} PROPERTIES
274+ VERSION ${GGML_VERSION}
275+ SOVERSION ${GGML_VERSION_MAJOR}
276+ )
277+
262278 if (NOT GGML_AVAILABLE_BACKENDS)
263279 set (GGML_AVAILABLE_BACKENDS "${backend} "
264280 CACHE INTERNAL "List of backends for cmake package" )
Original file line number Diff line number Diff line change @@ -132,6 +132,11 @@ add_library(llama
132132 models/graph-context-mamba.cpp
133133 )
134134
135+ set_target_properties (llama PROPERTIES
136+ VERSION ${LLAMA_INSTALL_VERSION}
137+ SOVERSION 0
138+ )
139+
135140target_include_directories (llama PRIVATE .)
136141target_include_directories (llama PUBLIC ../include )
137142target_compile_features (llama PRIVATE cxx_std_17) # don't bump
Original file line number Diff line number Diff line change @@ -13,6 +13,11 @@ add_library(mtmd
1313 mtmd-helper.h
1414 )
1515
16+ set_target_properties (mtmd PROPERTIES
17+ VERSION ${LLAMA_INSTALL_VERSION}
18+ SOVERSION 0
19+ )
20+
1621target_link_libraries (mtmd PUBLIC ggml llama)
1722target_link_libraries (mtmd PRIVATE Threads::Threads)
1823target_include_directories (mtmd PUBLIC .)
You can’t perform that action at this time.
0 commit comments