diff options
| author | Drew DeVault <sir@cmpwn.com> | 2015-08-17 21:25:58 -0400 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2015-08-17 21:25:58 -0400 |
| commit | 4b64e481a807bd97b12c29a7ce5044e5de5fc21d (patch) | |
| tree | 4885d125a5028d3e2d23bf73c4c8ff7c952d4ce6 /CMakeLists.txt | |
| parent | 780893a9338fe948cbb12c3b0ce3942ec8001ccf (diff) | |
Add man pages
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 27839b1d..9a49c169 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,3 +43,29 @@ INSTALL( FILES ${PROJECT_SOURCE_DIR}/config DESTINATION /etc/sway/ ) + +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.1 + COMMAND a2x --no-xmllint --doctype manpage --format manpage + -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR}/sway.1.txt + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sway.1.txt +) + +ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.5 + COMMAND a2x --no-xmllint --doctype manpage --format manpage + -D ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ${CMAKE_CURRENT_SOURCE_DIR}/sway.5.txt + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/sway.5.txt +) + +ADD_CUSTOM_TARGET(man ALL + DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.1 + DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.5) + +INSTALL( + FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.1 + DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1 +) + +INSTALL( + FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/sway.5 + DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man5 +) |
