Skip to content

Commit

Permalink
build: Add pkg-config file
Browse files Browse the repository at this point in the history
This makes it easier for other library consumers to find
the library and link to it.

Fixes ggerganov#334
  • Loading branch information
smspillaz committed Jul 3, 2023
1 parent ebcf1a2 commit 74aeab1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
10 changes: 10 additions & 0 deletions ggml.pc.in
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 74aeab1

Please sign in to comment.