From b1138180cc5b81ca0ac7c251e97bc3b0c21ea872 Mon Sep 17 00:00:00 2001 From: Venugopal Shivashankar Date: Tue, 23 Jan 2024 13:43:12 +0100 Subject: [PATCH] CMake: Enable overriding the QT_INSTALL_DOCS environment variable The QT_INSTALL_DOCS is configured with incorrect path sometimes, especially while configuring qtbase with QT_HOST_PATH, which also lets you build documentation for the essential modules such as QtCore, QtGui, and so on. If the default QT_INSTALL_DOCS path is wrong, a way to override the path would enable building documentation for the essential modules without having to build parts of qtbase. Change-Id: I686e0bc103f9722aa98f3c02d2a5af9e645cc9d9 Done-with: Topi Reinio Task-number: QTBUG-121459 Reviewed-by: Alexandru Croitor (cherry picked from commit 5f6f4903a63976fce6468098008318ebeca15cb3) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtDocsHelpers.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/QtDocsHelpers.cmake b/cmake/QtDocsHelpers.cmake index 3ce7b3846c4..155c8ba763d 100644 --- a/cmake/QtDocsHelpers.cmake +++ b/cmake/QtDocsHelpers.cmake @@ -117,7 +117,9 @@ function(qt_internal_add_docs) ) endif() - if(QT_SUPERBUILD OR "${PROJECT_NAME}" STREQUAL "QtBase") + if(DEFINED ENV{QT_INSTALL_DOCS}) + set(qt_install_docs_env "$ENV{QT_INSTALL_DOCS}") + elseif(QT_SUPERBUILD OR "${PROJECT_NAME}" STREQUAL "QtBase") set(qt_install_docs_env "${QtBase_BINARY_DIR}/${INSTALL_DOCDIR}") else() set(qt_install_docs_env "${QT_BUILD_INTERNALS_RELOCATABLE_INSTALL_PREFIX}/${INSTALL_DOCDIR}")