aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-09-04 23:33:17 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-09-05 03:51:36 +0200
commit2962a644da2faef651e5878090f2357e4f0fd13b (patch)
tree2341fc3bcc6a0088c7533f4ed1d7b738e8526fa9 /CMakeLists.txt
parent6f5ef30293c3a31d86e2ba6bec7ae0d8ef9cafc8 (diff)
downloadjson-rpc-shell-2962a644da2faef651e5878090f2357e4f0fd13b.tar.gz
json-rpc-shell-2962a644da2faef651e5878090f2357e4f0fd13b.tar.xz
json-rpc-shell-2962a644da2faef651e5878090f2357e4f0fd13b.zip
Write a nice new man page in AsciiDoc
Taking some preliminary steps for inclusion in Linux distributions. The help message has been slightly improved and the README extended, with part of it now residing in the man page. One less GNU dependency, for what it's worth.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt19
1 files changed, 11 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 53acd44..09b50a0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -87,18 +87,20 @@ install (PROGRAMS json-format.pl 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)
+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)
@@ -111,7 +113,8 @@ foreach (page ${project_MAN_PAGES})
endforeach (page)
# CPack
-set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Shell for running JSON-RPC 2.0 queries")
+set (CPACK_PACKAGE_DESCRIPTION_SUMMARY
+ "A shell for running JSON-RPC 2.0 queries")
set (CPACK_PACKAGE_VENDOR "Premysl Eric Janouch")
set (CPACK_PACKAGE_CONTACT "Přemysl Eric Janouch <p@janouch.name>")
set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")