Link ggml/ggml-base libraries to their targets

This commit is contained in:
Mason M 2025-01-23 15:10:04 -04:00
parent 817cff1d60
commit 1760b92f6f

View File

@ -15,6 +15,9 @@ find_library(GGML_LIBRARY ggml
NO_CMAKE_FIND_ROOT_PATH) NO_CMAKE_FIND_ROOT_PATH)
add_library(ggml::ggml UNKNOWN IMPORTED) add_library(ggml::ggml UNKNOWN IMPORTED)
set_target_properties(ggml::ggml
PROPERTIES
INTERFACE_LINK_LIBRARIES "${GGML_LIBRARY}")
find_library(GGML_BASE_LIBRARY ggml-base find_library(GGML_BASE_LIBRARY ggml-base
REQUIRED REQUIRED
@ -22,6 +25,9 @@ find_library(GGML_BASE_LIBRARY ggml-base
NO_CMAKE_FIND_ROOT_PATH) NO_CMAKE_FIND_ROOT_PATH)
add_library(ggml::ggml-base UNKNOWN IMPORTED) add_library(ggml::ggml-base UNKNOWN IMPORTED)
set_target_properties(ggml::ggml-base
PROPERTIES
INTERFACE_LINK_LIBRARIES "${GGML_BASE_LIBRARY}")
if (NOT GGML_SHARED_LIB) if (NOT GGML_SHARED_LIB)
if (APPLE AND GGML_ACCELERATE) if (APPLE AND GGML_ACCELERATE)