File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
set (TARGET llava)
2
2
3
- add_library (${TARGET} llava.cpp llava.h clip.cpp clip.h)
3
+ if (BUILD_SHARED_LIBS )
4
+ add_library (${TARGET} SHARED llava.cpp llava.h clip.cpp clip.h)
5
+ set_target_properties (${TARGET} PROPERTIES POSITION_INDEPENDENT_CODE ON )
6
+ set_target_properties (${TARGET} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR} )
7
+ target_link_libraries (${TARGET} PUBLIC Threads::Threads common llama ggml ${LLAMA_EXTRA_LIBS} )
8
+ install (TARGETS ${TARGET} LIBRARY)
9
+ else ()
10
+ add_library (${TARGET} llava.cpp llava.h clip.cpp clip.h)
11
+ target_link_libraries (${TARGET} PRIVATE common llama ggml ${CMAKE_THREAD_LIBS_INIT} )
12
+ endif ()
4
13
5
14
target_include_directories (${TARGET} PUBLIC .)
6
- target_link_libraries (${TARGET} PRIVATE common llama ${CMAKE_THREAD_LIBS_INIT} )
15
+ target_include_directories (${TARGET} PUBLIC ..)
16
+ target_include_directories (${TARGET} PUBLIC ../common)
17
+
7
18
target_compile_features (${TARGET} PRIVATE cxx_std_11)
8
19
if (NOT MSVC )
9
20
target_compile_options (${TARGET} PRIVATE -Wno-cast-qual) # stb_image.h
10
21
endif ()
11
22
if (TARGET BUILD_INFO)
12
23
add_dependencies (${TARGET} BUILD_INFO)
13
24
endif ()
25
+
You can’t perform that action at this time.
0 commit comments