From 7ab9f779ba3c508c547081da7f36c180d16a8d6f Mon Sep 17 00:00:00 2001 From: abetlen Date: Sat, 13 Jun 2026 13:09:11 -0700 Subject: [PATCH] fix(ci): skip mtmd CLI wrappers in package builds --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b2744cdce..623ab21622 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -176,6 +176,15 @@ if (LLAMA_BUILD) # Building llava add_subdirectory(vendor/llama.cpp/tools/mtmd) + # The Python package only ships mtmd as a shared library. + # Upstream mtmd also defines CLI compatibility wrappers, but those are + # not installed here and can fail to link in minimal Docker toolchains. + foreach(target llama-llava-cli llama-gemma3-cli llama-minicpmv-cli llama-qwen2vl-cli llama-mtmd-debug) + if (TARGET ${target}) + set_target_properties(${target} PROPERTIES EXCLUDE_FROM_ALL TRUE) + endif() + endforeach() + if (WIN32) set_target_properties(mtmd PROPERTIES CUDA_ARCHITECTURES OFF) endif()