aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@qt.io>2021-02-15 16:34:46 +1100
committerCraig Scott <craig.scott@qt.io>2021-05-27 21:08:14 +1000
commit2422dd5a7ac1962980c42dca62e00711a9c0dc42 (patch)
treeb620660d6e2f9f789d3ffcc7f6e1f52d08ba9103 /examples
parent0bdbfb9589ce912afbecc6fd3408f8320d78de10 (diff)
Switch examples to build as isolated sub-builds
Task-number: QTBUG-90820 Change-Id: Id9157526898ba72cb64ee8256639b37357f7bacf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt8
-rw-r--r--examples/qml/CMakeLists.txt8
-rw-r--r--examples/qml/referenceexamples/CMakeLists.txt22
-rw-r--r--examples/qml/tutorials/extending-qml/CMakeLists.txt12
-rw-r--r--examples/qmltest/CMakeLists.txt2
-rw-r--r--examples/quick/CMakeLists.txt44
-rw-r--r--examples/quick/customitems/CMakeLists.txt5
-rw-r--r--examples/quick/localstorage/CMakeLists.txt2
-rw-r--r--examples/quick/models/CMakeLists.txt6
-rw-r--r--examples/quick/particles/CMakeLists.txt10
-rw-r--r--examples/quick/quickwidgets/CMakeLists.txt4
-rw-r--r--examples/quick/rendercontrol/CMakeLists.txt4
-rw-r--r--examples/quick/scenegraph/CMakeLists.txt24
-rw-r--r--examples/quick/tableview/CMakeLists.txt4
14 files changed, 75 insertions, 80 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index b6c19fb6e1..20338e9f6c 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,8 +1,4 @@
-# Generated from examples.pro.
-
-# special case begin
-qt_examples_build_begin()
-# special case end
+qt_examples_build_begin(EXTERNAL_BUILD)
add_subdirectory(qml)
if(TARGET Qt::QuickTest)
@@ -12,6 +8,4 @@ if(TARGET Qt::Quick)
add_subdirectory(quick)
endif()
-# special case begin
qt_examples_build_end()
-# special case end
diff --git a/examples/qml/CMakeLists.txt b/examples/qml/CMakeLists.txt
index 0ec4c9b39d..61e550762d 100644
--- a/examples/qml/CMakeLists.txt
+++ b/examples/qml/CMakeLists.txt
@@ -2,11 +2,11 @@
add_subdirectory(referenceexamples)
add_subdirectory(tutorials)
-add_subdirectory(shell)
+qt_internal_add_example(shell)
if(TARGET Qt::Quick)
- add_subdirectory(qmlextensionplugins)
- add_subdirectory(xmlhttprequest)
+ qt_internal_add_example(qmlextensionplugins)
+ qt_internal_add_example(xmlhttprequest)
endif()
if(QT_FEATURE_qml_network AND TARGET Qt::Quick)
- add_subdirectory(networkaccessmanagerfactory)
+ qt_internal_add_example(networkaccessmanagerfactory)
endif()
diff --git a/examples/qml/referenceexamples/CMakeLists.txt b/examples/qml/referenceexamples/CMakeLists.txt
index 827e3b0060..9347c18fba 100644
--- a/examples/qml/referenceexamples/CMakeLists.txt
+++ b/examples/qml/referenceexamples/CMakeLists.txt
@@ -1,17 +1,17 @@
# Generated from referenceexamples.pro.
-add_subdirectory(adding)
-add_subdirectory(coercion)
-add_subdirectory(default)
-add_subdirectory(properties)
-add_subdirectory(methods)
+qt_internal_add_example(adding)
+qt_internal_add_example(coercion)
+qt_internal_add_example(default)
+qt_internal_add_example(properties)
+qt_internal_add_example(methods)
if(TARGET Qt::Widgets)
- add_subdirectory(extended)
+ qt_internal_add_example(extended)
endif()
if(TARGET Qt::Quick)
- add_subdirectory(attached)
- add_subdirectory(binding)
- add_subdirectory(grouped)
- add_subdirectory(signal)
- add_subdirectory(valuesource)
+ qt_internal_add_example(attached)
+ qt_internal_add_example(binding)
+ qt_internal_add_example(grouped)
+ qt_internal_add_example(signal)
+ qt_internal_add_example(valuesource)
endif()
diff --git a/examples/qml/tutorials/extending-qml/CMakeLists.txt b/examples/qml/tutorials/extending-qml/CMakeLists.txt
index 8e41f3d77d..fc41f09986 100644
--- a/examples/qml/tutorials/extending-qml/CMakeLists.txt
+++ b/examples/qml/tutorials/extending-qml/CMakeLists.txt
@@ -1,8 +1,8 @@
# Generated from extending-qml.pro.
-add_subdirectory(chapter1-basics)
-add_subdirectory(chapter2-methods)
-add_subdirectory(chapter3-bindings)
-add_subdirectory(chapter4-customPropertyTypes)
-add_subdirectory(chapter5-listproperties)
-add_subdirectory(chapter6-plugins)
+qt_internal_add_example(chapter1-basics)
+qt_internal_add_example(chapter2-methods)
+qt_internal_add_example(chapter3-bindings)
+qt_internal_add_example(chapter4-customPropertyTypes)
+qt_internal_add_example(chapter5-listproperties)
+qt_internal_add_example(chapter6-plugins)
diff --git a/examples/qmltest/CMakeLists.txt b/examples/qmltest/CMakeLists.txt
index 9b071ad6b1..5de21ce3fc 100644
--- a/examples/qmltest/CMakeLists.txt
+++ b/examples/qmltest/CMakeLists.txt
@@ -1,3 +1,3 @@
# Generated from qmltest.pro.
-add_subdirectory(qmltest)
+qt_internal_add_example(qmltest)
diff --git a/examples/quick/CMakeLists.txt b/examples/quick/CMakeLists.txt
index 6da827e757..80c163856a 100644
--- a/examples/quick/CMakeLists.txt
+++ b/examples/quick/CMakeLists.txt
@@ -1,38 +1,38 @@
# Generated from quick.pro.
-add_subdirectory(quick-accessibility)
-add_subdirectory(animation)
-add_subdirectory(draganddrop)
-add_subdirectory(externaldraganddrop)
-add_subdirectory(canvas)
-add_subdirectory(imageelements)
-add_subdirectory(keyinteraction)
-add_subdirectory(layouts)
+qt_internal_add_example(quick-accessibility)
+qt_internal_add_example(animation)
+qt_internal_add_example(draganddrop)
+qt_internal_add_example(externaldraganddrop)
+qt_internal_add_example(canvas)
+qt_internal_add_example(imageelements)
+qt_internal_add_example(keyinteraction)
+qt_internal_add_example(layouts)
add_subdirectory(localstorage)
add_subdirectory(models)
-add_subdirectory(views)
+qt_internal_add_example(views)
add_subdirectory(tableview)
-add_subdirectory(mousearea)
-add_subdirectory(positioners)
-add_subdirectory(righttoleft)
+qt_internal_add_example(mousearea)
+qt_internal_add_example(positioners)
+qt_internal_add_example(righttoleft)
add_subdirectory(scenegraph)
-add_subdirectory(shadereffects)
-add_subdirectory(text)
-add_subdirectory(threading)
-add_subdirectory(touchinteraction)
+qt_internal_add_example(shadereffects)
+qt_internal_add_example(text)
+qt_internal_add_example(threading)
+qt_internal_add_example(touchinteraction)
add_subdirectory(tutorials)
add_subdirectory(customitems)
-add_subdirectory(imageprovider)
-add_subdirectory(imageresponseprovider)
-add_subdirectory(window)
+qt_internal_add_example(imageprovider)
+qt_internal_add_example(imageresponseprovider)
+qt_internal_add_example(window)
add_subdirectory(particles)
-add_subdirectory(delegatechooser)
-add_subdirectory(shapes)
+qt_internal_add_example(delegatechooser)
+qt_internal_add_example(shapes)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
add_subdirectory(rendercontrol)
endif()
if(TARGET Qt::Widgets)
- add_subdirectory(embeddedinwidgets)
+ qt_internal_add_example(embeddedinwidgets)
endif()
if(TARGET Qt::QuickWidgets AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
add_subdirectory(quickwidgets)
diff --git a/examples/quick/customitems/CMakeLists.txt b/examples/quick/customitems/CMakeLists.txt
index 4afbfe3f6b..d52218f4e4 100644
--- a/examples/quick/customitems/CMakeLists.txt
+++ b/examples/quick/customitems/CMakeLists.txt
@@ -1,4 +1,5 @@
# Generated from customitems.pro.
-add_subdirectory(painteditem)
-add_subdirectory(maskedmousearea)
+qt_internal_add_example(dialcontrol)
+qt_internal_add_example(painteditem)
+qt_internal_add_example(maskedmousearea)
diff --git a/examples/quick/localstorage/CMakeLists.txt b/examples/quick/localstorage/CMakeLists.txt
index 913f64dd1b..6a405efc81 100644
--- a/examples/quick/localstorage/CMakeLists.txt
+++ b/examples/quick/localstorage/CMakeLists.txt
@@ -1,3 +1,3 @@
# Generated from localstorage.pro.
-add_subdirectory(localstorage)
+qt_internal_add_example(localstorage)
diff --git a/examples/quick/models/CMakeLists.txt b/examples/quick/models/CMakeLists.txt
index 6beadd409c..d92f9e4a27 100644
--- a/examples/quick/models/CMakeLists.txt
+++ b/examples/quick/models/CMakeLists.txt
@@ -1,5 +1,5 @@
# Generated from models.pro.
-add_subdirectory(abstractitemmodel)
-add_subdirectory(objectlistmodel)
-add_subdirectory(stringlistmodel)
+qt_internal_add_example(abstractitemmodel)
+qt_internal_add_example(objectlistmodel)
+qt_internal_add_example(stringlistmodel)
diff --git a/examples/quick/particles/CMakeLists.txt b/examples/quick/particles/CMakeLists.txt
index 1dbf49be21..3a9aca610a 100644
--- a/examples/quick/particles/CMakeLists.txt
+++ b/examples/quick/particles/CMakeLists.txt
@@ -1,7 +1,7 @@
# Generated from particles.pro.
-add_subdirectory(affectors)
-add_subdirectory(emitters)
-add_subdirectory(imageparticle)
-add_subdirectory(itemparticle)
-add_subdirectory(system)
+qt_internal_add_example(affectors)
+qt_internal_add_example(emitters)
+qt_internal_add_example(imageparticle)
+qt_internal_add_example(itemparticle)
+qt_internal_add_example(system)
diff --git a/examples/quick/quickwidgets/CMakeLists.txt b/examples/quick/quickwidgets/CMakeLists.txt
index 637e8a50eb..82deb9df2f 100644
--- a/examples/quick/quickwidgets/CMakeLists.txt
+++ b/examples/quick/quickwidgets/CMakeLists.txt
@@ -1,4 +1,4 @@
# Generated from quickwidgets.pro.
-add_subdirectory(quickwidget)
-add_subdirectory(qquickviewcomparison)
+qt_internal_add_example(quickwidget)
+qt_internal_add_example(qquickviewcomparison)
diff --git a/examples/quick/rendercontrol/CMakeLists.txt b/examples/quick/rendercontrol/CMakeLists.txt
index db19a3fc79..aa4cf774ee 100644
--- a/examples/quick/rendercontrol/CMakeLists.txt
+++ b/examples/quick/rendercontrol/CMakeLists.txt
@@ -1,6 +1,6 @@
# Generated from rendercontrol.pro.
-add_subdirectory(rendercontrol_opengl)
+qt_internal_add_example(rendercontrol_opengl)
if(WIN32)
- add_subdirectory(rendercontrol_d3d11)
+ qt_internal_add_example(rendercontrol_d3d11)
endif()
diff --git a/examples/quick/scenegraph/CMakeLists.txt b/examples/quick/scenegraph/CMakeLists.txt
index a0619410b0..afb1166a0c 100644
--- a/examples/quick/scenegraph/CMakeLists.txt
+++ b/examples/quick/scenegraph/CMakeLists.txt
@@ -1,22 +1,22 @@
# Generated from scenegraph.pro.
-add_subdirectory(customgeometry)
-add_subdirectory(custommaterial)
-add_subdirectory(graph)
-add_subdirectory(threadedanimation)
-add_subdirectory(twotextureproviders)
+qt_internal_add_example(customgeometry)
+qt_internal_add_example(custommaterial)
+qt_internal_add_example(graph)
+qt_internal_add_example(threadedanimation)
+qt_internal_add_example(twotextureproviders)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- add_subdirectory(fboitem)
- add_subdirectory(openglunderqml)
+ qt_internal_add_example(fboitem)
+ qt_internal_add_example(openglunderqml)
endif()
if(IOS OR MACOS)
- add_subdirectory(metalunderqml)
- add_subdirectory(metaltextureimport)
+ qt_internal_add_example(metalunderqml)
+ qt_internal_add_example(metaltextureimport)
endif()
if(WIN32)
- add_subdirectory(d3d11underqml)
+ qt_internal_add_example(d3d11underqml)
endif()
if(QT_FEATURE_vulkan)
- add_subdirectory(vulkanunderqml)
- add_subdirectory(vulkantextureimport)
+ qt_internal_add_example(vulkanunderqml)
+ qt_internal_add_example(vulkantextureimport)
endif()
diff --git a/examples/quick/tableview/CMakeLists.txt b/examples/quick/tableview/CMakeLists.txt
index 6875e412e9..d41fc2ff25 100644
--- a/examples/quick/tableview/CMakeLists.txt
+++ b/examples/quick/tableview/CMakeLists.txt
@@ -1,4 +1,4 @@
# Generated from tableview.pro.
-add_subdirectory(gameoflife)
-add_subdirectory(pixelator)
+qt_internal_add_example(gameoflife)
+qt_internal_add_example(pixelator)