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

@ -239,9 +239,8 @@ set_target_properties(ggml PROPERTIES PUBLIC_HEADER "${GGML_PUBLIC_HEADERS}")
install(TARGETS ggml PUBLIC_HEADER)
if (BUILD_SHARED_LIBS)
install(TARGETS ggml LIBRARY)
get_target_property(GGML_LINK_LIBRARIES ggml LINK_LIBRARIES)
install(TARGETS ${GGML_LINK_LIBRARIES} LIBRARY)
install(TARGETS ggml LIBRARY)
install(TARGETS ggml-base LIBRARY)
endif()
# 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})
target_compile_definitions(${backend_target} PRIVATE GGML_BACKEND_BUILD)
target_compile_definitions(${backend_target} PUBLIC GGML_BACKEND_SHARED)
install(TARGETS ${backend_target} LIBRARY)
endif()
target_link_libraries(ggml PUBLIC ${backend_target})
string(TOUPPER "GGML_USE_${backend}" backend_use)