blob: 3e57f0dcaa68cf1b880eb4a5713bdb85300d42bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
From 2ec240a76253839cd1c5dc2e964f55698ae468fc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Mon, 8 Jun 2015 06:43:00 +0200
Subject: [PATCH 2/4] cmake: Support overriding Sphinx HTML doc install
directory
Provide ${PROJECT}_INSTALL_HTML variables (e.g. LLVM_INSTALL_HTML) to
override Sphinx HTML doc install directory.
Fixes: https://llvm.org/bugs/show_bug.cgi?id=23780
---
cmake/modules/AddSphinxTarget.cmake | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index 045dc23..9c9c444 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -53,8 +53,12 @@ function (add_sphinx_target builder project)
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()
--
2.4.3
|