summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorJonathan Roelofs <jonathan@codesourcery.com>2017-04-05 14:49:46 +0000
committerJonathan Roelofs <jonathan@codesourcery.com>2017-04-05 14:49:46 +0000
commit50982d318ed12d42d789fe9445820eeeaedc1d9d (patch)
tree35d5e4122a76c61ee76ed7494ef792ffb64d8742 /cmake
parent4561efc963fa87c8225e659ede3fee8a554953a5 (diff)
Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages
This is a re-work of r297516, which was reverted in r297545. https://reviews.llvm.org/D30906 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299547 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/AddSphinxTarget.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/modules/AddSphinxTarget.cmake b/cmake/modules/AddSphinxTarget.cmake
index 3456b536e80a..cfc7f38e9e77 100644
--- a/cmake/modules/AddSphinxTarget.cmake
+++ b/cmake/modules/AddSphinxTarget.cmake
@@ -48,10 +48,15 @@ function (add_sphinx_target builder project)
# Handle installation
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if (builder STREQUAL man)
+ if (CMAKE_INSTALL_MANDIR)
+ set(INSTALL_MANDIR ${CMAKE_INSTALL_MANDIR}/)
+ else()
+ set(INSTALL_MANDIR share/man/)
+ endif()
# FIXME: We might not ship all the tools that these man pages describe
install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
COMPONENT "${project}-sphinx-man"
- DESTINATION share/man/man1)
+ DESTINATION ${INSTALL_MANDIR}man1)
elseif (builder STREQUAL html)
string(TOUPPER "${project}" project_upper)