]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
cmake : add pkg-config spec file for llama.cpp (#7702)
authorAndy Tai <redacted>
Mon, 3 Jun 2024 08:06:24 +0000 (01:06 -0700)
committerGitHub <redacted>
Mon, 3 Jun 2024 08:06:24 +0000 (11:06 +0300)
CMakeLists.txt
cmake/llama.pc.in [new file with mode: 0644]

index a9b33eaa1f60270a705d00087234d8e5fc6db4d7..0f07f9a53f1945f408ef01c28abbe3bfa61c7350 100644 (file)
@@ -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 (file)
index 0000000..326acbb
--- /dev/null
@@ -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}