From c841bd512c339784e81a35d4df88ec751adc9463 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Sat, 1 Dec 2018 14:10:03 +0100
Subject: [PATCH] doc: Build doc with cmake
Run `make doc` inside the cmake build folder.
The html output is installed to
${CMAKE_INSTALL_PREFIX}/share/doc/polybar
---
doc/CMakeLists.txt | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3ed6c45c..37a53f09 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -92,3 +92,15 @@ install(FILES config
COMPONENT config)
# }}}
+
+# Documentation {{{
+
+add_custom_target(doc ALL
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/doc
+ COMMAND make html)
+
+install(DIRECTORY build/html/
+ DESTINATION share/doc/polybar
+ COMPONENT doc)
+
+# }}}