Teach add_sphinx_target() to respect the LLVM_INSTALL_TOOLCHAIN_ONLY CMake

option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207450 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Liew 2014-04-28 22:06:20 +00:00
parent 9feea1a5a1
commit 00f0627f76

View File

@ -39,16 +39,18 @@ function (add_sphinx_target builder project)
add_dependencies(sphinx ${SPHINX_TARGET_NAME})
# Handle installation
if (builder STREQUAL man)
# FIXME: We might not ship all the tools that these man pages describe
install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
DESTINATION share/man/man1)
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
if (builder STREQUAL man)
# FIXME: We might not ship all the tools that these man pages describe
install(DIRECTORY "${SPHINX_BUILD_DIR}/" # Slash indicates contents of
DESTINATION share/man/man1)
elseif (builder STREQUAL html)
install(DIRECTORY "${SPHINX_BUILD_DIR}"
DESTINATION "share/doc/${project}")
else()
message(WARNING Installation of ${builder} not supported)
elseif (builder STREQUAL html)
install(DIRECTORY "${SPHINX_BUILD_DIR}"
DESTINATION "share/doc/${project}")
else()
message(WARNING Installation of ${builder} not supported)
endif()
endif()
endif()
endfunction()