Allow users to override the documentation install directory.

This is needed for multiarch layouts where the prefix is /usr/${host}
but where arch-independent files are installed to /usr/share.

Change-Id: Icec01f8ea927594b4edb26997d6384e478415999
This commit is contained in:
Niels Ole Salscheider
2016-01-08 14:27:36 +01:00
parent 15587dd1a9
commit 1f20b72afd
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -686,6 +686,9 @@ include_directories(BEFORE ${CMAKE_BINARY_DIR}/config)
add_subdirectory(internal/ceres)
if (BUILD_DOCUMENTATION)
set(CERES_DOCS_INSTALL_DIR "share/doc/ceres" CACHE STRING
"Ceres docs install path relative to CMAKE_INSTALL_PREFIX")
find_package(Sphinx QUIET)
if (NOT SPHINX_FOUND)
message("-- Failed to find Sphinx, disabling build of documentation.")
+1 -1
View File
@@ -5,7 +5,7 @@ set(SPHINX_HTML_DIR "${CMAKE_BINARY_DIR}/docs/html")
# Install documentation
install(DIRECTORY ${SPHINX_HTML_DIR}
DESTINATION share/doc/ceres
DESTINATION "${CERES_DOCS_INSTALL_DIR}"
COMPONENT Doc
PATTERN "${SPHINX_HTML_DIR}/*")