From: Andy Tai Date: Mon, 3 Jun 2024 08:06:24 +0000 (-0700) Subject: cmake : add pkg-config spec file for llama.cpp (#7702) X-Git-Tag: upstream/0.0.4488~1413 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=a10cda58d3199cd85305e0f03a8c6056714ae2e8;p=pkg%2Fggml%2Fsources%2Fllama.cpp cmake : add pkg-config spec file for llama.cpp (#7702) --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a9b33eaa..0f07f9a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1373,6 +1373,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 00000000..326acbb6 --- /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}