From a48275059060558a217a6203c449f2db9f5da8b7 Mon Sep 17 00:00:00 2001 From: KerfuffleV2 Date: Fri, 16 Jun 2023 14:19:22 -0600 Subject: [PATCH] Build lib versions of ggml separately --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d1b384016..70f6875cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -410,7 +410,7 @@ endif() # Build libraries # -add_library(ggml STATIC +add_library(ggml OBJECT ggml.c ggml.h ${GGML_SOURCES_CUDA} @@ -423,8 +423,10 @@ target_include_directories(ggml PUBLIC . ${LLAMA_EXTRA_INCLUDES}) target_compile_features(ggml PUBLIC c_std_11) # don't bump target_link_libraries(ggml PUBLIC Threads::Threads ${LLAMA_EXTRA_LIBS}) +add_library(ggml_static STATIC $) if (BUILD_SHARED_LIBS) set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON) + add_library(ggml_shared SHARED $) endif() add_library(llama