cmake : build normal ggml library (not object library) [no ci]
This commit is contained in:
parent
ec0a609067
commit
15c1c79449
2 changed files with 3 additions and 6 deletions
|
@ -207,7 +207,7 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
|
|||
install(TARGETS ggml PUBLIC_HEADER)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
install(TARGETS ggml_shared LIBRARY)
|
||||
install(TARGETS ggml LIBRARY)
|
||||
endif()
|
||||
|
||||
if (GGML_METAL)
|
||||
|
|
|
@ -570,6 +570,7 @@ if (GGML_KOMPUTE)
|
|||
|
||||
find_package(Vulkan COMPONENTS glslc REQUIRED)
|
||||
find_program(glslc_executable NAMES glslc HINTS Vulkan::glslc)
|
||||
|
||||
if (NOT glslc_executable)
|
||||
message(FATAL_ERROR "glslc not found")
|
||||
endif()
|
||||
|
@ -1129,7 +1130,7 @@ endif()
|
|||
|
||||
# ggml
|
||||
|
||||
add_library(ggml OBJECT
|
||||
add_library(ggml
|
||||
../include/ggml.h
|
||||
../include/ggml-alloc.h
|
||||
../include/ggml-backend.h
|
||||
|
@ -1167,10 +1168,6 @@ if (MATH_LIBRARY)
|
|||
target_link_libraries(ggml PRIVATE ${MATH_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_library(ggml_static STATIC $<TARGET_OBJECTS:ggml>)
|
||||
|
||||
if (BUILD_SHARED_LIBS)
|
||||
set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||
add_library(ggml_shared SHARED $<TARGET_OBJECTS:ggml>)
|
||||
target_link_libraries(ggml_shared PRIVATE Threads::Threads ${GGML_EXTRA_LIBS})
|
||||
endif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue