Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Add pkg-config file #335

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
build: Add pkg-config file
This makes it easier for other library consumers to find
the library and link to it.

Fixes #334
  • Loading branch information
smspillaz committed Jul 3, 2023
commit 02d03365f742db3c7bf25a14f21fda90d0c2d649
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