aboutsummaryrefslogtreecommitdiff
path: root/doc/CMakeLists.txt
blob: c1a5bf2f0a7a8734c80fe9d86f73c42b22f7e0a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
if(UNIX)

add_custom_target(manpage
    BYPRODUCTS "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz"
    COMMAND "asciidoctor" "--backend=manpage" "--out-file=${PROJECT_BINARY_DIR}/doc/smolbote.7" "${PROJECT_SOURCE_DIR}/doc/smolbote.7.asciidoc"
    COMMAND "gzip" "--force" "${PROJECT_BINARY_DIR}/doc/smolbote.7"
    WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc
)

install(FILES "${PROJECT_BINARY_DIR}/doc/smolbote.7.gz" DESTINATION man/man7 CONFIGURATIONS Release OPTIONAL)

endif(UNIX)