From 1f20b72afd091bb163a147d8f67a70b2145cf6a0 Mon Sep 17 00:00:00 2001 From: Niels Ole Salscheider Date: Fri, 8 Jan 2016 14:27:36 +0100 Subject: [PATCH] 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 --- CMakeLists.txt | 3 +++ docs/source/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9b7e84112..bfeeaa330 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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.") diff --git a/docs/source/CMakeLists.txt b/docs/source/CMakeLists.txt index dd3ddcbf3..0f07a5b9e 100644 --- a/docs/source/CMakeLists.txt +++ b/docs/source/CMakeLists.txt @@ -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}/*")