]> git.djapps.eu Git - pkg/ggml/sources/ggml/commitdiff
build : add pkg-config file (#335)
authorSam Spilsbury <redacted>
Tue, 4 Jul 2023 17:35:13 +0000 (20:35 +0300)
committerGitHub <redacted>
Tue, 4 Jul 2023 17:35:13 +0000 (20:35 +0300)
This makes it easier for other library consumers to find
the library and link to it.

Fixes #334

CMakeLists.txt
ggml.pc.in [new file with mode: 0644]

index 6c76cdb2008aab2fc33e756348a6bde4eca15644..ba89d536a1c5d02fe26f70dcab5601a6d414ea5b 100644 (file)
@@ -76,3 +76,9 @@ endif ()
 if (GGML_BUILD_EXAMPLES)
     add_subdirectory(examples)
 endif ()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/ggml.pc.in
+               ${CMAKE_CURRENT_BINARY_DIR}/ggml.pc
+               @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ggml.pc
+        DESTINATION share/pkgconfig)
diff --git a/ggml.pc.in b/ggml.pc.in
new file mode 100644 (file)
index 0000000..afa5c2f
--- /dev/null
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+includrdir=${prefix}/include
+libdir=${prefix}/lib
+
+Name: ggml
+Description: The GGML Tensor Library for Machine Learning
+Version: 0.0.0
+Cflags: -I${includedir}/ggml
+Libs: -L${libdir} -lggml