cmake : remove STATIC from impl libraries, enable LLAMA_BUILD_APP by default (#23462)

* cmake : remove STATIC from impl libraries, allow BUILD_SHARED_LIBS control

Remove explicit STATIC from all -impl libraries (server, cli, completion, bench,
batched-bench, fit-params, quantize, perplexity) so BUILD_SHARED_LIBS controls
shared vs static linkage.

Add WINDOWS_EXPORT_ALL_SYMBOLS ON for proper DLL export on Windows.

Assisted-by: llama.cpp:local pi

* cmake : enable LLAMA_BUILD_APP by default

Assisted-by: llama.cpp:local pi

* ci : disable app in build-cmake-pkg.yml
This commit is contained in:
Georgi Gerganov
2026-05-21 21:13:59 +03:00
committed by GitHub
parent ee7c30578a
commit bb28c1fe24
10 changed files with 18 additions and 10 deletions

View File

@@ -2,7 +2,8 @@
set(TARGET llama-cli-impl)
add_library(${TARGET} STATIC cli.cpp)
add_library(${TARGET} cli.cpp)
set_target_properties(${TARGET} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
target_include_directories(${TARGET} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} ../server)
target_link_libraries(${TARGET} PUBLIC server-context llama-common ${CMAKE_THREAD_LIBS_INIT})