[PATCH] D23757: cmake: Support overriding Sphinx HTML doc install directory

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 21 03:06:21 PDT 2016


mgorny created this revision.
mgorny added a reviewer: rnk.
mgorny added a subscriber: llvm-commits.

Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to override Sphinx HTML doc install directory.

Bug: https://llvm.org/bugs/show_bug.cgi?id=23780

https://reviews.llvm.org/D23757

Files:
  cmake/modules/AddSphinxTarget.cmake

Index: cmake/modules/AddSphinxTarget.cmake
===================================================================
--- cmake/modules/AddSphinxTarget.cmake
+++ cmake/modules/AddSphinxTarget.cmake
@@ -53,8 +53,12 @@
                 DESTINATION share/man/man1)
 
       elseif (builder STREQUAL html)
-        install(DIRECTORY "${SPHINX_BUILD_DIR}"
-                DESTINATION "share/doc/${project}")
+        string(TOUPPER "${project}" project_upper)
+        set(${project_upper}_INSTALL_HTML "share/doc/${project}/html"
+            CACHE STRING "HTML documentation install directory for ${project}")
+
+        install(DIRECTORY "${SPHINX_BUILD_DIR}/."
+                DESTINATION "${${project_upper}_INSTALL_HTML}")
       else()
         message(WARNING Installation of ${builder} not supported)
       endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23757.68808.patch
Type: text/x-patch
Size: 815 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160821/7c0bce1f/attachment.bin>


More information about the llvm-commits mailing list