Index: cmake/modules/AddSphinxTarget.cmake =================================================================== --- cmake/modules/AddSphinxTarget.cmake +++ cmake/modules/AddSphinxTarget.cmake @@ -48,10 +48,15 @@ # 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)