summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2016-09-27 19:52:29 +0000
committerMichal Gorny <mgorny@gentoo.org>2016-09-27 19:52:29 +0000
commit5b0f4e96ec204e2f67f883f064a51c21e0b111f5 (patch)
tree92541a8e53e996df6d38dec1f125f81796746a92 /docs
parent66a39342c2cd245ca7faab04da0fad9b94a61b5a (diff)
[cmake] Support overriding remaining HTML doc install directories
Support overriding the Doxygen & OCamldoc install directories, and provide a more FHS-compliant defaults for both of them. This extends r282240 that added this override for Sphinx-built documentation. LLVM_INSTALL_DOXYGEN_HTML_DIR and LLVM_INSTALL_OCAMLDOC_HTML_DIR are added, to control the location where Doxygen-generated and OCamldoc-generated HTML docs are installed appropriately. They both specify CMake-style install paths, and therefore can either by relative to the install prefix or absolute. The new defaults are subdirectories of share/doc/llvm, and replace the previous directories of 'docs/html' and 'docs/ocaml/html' that resulted in creating invalid '/usr/docs' that furthermore lacked proper namespacing for the LLVM package. The new defaults are consistent with the ones used for Sphinx HTML documentation, differing only in the last component. Since the 'html' subdirectory is already used for Sphinx docs, the 'doxygen-html' and 'ocaml-html' directories are used instead. Differential Revision: https://reviews.llvm.org/D24935 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282536 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/CMake.rst10
-rw-r--r--docs/CMakeLists.txt14
2 files changed, 20 insertions, 4 deletions
diff --git a/docs/CMake.rst b/docs/CMake.rst
index 9e7967cf395..7dc475be70b 100644
--- a/docs/CMake.rst
+++ b/docs/CMake.rst
@@ -431,6 +431,11 @@ LLVM-specific variables
Uses .svg files instead of .png files for graphs in the Doxygen output.
Defaults to OFF.
+**LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
+ The path to install Doxygen-generated HTML documentation to. This path can
+ either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+ `share/doc/llvm/doxygen-html`.
+
**LLVM_ENABLE_SPHINX**:BOOL
If specified, CMake will search for the ``sphinx-build`` executable and will make
the ``SPHINX_OUTPUT_HTML`` and ``SPHINX_OUTPUT_MAN`` CMake options available.
@@ -461,6 +466,11 @@ LLVM-specific variables
either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
`share/doc/llvm/html`.
+**LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
+ The path to install OCamldoc-generated HTML documentation to. This path can
+ either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
+ `share/doc/llvm/ocaml-html`.
+
**LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
OS X Only: If enabled CMake will generate a target named
'install-xcode-toolchain'. This target will create a directory at
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 55d867f247d..ad2178dc587 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -93,8 +93,11 @@ if (LLVM_ENABLE_DOXYGEN)
endif()
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
- DESTINATION docs/html)
+ # ./ suffix is needed to copy the contents of html directory without
+ # appending html/ into LLVM_INSTALL_DOXYGEN_HTML_DIR.
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html/.
+ COMPONENT doxygen-html
+ DESTINATION "${LLVM_INSTALL_DOXYGEN_HTML_DIR}")
endif()
endif()
endif()
@@ -154,7 +157,10 @@ if( NOT uses_ocaml LESS 0 AND LLVM_ENABLE_OCAMLDOC )
add_dependencies(ocaml_doc ${doc_targets})
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
- install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
- DESTINATION docs/ocaml/html)
+ # ./ suffix is needed to copy the contents of html directory without
+ # appending html/ into LLVM_INSTALL_OCAMLDOC_HTML_DIR.
+ install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html/.
+ COMPONENT ocamldoc-html
+ DESTINATION "${LLVM_INSTALL_OCAMLDOC_HTML_DIR}")
endif()
endif()