diff options
author | John MacFarlane <[email protected]> | 2014-12-17 11:16:49 -0800 |
---|---|---|
committer | John MacFarlane <[email protected]> | 2014-12-17 11:18:39 -0800 |
commit | 0479ddaeb0f54f960db0537ee1f39702ae400eb8 (patch) | |
tree | 1ff1f7843a226be874e667e29aa0888ba4c95fe4 /man/CMakeLists.txt | |
parent | 9bd750ff2dda8fe1fd013bfb749bc2a8038b1c3c (diff) |
Create cmark.3 in cmake build process.
Remove it from the repository. Closes #241.
Diffstat (limited to 'man/CMakeLists.txt')
-rw-r--r-- | man/CMakeLists.txt | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index afb8711..2c3f5ef 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -1,5 +1,26 @@ -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 +if (NOT MSVC) + add_custom_target(man ALL + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/cmark.3 + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/cmark.1 + ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark.3 + DEPENDS ${CMAKE_SOURCE_DIR}/src/cmark.h + COMMAND python ${CMAKE_CURRENT_SOURCE_DIR}/make_man_page.py + ${CMAKE_SOURCE_DIR}/src/cmark.h > + ${CMAKE_CURRENT_BINARY_DIR}/cmark.3 + ) + add_custom_command( + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cmark.1 + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 + COMMAND cp + ${CMAKE_CURRENT_SOURCE_DIR}/man1/cmark.1 + ${CMAKE_CURRENT_BINARY_DIR}/cmark.1 + ) +endif(NOT MSVC) + +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmark.1 DESTINATION share/man/man1) -INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/man3/cmark.3 +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmark.3 DESTINATION share/man/man3)
\ No newline at end of file |