Skip to content

Commit 723739f

Browse files
committed
cmake : build normal ggml library (not object library) [no ci]
1 parent c7c18f3 commit 723739f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

ggml/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
207207
install(TARGETS ggml PUBLIC_HEADER)
208208

209209
if (BUILD_SHARED_LIBS)
210-
install(TARGETS ggml_shared LIBRARY)
210+
install(TARGETS ggml LIBRARY)
211211
endif()
212212

213213
if (GGML_METAL)

ggml/src/CMakeLists.txt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ if (GGML_KOMPUTE)
570570

571571
find_package(Vulkan COMPONENTS glslc REQUIRED)
572572
find_program(glslc_executable NAMES glslc HINTS Vulkan::glslc)
573+
573574
if (NOT glslc_executable)
574575
message(FATAL_ERROR "glslc not found")
575576
endif()
@@ -1129,7 +1130,7 @@ endif()
11291130

11301131
# ggml
11311132

1132-
add_library(ggml OBJECT
1133+
add_library(ggml
11331134
../include/ggml.h
11341135
../include/ggml-alloc.h
11351136
../include/ggml-backend.h
@@ -1167,10 +1168,6 @@ if (MATH_LIBRARY)
11671168
target_link_libraries(ggml PRIVATE ${MATH_LIBRARY})
11681169
endif()
11691170

1170-
add_library(ggml_static STATIC $<TARGET_OBJECTS:ggml>)
1171-
11721171
if (BUILD_SHARED_LIBS)
11731172
set_target_properties(ggml PROPERTIES POSITION_INDEPENDENT_CODE ON)
1174-
add_library(ggml_shared SHARED $<TARGET_OBJECTS:ggml>)
1175-
target_link_libraries(ggml_shared PRIVATE Threads::Threads ${GGML_EXTRA_LIBS})
11761173
endif()

0 commit comments

Comments
 (0)