From f4760b48bb994050afeffa5426671bc110cdcc8b Mon Sep 17 00:00:00 2001 From: Craig Scott Date: Tue, 7 Sep 2021 14:31:05 +1000 Subject: [PATCH] Fix top level builds failing with AUTOMOC-related missing moc exe In top level builds, qt_autogen_tools() needs to be called on any target that enables AUTOMOC. A previous commit fixed that problem for the qt_target_qml_sources_example target, but missed also fixing it for the associated plugin target. Add that missed call here. More examples that use the common "shared" quick directory have also since been added, but the step that ensures qt_autogen_tools() was missed. Add them to the missing step. One of the existing steps also had a typo, which meant it wasn't handled either, so correct that as well. Amends 067253fb2f1aec3e03c577dd53ed2e6d903c28da Task-number: QTBUG-96118 Task-number: QTBUG-96159 Change-Id: I2fae5d9a1fd474b22e01ec51d5b1030237f3e08f Reviewed-by: Joerg Bornemann (cherry picked from commit 215dea1bfc113b792cb167e0359d36f9250e3d21) Reviewed-by: Qt Cherry-pick Bot --- examples/quick/CMakeLists.txt | 8 +++++++- src/qml/CMakeLists.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt index 7dd76afd21..734195e0f7 100644 --- a/examples/quick/CMakeLists.txt +++ b/examples/quick/CMakeLists.txt @@ -41,7 +41,13 @@ endif() # qt_examples_build_end() misses at least some of these due to some # source subdirectories being added multiple times. See QTBUG-96159. set(reused_dir_targets - view_shared + animation_shared + canvas_shared + views_shared + positioners_shared + righttoleft_shared + text_shared + threading_shared touchinteraction_shared window_shared shapes_shared diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index b2fea1d590..467f0638bd 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -688,4 +688,5 @@ qt_internal_add_docs(Qml if(QT_FEATURE_private_tests AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.19") add_subdirectory(doc/snippets/cmake/qt_target_qml_sources) qt_autogen_tools(qt_target_qml_sources_example ENABLE_AUTOGEN_TOOLS moc) + qt_autogen_tools(qt_target_qml_sources_exampleplugin ENABLE_AUTOGEN_TOOLS moc) endif()