2023-11-06 22:36:23 +01:00
|
|
|
add_library(llava OBJECT
|
|
|
|
llava.cpp
|
|
|
|
llava.h
|
|
|
|
clip.cpp
|
|
|
|
clip.h
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(llava PRIVATE ggml llama ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
|
|
|
|
target_include_directories(llava PUBLIC .)
|
|
|
|
target_include_directories(llava PUBLIC ../..)
|
|
|
|
target_include_directories(llava PUBLIC ../../common)
|
|
|
|
|
2024-11-29 21:54:58 +01:00
|
|
|
target_compile_features(llava PRIVATE cxx_std_17)
|
2023-11-06 22:36:23 +01:00
|
|
|
|
|
|
|
add_library(llava_static STATIC $<TARGET_OBJECTS:llava>)
|
|
|
|
if (BUILD_SHARED_LIBS)
|
|
|
|
set_target_properties(llava PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
|
|
|
target_compile_definitions(llava PRIVATE LLAMA_SHARED LLAMA_BUILD)
|
|
|
|
add_library(llava_shared SHARED $<TARGET_OBJECTS:llava>)
|
|
|
|
target_link_libraries(llava_shared PRIVATE ggml llama ${CMAKE_THREAD_LIBS_INIT})
|
|
|
|
install(TARGETS llava_shared LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
2023-10-12 17:23:18 +02:00
|
|
|
if (NOT MSVC)
|
2023-11-06 22:36:23 +01:00
|
|
|
target_compile_options(llava PRIVATE -Wno-cast-qual) # stb_image.h
|
2023-12-29 17:52:15 +01:00
|
|
|
endif()
|
|
|
|
|
2023-11-06 22:36:23 +01:00
|
|
|
if(TARGET BUILD_INFO)
|
|
|
|
add_dependencies(llava BUILD_INFO)
|
2023-10-12 17:23:18 +02:00
|
|
|
endif()
|
|
|
|
|
2024-06-13 01:41:52 +02:00
|
|
|
set(TARGET llama-llava-cli)
|
|
|
|
add_executable(${TARGET} llava-cli.cpp)
|
|
|
|
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama-llava-cli)
|
|
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
|
|
target_link_libraries(${TARGET} PRIVATE common llava ${CMAKE_THREAD_LIBS_INIT})
|
2024-11-29 21:54:58 +01:00
|
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|
2024-08-09 12:33:53 +02:00
|
|
|
|
|
|
|
set(TARGET llama-minicpmv-cli)
|
|
|
|
add_executable(${TARGET} minicpmv-cli.cpp)
|
|
|
|
set_target_properties(${TARGET} PROPERTIES OUTPUT_NAME llama-minicpmv-cli)
|
|
|
|
install(TARGETS ${TARGET} RUNTIME)
|
|
|
|
target_link_libraries(${TARGET} PRIVATE common llava ${CMAKE_THREAD_LIBS_INIT})
|
2024-11-29 21:54:58 +01:00
|
|
|
target_compile_features(${TARGET} PRIVATE cxx_std_17)
|