Skip to content

Commit 339b8e5

Browse files
bandotiggerganov
authored andcommitted
Add required ggml-base and backend libs to cmake pkg (llama/10407)
1 parent 5f6d691 commit 339b8e5

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

ggml/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,8 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
234234
#if (GGML_METAL)
235235
# set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal")
236236
#endif()
237-
install(TARGETS ggml PUBLIC_HEADER)
238-
239-
if (BUILD_SHARED_LIBS)
240-
install(TARGETS ggml LIBRARY)
241-
install(TARGETS ggml-base LIBRARY)
242-
endif()
237+
install(TARGETS ggml LIBRARY PUBLIC_HEADER)
238+
install(TARGETS ggml-base LIBRARY)
243239

244240
# FIXME: this should be done in the backend cmake files
245241
if (GGML_METAL)

ggml/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,8 @@ function(ggml_add_backend backend)
239239
if (${BUILD_SHARED_LIBS})
240240
target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
241241
target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED)
242-
install(TARGETS ${backend_target} LIBRARY)
243242
endif()
243+
install(TARGETS ${backend_target} LIBRARY)
244244
target_link_libraries(ggml PUBLIC ${backend_target})
245245
string(TOUPPER "GGML_USE_${backend}" backend_use)
246246
target_compile_definitions(ggml PUBLIC ${backend_use})

0 commit comments

Comments
 (0)