From 9fad5661c40497305cdec5a4aa51a8726675cf90 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Thu, 8 Nov 2018 13:38:20 +0100 Subject: Doc: Update the apidoc cmake step to copy shiboken doc htmls This way it is easier to publish the docs online as well as package it for offline use. Besides, updated the links to the sphinx projects so that the linking between them works. Change-Id: Id7494d5bc8adf95bfaaf25dedb58f3b07ac6dca4 Reviewed-by: Friedemann Kleint --- sources/pyside2/doc/CMakeLists.txt | 11 ++++++++++- sources/pyside2/doc/conf.py.in | 2 +- sources/shiboken2/doc/conf.py.in | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/sources/pyside2/doc/CMakeLists.txt b/sources/pyside2/doc/CMakeLists.txt index 5a78db453..428b83350 100644 --- a/sources/pyside2/doc/CMakeLists.txt +++ b/sources/pyside2/doc/CMakeLists.txt @@ -87,6 +87,16 @@ add_custom_target(qdoc add_custom_target(apidoc COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/rst COMMAND ${SHIBOKEN_PYTHON_INTERPRETER} ${SPHINX_BUILD} -b html ${CMAKE_CURRENT_BINARY_DIR}/rst html + #copying shiboken2 and ApiExtractor doc htmls + COMMENT "Copying over the Shiboken2 and ApiExtractor doc HTMLs..." + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken2 + COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken2/ApiExtractor + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_BINARY_DIR}/../../shiboken2/doc/html + ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken2 + COMMAND ${CMAKE_COMMAND} -E copy_directory + ${CMAKE_CURRENT_BINARY_DIR}/../../shiboken2/ApiExtractor/doc/html + ${CMAKE_CURRENT_BINARY_DIR}/html/shiboken2/ApiExtractor ) # create conf.py based on conf.py.in @@ -128,7 +138,6 @@ add_dependencies(docrsts qdoc) # COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_INSTALL_PREFIX}/share/devhelp/books" # COMMAND ${CMAKE_COMMAND} -E create_symlink "${CMAKE_INSTALL_PREFIX}/share/doc/${BINDING_NAME}/html" "${CMAKE_INSTALL_PREFIX}/share/devhelp/books/${BINDING_NAME}" # ) - #install files add_custom_target(apidocinstall COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX}/share/doc/PySide2-${BINDING_API_VERSION} && cp -rv ${CMAKE_CURRENT_BINARY_DIR}/html/* ${CMAKE_INSTALL_PREFIX}/share/doc/PySide-${BINDING_API_VERSION} diff --git a/sources/pyside2/doc/conf.py.in b/sources/pyside2/doc/conf.py.in index 2eb4e6bf3..dfbefee60 100644 --- a/sources/pyside2/doc/conf.py.in +++ b/sources/pyside2/doc/conf.py.in @@ -169,4 +169,4 @@ html_show_sourcelink = False # Link to the shiboken2 sphinx project to enable linking # between the two projects. -intersphinx_mapping = {'shiboken2': ('../../../shiboken2/doc/html','../../../shiboken2/doc/html/objects.inv')} +intersphinx_mapping = {'shiboken2': ('shiboken2','@CMAKE_BINARY_DIR@/../shiboken2/doc/html/objects.inv')} diff --git a/sources/shiboken2/doc/conf.py.in b/sources/shiboken2/doc/conf.py.in index 57c2f94b9..29517309d 100644 --- a/sources/shiboken2/doc/conf.py.in +++ b/sources/shiboken2/doc/conf.py.in @@ -159,4 +159,4 @@ html_show_sourcelink = False # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' -intersphinx_mapping = {'apiextractor': ('@CMAKE_BINARY_DIR@/ApiExtractor/doc/html','@CMAKE_BINARY_DIR@/ApiExtractor/doc/html/objects.inv')} +intersphinx_mapping = {'apiextractor': ('ApiExtractor','@CMAKE_BINARY_DIR@/ApiExtractor/doc/html/objects.inv')} -- cgit v1.2.3