Skip to content

Commit f2c5744

Browse files
authored
Merge pull request #878 from docker/fix/install-llama-common-dll-windows
fix: install llama-common DLL on Windows shared builds
2 parents 816dd2a + 2759390 commit f2c5744

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

llamacpp/native/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ if (DDLLAMA_BUILD_SERVER)
2626
endif()
2727
add_subdirectory(vendor/llama.cpp)
2828

29+
# Ensure shared library DLLs are installed on Windows.
30+
# Upstream install rules use LIBRARY which doesn't install RUNTIME (DLL) artifacts on DLL platforms.
31+
if (BUILD_SHARED_LIBS)
32+
install(TARGETS llama RUNTIME DESTINATION bin)
33+
if (TARGET llama-common)
34+
install(TARGETS llama-common RUNTIME DESTINATION bin)
35+
endif()
36+
endif()
37+
2938
# Create custom target to copy llama-server to com.docker.llama-server
3039
if (WIN32)
3140
set(LLAMA_SERVER_DST "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/com.docker.llama-server.exe")

0 commit comments

Comments
 (0)