summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2022-02-08 14:41:21 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-02-08 15:50:23 +0000
commitfb0fb3da3be2549bfabc9ea339c98944edfcf682 (patch)
treeb97e1417bec52bd4fe9cbc1ca00efaec01b5d028
parentb48fa2a63becd74b32a2c503201685f29e0879cb (diff)
downloadqttools-fb0fb3da3be2549bfabc9ea339c98944edfcf682.tar.gz
Fix the 'generatedOutput' qdoc test
Add the config-related subfolder to the 'qdocincludepaths.inc' path. Also add the missing dependency to Qt::qdoc target, since the test implicitly uses the qdoc binary. Fixes: QTBUG-100308 Change-Id: I2adc8be9d8718967ac2719d528e67bcae8f0ea3b Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 74ed1a3aafcd8773be812d36838360961ee311db) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--tests/auto/qdoc/generatedoutput/CMakeLists.txt10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/auto/qdoc/generatedoutput/CMakeLists.txt b/tests/auto/qdoc/generatedoutput/CMakeLists.txt
index c1a4cd79e..20bf8833b 100644
--- a/tests/auto/qdoc/generatedoutput/CMakeLists.txt
+++ b/tests/auto/qdoc/generatedoutput/CMakeLists.txt
@@ -12,8 +12,14 @@ qt_internal_add_test(tst_generatedOutput
)
# Write relevant Qt include path to a file, to be read in by QDoc
+set(config_subfolder "")
+get_cmake_property(is_multi_config GENERATOR_IS_MULTI_CONFIG)
+if(is_multi_config)
+ set(config_subfolder "$<CONFIG>/")
+endif()
+set(includepathsfile "${CMAKE_CURRENT_BINARY_DIR}/${config_subfolder}qdocincludepaths.inc")
set(framework_path "\n")
-set(includepathsfile "${CMAKE_CURRENT_BINARY_DIR}/qdocincludepaths.inc")
+
find_package(Qt6 COMPONENTS Core REQUIRED)
if(Qt6Core_FOUND)
get_target_property(include_paths Qt6::Core INTERFACE_INCLUDE_DIRECTORIES)
@@ -29,3 +35,5 @@ endwhile()
set (include_paths "$<TARGET_PROPERTY:tst_generatedOutput,INCLUDE_DIRECTORIES>")
file(GENERATE OUTPUT ${includepathsfile} CONTENT "-I$<JOIN:${include_paths},\n-I>${framework_path}")
+
+add_dependencies(tst_generatedOutput Qt::qdoc)