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