Skip to content

Commit

Permalink
use cmake to generate marisa.pc
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Dec 25, 2023
1 parent e523bdf commit 773766d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ install(
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/marisa
)

configure_file(marisa.pc.in "${CMAKE_CURRENT_BINARY_DIR}/marisa.pc" @ONLY)

install(
FILES
"${CMAKE_CURRENT_BINARY_DIR}/marisa.pc"
DESTINATION
"${CMAKE_INSTALL_LIBDIR}/pkgconfig"
)

install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/marisa-config.cmake
Expand Down
12 changes: 6 additions & 6 deletions marisa.pc.in
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
bindir=@bindir@
libdir=@libdir@
includedir=@includedir@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
bindir=${exec_prefix}/bin
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: Marisa
Description: Matching Algorithm with Recursively Implemented StorAge
Version: @VERSION@
Version: @CMAKE_PROJECT_VERSION@
Cflags: -I${includedir}
Libs: -L${libdir} -lmarisa

0 comments on commit 773766d

Please sign in to comment.