From 4ceff5a979d91ed1855083c550b8b019a7d6ccab Mon Sep 17 00:00:00 2001 From: grencez Date: Sat, 22 Apr 2023 06:37:26 -0700 Subject: [PATCH] cmake : add install step for libllama and llama.h This helps dependent CMake projects find the lib and header when they pull in llama.cpp with ExternalProject_Add(). --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11ebe9eb6..0987a76d0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -338,6 +338,10 @@ if (GGML_CUDA_SOURCES) set_property(TARGET llama PROPERTY CUDA_ARCHITECTURES OFF) endif() +# Install step is convenient for dependent CMake projects. +set_target_properties(llama PROPERTIES PUBLIC_HEADER "llama.h") +install(TARGETS llama) + # # programs, examples and tests