From 5cb95590b00c7190eaeb5a66b9dab4c6d45c945a Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Mon, 26 Oct 2020 13:24:46 +0100 Subject: WIP: Add a real manual page WIP: need to actually write it WIP: some content may be eligible to be moved from the README Closes #3 --- CMakeLists.txt | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 15f769d..64afffc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -63,19 +63,21 @@ include (GNUInstallDirs) install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR}) install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR}) -# Generate documentation from program help -find_program (HELP2MAN_EXECUTABLE help2man) -if (NOT HELP2MAN_EXECUTABLE) - message (FATAL_ERROR "help2man not found") -endif (NOT HELP2MAN_EXECUTABLE) +# Generate documentation from text markup +find_program (ASCIIDOCTOR_EXECUTABLE asciidoctor) +if (NOT ASCIIDOCTOR_EXECUTABLE) + message (FATAL_ERROR "asciidoctor not found") +endif (NOT ASCIIDOCTOR_EXECUTABLE) 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 (page) -- cgit v1.2.3-70-g09d2