cmake: Fix ggml backend dependencies and installation (llama/11818)

* Fix dependencies between ggml and backends

ggml backends link only to ggml-base and ggml links to all backends.

* Fix installation of ggml backends

Set up GNUInstallDirs before setting the installation directory of ggml backends
This commit is contained in:
Vladimir Vuksanovic 2025-02-27 08:42:48 +01:00 committed by Georgi Gerganov
parent a0f76b2da7
commit 8255a830a8

View File

@ -212,6 +212,8 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
include(GNUInstallDirs)
# #
# build the library # build the library
# #
@ -235,7 +237,6 @@ endif ()
# install # install
# #
include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
# all public headers # all public headers