Skip to content

Commit aeb47db

Browse files
committed
Add option to build only mtmd library
1 parent ab269c4 commit aeb47db

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ option(LLAMA_BUILD_TOOLS "llama: build tools" ${LLAMA_STANDALONE})
8181
option(LLAMA_BUILD_EXAMPLES "llama: build examples" ${LLAMA_STANDALONE})
8282
option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
8383

84+
# specific extras
85+
option(LLAMA_MTMD "llama: multimodal support" OFF)
86+
8487
# 3rd party libs
8588
option(LLAMA_CURL "llama: use libcurl to download model from an URL" ON)
8689
option(LLAMA_LLGUIDANCE "llama-common: include LLGuidance library for structured output in common utils" OFF)
@@ -206,6 +209,10 @@ if (LLAMA_BUILD_COMMON AND LLAMA_BUILD_TOOLS)
206209
add_subdirectory(tools)
207210
endif()
208211

212+
if (LLAMA_MTMD)
213+
add_subdirectory(tools/mtmd)
214+
endif()
215+
209216
#
210217
# install
211218
#
@@ -241,7 +248,7 @@ if (LLAMA_BUILD_COMMON)
241248

242249
endif()
243250

244-
if (LLAMA_BUILD_TOOLS)
251+
if (LLAMA_MTMD)
245252

246253
install(
247254
TARGETS mtmd

tools/mtmd/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ if (TARGET BUILD_INFO)
5050
add_dependencies(mtmd-helper BUILD_INFO)
5151
endif()
5252

53+
if (LLAMA_BUILD_TOOLS)
5354
add_executable(llama-llava-cli deprecation-warning.cpp)
5455
add_executable(llama-gemma3-cli deprecation-warning.cpp)
5556
add_executable(llama-minicpmv-cli deprecation-warning.cpp)
@@ -61,3 +62,4 @@ set_target_properties (${TARGET} PROPERTIES OUTPUT_NAME llama-mtmd-cli)
6162
install (TARGETS ${TARGET} RUNTIME)
6263
target_link_libraries (${TARGET} PRIVATE common mtmd Threads::Threads)
6364
target_compile_features(${TARGET} PRIVATE cxx_std_17)
65+
endif()

0 commit comments

Comments
 (0)