From b4f4ad71e4356de4d2dd0e8bc2542c26ab9efdda Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 3 Jan 2024 07:40:16 +0100 Subject: [PATCH] Allow configuring the qtbase documentation-only build Use the QT_SUPERBUILD procedure when configuring the qtbase documentation-only build. This only makes sense for qtbase since we disallow building it using existing Qt installation. Other repositories should be configured using qt-configure-module script from the existing Qt installation and simply run 'ninja docs'. Fixes: QTBUG-120485 Change-Id: Iafed5c17bea5c61edc239f08045922497215fb73 Reviewed-by: Joerg Bornemann (cherry picked from commit 02a556674f0b3f04de5ab09dca53ed8e86a8ba06) Reviewed-by: Qt Cherry-pick Bot (cherry picked from commit 4b662e9a921bd409c6e03bf7f13eabd3c54a87b2) (cherry picked from commit 8c11609f441450414a3c3e240f91834a8a043efa) --- cmake/QtDocsHelpers.cmake | 2 +- doc/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake index 48ed5a324bf..a97fea169fb 100644 --- a/cmake/QtDocsHelpers.cmake +++ b/cmake/QtDocsHelpers.cmake @@ -117,7 +117,7 @@ function(qt_internal_add_docs) ) endif() - if(QT_SUPERBUILD) + if(QT_SUPERBUILD OR "${PROJECT_NAME}" STREQUAL "QtBase") set(qt_install_docs_env "${QtBase_BINARY_DIR}/${INSTALL_DOCDIR}") elseif(QT_WILL_INSTALL) set(qt_install_docs_env "${CMAKE_INSTALL_PREFIX}/${INSTALL_DOCDIR}") diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index f27c5d4e2ee..bf99a1403cb 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -8,7 +8,7 @@ qt_path_join(doc_install_dir ${QT_INSTALL_DIR} ${INSTALL_DOCDIR}) foreach(dir global config) qt_copy_or_install(DIRECTORY ${dir} DESTINATION ${doc_install_dir}) - if(QT_SUPERBUILD) + if(QT_SUPERBUILD OR "${PROJECT_NAME}" STREQUAL "QtBase") qt_path_join(destination ${QtBase_BINARY_DIR} ${INSTALL_DOCDIR}) file(COPY ${dir} DESTINATION ${destination}) endif()