Skip to content

Commit

Permalink
Merge pull request #146 from fd00/pkg-config
Browse files Browse the repository at this point in the history
Add yyjson.pc
  • Loading branch information
ibireme authored Dec 5, 2023
2 parents e716cb7 + e0bacd5 commit 913db57
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ install(EXPORT yyjson-targets
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/yyjson")
install(FILES src/yyjson.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")

configure_file(yyjson.pc.in ${CMAKE_BINARY_DIR}/yyjson.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/yyjson.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)


# ------------------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions yyjson.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
includedir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_INCLUDEDIR@

Name: yyjson
Description: Fastest JSON library in C
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lyyjson
Cflags: -I${includedir}

0 comments on commit 913db57

Please sign in to comment.