aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt26
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
+)