mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 08:34:37 +08:00
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:
@@ -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.")
|
||||
|
||||
@@ -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}/*")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user