aboutsummaryrefslogtreecommitdiff
path: root/man/CMakeLists.txt
blob: 29bb19c4046db61e8617a2a3479449a5c2202f3d (plain)
  1. set(MANDEST ${CMAKE_CURRENT_BINARY_DIR})
  2. file(MAKE_DIRECTORY ${MANDEST}/man1)
  3. add_custom_target(doc ALL
  4. DEPENDS ${MANDEST}/man1/cmark.1
  5. )
  6. add_custom_command(OUTPUT ${MANDEST}/man1/cmark.1
  7. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmark.1.md
  8. COMMAND pandoc "-s" "-t" "man"
  9. ${CMAKE_CURRENT_SOURCE_DIR}/cmark.1.md
  10. -o ${MANDEST}/man1/cmark.1
  11. VERBATIM)
  12. INSTALL(FILES ${MANDEST}/man1/cmark.1 DESTINATION share/man/man1)
  13. # TODO: create cmark.3 man page.
  14. # file(MAKE_DIRECTORY ${MANDEST}/man3)
  15. # INSTALL(FILES ${MANDEST}/man3/cmark.3 DESTINATION share/man/man3)