man page generation/packaging/installation with cmake

Viewed 3633

I am looking for some good examples / tutorials on how to generate, package, and install man pages in projects using CMake.

Thanks.

3 Answers

Maybe you would be interested in the following solution, which allows to generate and install man pages, written in Markdown or AsciiDoc:

https://github.com/rnpgp/cmake-modules/

To generate and install man page, written in Markdown, it would be as easy as add two lines to your CMakeLists.txt:

include(PandocMan)
add_pandoc_man("${CMAKE_CURRENT_SOURCE_DIR}/utility.1.md")

The same with AsciiDoc and AsciiDoctor:

include(AdocMan)
add_adoc_man("${CMAKE_CURRENT_SOURCE_DIR}/utility.1.adoc")
Related