[icinga-checkins] icinga.org: icinga2/next: Install HTML documentation in .../htdocs.

git at icinga.org git at icinga.org
Sun Nov 3 17:22:05 CET 2013


Module: icinga2
Branch: next
Commit: a7980466c729fc88c45086e9f0f551f2422fe8a1
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=a7980466c729fc88c45086e9f0f551f2422fe8a1

Author: Gunnar Beutner <gunnar at beutner.name>
Date:   Sun Nov  3 18:19:31 2013 +0100

Install HTML documentation in .../htdocs.

Refs #4992

---

 doc/CMakeLists.txt |   29 +++++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 5727d7e..35ca16a 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -15,14 +15,31 @@
 # along with this program; if not, write to the Free Software Foundation
 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-install(
-  DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-  DESTINATION ${CMAKE_INSTALL_DOCDIR}  FILES_MATCHING PATTERN *.md
-)
-
 if(UNIX OR CYGWIN)
+  # TODO: dependencies
+  add_custom_command(
+    OUTPUT index.html
+    COMMAND ./mkdoc.sh
+    ARGS > ${CMAKE_CURRENT_BINARY_DIR}/index.html.tmp
+    COMMAND ${CMAKE_COMMAND}
+    ARGS -E copy ${CMAKE_CURRENT_BINARY_DIR}/index.html.tmp ${CMAKE_CURRENT_BINARY_DIR}/index.html
+    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+  )
+
+  add_custom_target(index-html ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/index.html)
+
+  install(
+    FILES ${CMAKE_CURRENT_BINARY_DIR}/index.html jquery.min.js jquery.toc.min.js toc.css toc-margin.css toc-print.css
+    DESTINATION ${CMAKE_INSTALL_DOCDIR}/htdocs
+  )
+
+  install(
+    DIRECTORY strapdownjs
+    DESTINATION ${CMAKE_INSTALL_DOCDIR}/htdocs
+  )
+
   install(
     FILES icinga2.8
     DESTINATION ${CMAKE_INSTALL_MANDIR}/man8
   )
-endif()
\ No newline at end of file
+endif()





More information about the icinga-checkins mailing list