aboutsummaryrefslogtreecommitdiff
path: root/man/CMakeLists.txt
blob: a63421f7f6480883eb93cc542e9e49cddacb57c0 (plain)
  1. set(PYTHON python)
  2. if (NOT MSVC)
  3. add_custom_target(man ALL
  4. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
  5. DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/cmark.1
  6. )
  7. add_custom_command(
  8. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
  9. DEPENDS ${CMAKE_SOURCE_DIR}/src/cmark.h
  10. COMMAND ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/make_man_page.py
  11. ${CMAKE_SOURCE_DIR}/src/cmark.h >
  12. ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
  13. )
  14. add_custom_command(
  15. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark.1
  16. DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
  17. COMMAND cp
  18. ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1
  19. ${CMAKE_CURRENT_BINARY_DIR}/cmark.1
  20. )
  21. endif(NOT MSVC)
  22. INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmark.1
  23. DESTINATION share/man/man1)
  24. INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmark.3
  25. DESTINATION share/man/man3)