Skip to content

Commit 03fc488

Browse files
authored
chore: add pkg-config support (#5)
1 parent 01e174b commit 03fc488

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,17 @@ set(
165165
)
166166
mark_as_advanced(MERVE_INSTALL_CMAKEDIR)
167167

168+
configure_file(
169+
"${PROJECT_SOURCE_DIR}/merve.pc.in"
170+
"${PROJECT_BINARY_DIR}/merve.pc"
171+
@ONLY
172+
)
173+
install(
174+
FILES "${PROJECT_BINARY_DIR}/merve.pc"
175+
DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig"
176+
COMPONENT nbytes_development
177+
)
178+
168179
install(
169180
FILES
170181
"${PROJECT_BINARY_DIR}/merve-config.cmake"

merve.pc.in

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
prefix=@CMAKE_INSTALL_PREFIX@
2+
exec_prefix=${prefix}
3+
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
4+
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
5+
6+
Name: merve
7+
Description: Lexer to extract named exports via analysis from CommonJS modules
8+
Version: @PROJECT_VERSION@
9+
Libs: -L${libdir} -lmerve
10+
Cflags: -I${includedir}

0 commit comments

Comments
 (0)