diff options
-rw-r--r-- | examples/quick/CMakeLists.txt | 23 | ||||
-rw-r--r-- | src/qml/CMakeLists.txt | 3 |
2 files changed, 22 insertions, 4 deletions
diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt index 13f41b5a7d..d39bf5a830 100644 --- a/examples/quick/CMakeLists.txt +++ b/examples/quick/CMakeLists.txt @@ -10,7 +10,7 @@ qt_internal_add_example(keyinteraction) qt_internal_add_example(layouts) add_subdirectory(localstorage) add_subdirectory(models) -#qt_internal_add_example(views) +qt_internal_add_example(views) add_subdirectory(tableview) qt_internal_add_example(mousearea) qt_internal_add_example(positioners) @@ -19,12 +19,12 @@ add_subdirectory(scenegraph) qt_internal_add_example(shadereffects) qt_internal_add_example(text) qt_internal_add_example(threading) -#qt_internal_add_example(touchinteraction) +qt_internal_add_example(touchinteraction) add_subdirectory(tutorials) add_subdirectory(customitems) qt_internal_add_example(imageprovider) qt_internal_add_example(imageresponseprovider) -#qt_internal_add_example(window) +qt_internal_add_example(window) add_subdirectory(particles) qt_internal_add_example(delegatechooser) qt_internal_add_example(shapes) @@ -37,3 +37,20 @@ endif() if(TARGET Qt::QuickWidgets AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)) add_subdirectory(quickwidgets) 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 + touchinteraction_shared + window_shared + shapes_shared +) +foreach(target IN LISTS reused_dir_targets) + if(TARGET ${target}) + qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS moc rcc) + if(TARGET Qt::Widgets) + qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS uic) + endif() + endif() +endforeach() diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 784c7865a7..e521b56907 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -685,6 +685,7 @@ qt_internal_add_docs(Qml ) # include snippet projects for developer builds -if(NOT QT_SUPERBUILD AND QT_FEATURE_private_tests AND CMAKE_VERSION VERSION_GREATER_EQUAL "3.19") +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) endif() |