From 017e210a9444cf3b16192e9e5f0a7177fd2fc0e3 Mon Sep 17 00:00:00 2001 From: Andy Tai Date: Sun, 2 Jun 2024 16:02:31 -0700 Subject: [PATCH] add pkg-config spec file for llama.cpp --- CMakeLists.txt | 7 +++++++ cmake/llama.pc.in | 10 ++++++++++ 2 files changed, 17 insertions(+) create mode 100644 cmake/llama.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 52b392a13..aeb3f5e17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1371,6 +1371,13 @@ if (LLAMA_METAL) endif() endif() +configure_file(cmake/llama.pc.in + "${CMAKE_CURRENT_BINARY_DIR}/llama.pc" + @ONLY) + +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/llama.pc" + DESTINATION lib/pkgconfig) + # # programs, examples and tests # diff --git a/cmake/llama.pc.in b/cmake/llama.pc.in new file mode 100644 index 000000000..326acbb61 --- /dev/null +++ b/cmake/llama.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: llama +Description: Port of Facebook's LLaMA model in C/C++ +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lllama +Cflags: -I${includedir}