From: Sam Spilsbury Date: Tue, 4 Jul 2023 17:35:13 +0000 (+0300) Subject: build : add pkg-config file (#335) X-Git-Tag: upstream/0.0.1642~1351 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=c2f8d3119391553f310f6b4c429d44cf53e98300;p=pkg%2Fggml%2Fsources%2Fggml build : add pkg-config file (#335) This makes it easier for other library consumers to find the library and link to it. Fixes #334 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c76cdb2..ba89d536 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 index 00000000..afa5c2f3 --- /dev/null +++ b/ggml.pc.in @@ -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