diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2020-10-26 13:24:46 +0100 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2020-11-05 01:47:06 +0100 |
commit | 70ff29e3d5e7d4f9f3edbe416d8718c7bafc674d (patch) | |
tree | f2adad30a9fcff02cfa1d0e504f2ab70f217cc4d /CMakeLists.txt | |
parent | ba122b767286cfd1a26f7f3f5390339fd020a3a8 (diff) | |
download | nncmpp-70ff29e3d5e7d4f9f3edbe416d8718c7bafc674d.tar.gz nncmpp-70ff29e3d5e7d4f9f3edbe416d8718c7bafc674d.tar.xz nncmpp-70ff29e3d5e7d4f9f3edbe416d8718c7bafc674d.zip |
Add a real manual page
Closes #3
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c52334d..1eaac55 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,19 +70,21 @@ install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) install (DIRECTORY contrib DESTINATION ${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}) -# Generate documentation from program help -find_program (HELP2MAN_EXECUTABLE help2man) -if (NOT HELP2MAN_EXECUTABLE) - message (FATAL_ERROR "help2man not found") +# Generate documentation from text markup +find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor) +if (NOT ASCIIDOCTOR_EXECUTABLE) + message (FATAL_ERROR "asciidoctor not found") endif () foreach (page ${PROJECT_NAME}) set (page_output "${PROJECT_BINARY_DIR}/${page}.1") list (APPEND project_MAN_PAGES "${page_output}") add_custom_command (OUTPUT ${page_output} - COMMAND ${HELP2MAN_EXECUTABLE} -N - "${PROJECT_BINARY_DIR}/${page}" -o ${page_output} - DEPENDS ${page} + COMMAND ${ASCIIDOCTOR_EXECUTABLE} -b manpage + -a release-version=${PROJECT_VERSION} + "${PROJECT_SOURCE_DIR}/${page}.adoc" + -o "${page_output}" + DEPENDS ${page}.adoc COMMENT "Generating man page for ${page}" VERBATIM) endforeach () |