cmark

My personal build of CMark ✏️

Commit
b2befa48e38a9738c97501e180d1296e3323b4a9
Parent
cfb756f918aad3ef7714f75a06210e564ecb90f9
Author
John MacFarlane <fiddlosopher@gmail.com>
Date

Create pkg-config file as part of build procedure.

Closes #234.

Diffstat

2 files changed, 15 insertions, 0 deletions

Status File Name N° Changes Insertions Deletions
Modified src/CMakeLists.txt 5 5 0
Added src/libcmark.pc.in 10 10 0
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
@@ -60,6 +60,11 @@ else(MSVC)
                         ${CMAKE_CURRENT_SOURCE_DIR}/scanners.re )
 endif(MSVC)
 
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libcmark.pc.in
+  ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libcmark.pc
+  DESTINATION lib/pkgconfig)
+
 include (GenerateExportHeader)
 
 add_executable(${PROGRAM} ${PROGRAM_SOURCES})
diff --git a/src/libcmark.pc.in b/src/libcmark.pc.in
@@ -0,0 +1,10 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_PREFIX@/lib
+includedir=@CMAKE_INSTALL_PREFIX@/include
+
+Name: libcmark
+Description: CommonMark parsing, rendering, and manipulation
+Version: @PROJECT_VERSION@
+Libs: -L${libdir} -lcmark
+Cflags: -I${includedir}