fix sanitizers build

This commit is contained in:
slaren 2024-11-13 21:31:57 +01:00
parent 796f05be62
commit e503ad101d
2 changed files with 3 additions and 3 deletions

View file

@ -240,8 +240,7 @@ install(TARGETS ggml PUBLIC_HEADER)
if (BUILD_SHARED_LIBS) if (BUILD_SHARED_LIBS)
install(TARGETS ggml LIBRARY) install(TARGETS ggml LIBRARY)
get_target_property(GGML_LINK_LIBRARIES ggml LINK_LIBRARIES) install(TARGETS ggml-base LIBRARY)
install(TARGETS ${GGML_LINK_LIBRARIES} LIBRARY)
endif() endif()
# FIXME: this should be done in the backend cmake files # FIXME: this should be done in the backend cmake files

View file

@ -237,6 +237,7 @@ function(ggml_add_backend backend)
if (${BUILD_SHARED_LIBS}) if (${BUILD_SHARED_LIBS})
target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD) target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED) target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED)
install(TARGETS ${backend_target} LIBRARY)
endif() endif()
target_link_libraries(ggml PUBLIC ${backend_target}) target_link_libraries(ggml PUBLIC ${backend_target})
string(TOUPPER "GGML_USE_${backend}" backend_use) string(TOUPPER "GGML_USE_${backend}" backend_use)