]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
Add required ggml-base and backend libs to cmake pkg (llama/10407)
authorbandoti <redacted>
Tue, 19 Nov 2024 16:10:30 +0000 (12:10 -0400)
committerGeorgi Gerganov <redacted>
Wed, 20 Nov 2024 19:00:08 +0000 (21:00 +0200)
ggml/CMakeLists.txt
ggml/src/CMakeLists.txt

index 93a76785b2bea64c27948b1e0ae987374b0a86a5..f5f556cdcf88d0f435f3385fa1c53b1e36ae4e1f 100644 (file)
@@ -234,12 +234,8 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
 #if (GGML_METAL)
 #    set_target_properties(ggml PROPERTIES RESOURCE "${CMAKE_CURRENT_SOURCE_DIR}/src/ggml-metal.metal")
 #endif()
-install(TARGETS ggml PUBLIC_HEADER)
-
-if (BUILD_SHARED_LIBS)
-    install(TARGETS ggml      LIBRARY)
-    install(TARGETS ggml-base LIBRARY)
-endif()
+install(TARGETS ggml LIBRARY PUBLIC_HEADER)
+install(TARGETS ggml-base LIBRARY)
 
 # FIXME: this should be done in the backend cmake files
 if (GGML_METAL)
index ae7d3abc8de32e94eb8a96729dd615a8136f5f96..8df0e85c0d09214f30f3871fc16f66d4422d7d2a 100644 (file)
@@ -239,8 +239,8 @@ function(ggml_add_backend backend)
             if (${BUILD_SHARED_LIBS})
                 target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
                 target_compile_definitions(${backend_target} PUBLIC  GGML_BACKEND_SHARED)
-                install(TARGETS ${backend_target} LIBRARY)
             endif()
+            install(TARGETS ${backend_target} LIBRARY)
             target_link_libraries(ggml PUBLIC ${backend_target})
             string(TOUPPER "GGML_USE_${backend}" backend_use)
             target_compile_definitions(ggml PUBLIC ${backend_use})