From 17f9e3fade9b6888cc7420e371f4ee0da812557e Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 3 May 2021 15:15:36 +0200 Subject: [PATCH] let the cmake build of documentation act identical to makefile cmake build of documentation is not adding the same options that plain old makefile fix incoherency Signed-off-by: Matthieu Gallien --- doc/CMakeLists.txt | 12 ++++++------ doc/conf.py.in | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index d254636c9536d..c50513cb4a557 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -1,4 +1,9 @@ if(SPHINX_FOUND) + set(SPHINXOPTS ) + set(PAPER ) + set(PAPEROPT_a4 -D latex_paper_size=a4) + set(PAPEROPT_letter -D latex_paper_size=letter) + set(ALLSPHINXOPTS -d ${CMAKE_CURRENT_BINARY_DIR}/doctrees ${PAPEROPT_${PAPER}} ${SPHINXOPTS} ${CMAKE_CURRENT_SOURCE_DIR}) # Sphinx cache with pickled ReST documents set(SPHINX_CACHE_DIR "${CMAKE_CURRENT_BINARY_DIR}/_doctrees") @@ -70,12 +75,7 @@ if(SPHINX_FOUND) -D html_theme=owncloud_org ${CMAKE_CURRENT_SOURCE_DIR} ${SPHINX_HTML_DIR}/org ) - add_custom_target( doc-html-com ${SPHINX_EXECUTABLE} - -q -c . -b html - -d ${SPHINX_CACHE_DIR}/html - -D html_theme=owncloud_com - ${CMAKE_CURRENT_SOURCE_DIR} - ${SPHINX_HTML_DIR}/com ) + add_custom_target(doc-html-com ${SPHINX_EXECUTABLE} -c ${CMAKE_CURRENT_BINARY_DIR} -b html -D html_theme='nextcloud_com' ${ALLSPHINXOPTS} ${SPHINX_HTML_DIR}/com) ## Building CHM files requires HTML Help Workshop. Since it requires wine ## with special dependencies, it's impossible to write a cmake check for it. diff --git a/doc/conf.py.in b/doc/conf.py.in index 0cf33662e7b87..abcb1228ab248 100644 --- a/doc/conf.py.in +++ b/doc/conf.py.in @@ -99,7 +99,7 @@ pygments_style = 'sphinx' #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = ['_shared_assets/themes'] +html_theme_path = ['@CMAKE_CURRENT_SOURCE_DIR@/_shared_assets/themes'] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes.