diff options
-rw-r--r-- | cmake/modules/AddSphinxTarget.cmake | 7 |
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) |