From c7df9da64e2ccf0913935bf65a5a90dffa3b3401 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 28 Jan 2026 20:00:50 +0100 Subject: [PATCH] chore: add pkg-config support --- CMakeLists.txt | 11 +++++++++++ merve.pc.in | 10 ++++++++++ 2 files changed, 21 insertions(+) create mode 100644 merve.pc.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 977799a..3207507 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -165,6 +165,17 @@ set( ) mark_as_advanced(MERVE_INSTALL_CMAKEDIR) +configure_file( + "${PROJECT_SOURCE_DIR}/merve.pc.in" + "${PROJECT_BINARY_DIR}/merve.pc" + @ONLY +) +install( + FILES "${PROJECT_BINARY_DIR}/merve.pc" + DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig" + COMPONENT nbytes_development +) + install( FILES "${PROJECT_BINARY_DIR}/merve-config.cmake" diff --git a/merve.pc.in b/merve.pc.in new file mode 100644 index 0000000..c9a8f83 --- /dev/null +++ b/merve.pc.in @@ -0,0 +1,10 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +Name: merve +Description: Lexer to extract named exports via analysis from CommonJS modules +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -lmerve +Cflags: -I${includedir}