From 13b48144a6a3ebcfe0135c7c263d69b0c20872cb Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Tue, 19 Dec 2023 09:26:27 +0100 Subject: [PATCH] Doc: Fix configuration if qdoc is missing As is currently the case for our Debian/ARM binaries. It was failing when trying to make the html_docs_qtcreator target depend on the doc_attributions target, because the html_docs target is not created if qdoc is missing. Amends 2ce9f9d97daa2dfe018e58a8b61af643add4b612 Change-Id: Ia5b118d6d373f7cc131d6fb9a03555180509b9d4 Reviewed-by: Reviewed-by: Cristian Adam --- cmake/QtCreatorDocumentation.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/QtCreatorDocumentation.cmake b/cmake/QtCreatorDocumentation.cmake index f019404b575..b42bcc6f39e 100644 --- a/cmake/QtCreatorDocumentation.cmake +++ b/cmake/QtCreatorDocumentation.cmake @@ -272,6 +272,11 @@ function(add_qtc_documentation qdocconf_file) endfunction() function(add_qtc_doc_attribution target attribution_file output_file qdocconf_file) + set(html_target "html_docs_${doc_target}") + if (NOT TARGET ${html_target}) + # probably qdoc is missing, so other documentation targets are not there + return() + endif() get_filename_component(doc_target "${qdocconf_file}" NAME_WE) add_custom_target(${target} Qt6::qtattributionsscanner -o "${output_file}" ${attribution_file} @@ -281,5 +286,5 @@ function(add_qtc_doc_attribution target attribution_file output_file qdocconf_fi WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM ) - add_dependencies("html_docs_${doc_target}" ${target}) + add_dependencies(${html_target} ${target}) endfunction()