summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <[email protected]>2020-07-07 15:24:45 +0200
committerAlexandru Croitor <[email protected]>2020-07-09 09:38:28 +0200
commit74cb331af3cfe723ae16cd1b00c9dd9291b4e7e9 (patch)
tree0f4ee41beba41f67a2ea0bb6c0134843a32c9ab6
parentd98a6d0463fd00e5463828b6a3e4e20db7d6d63e (diff)
CMake: Regenerate examples
Change-Id: I1c51b10af4e2b26f54740f257164c56a0e2a03ce Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
-rw-r--r--examples/CMakeLists.txt31
-rw-r--r--examples/corelib/CMakeLists.txt1
-rw-r--r--examples/corelib/ipc/CMakeLists.txt14
-rw-r--r--examples/corelib/ipc/localfortuneclient/CMakeLists.txt6
-rw-r--r--examples/corelib/ipc/localfortuneserver/CMakeLists.txt6
-rw-r--r--examples/corelib/ipc/sharedmemory/CMakeLists.txt6
-rw-r--r--examples/corelib/mimetypes/CMakeLists.txt1
-rw-r--r--examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt6
-rw-r--r--examples/corelib/serialization/cbordump/CMakeLists.txt6
-rw-r--r--examples/corelib/serialization/convert/CMakeLists.txt6
-rw-r--r--examples/corelib/serialization/savegame/CMakeLists.txt6
-rw-r--r--examples/corelib/threads/CMakeLists.txt1
-rw-r--r--examples/corelib/threads/mandelbrot/CMakeLists.txt6
-rw-r--r--examples/corelib/threads/queuedcustomtype/CMakeLists.txt6
-rw-r--r--examples/corelib/threads/semaphores/CMakeLists.txt6
-rw-r--r--examples/corelib/threads/waitconditions/CMakeLists.txt6
-rw-r--r--examples/corelib/tools/CMakeLists.txt3
-rw-r--r--examples/corelib/tools/contiguouscache/CMakeLists.txt6
-rw-r--r--examples/corelib/tools/customtype/CMakeLists.txt6
-rw-r--r--examples/corelib/tools/customtypesending/CMakeLists.txt6
-rw-r--r--examples/dbus/CMakeLists.txt5
-rw-r--r--examples/dbus/chat/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/chat/CMakeLists.txt6
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt40
-rw-r--r--examples/dbus/listnames/CMakeLists.txt6
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt40
-rw-r--r--examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt6
-rw-r--r--examples/embedded/CMakeLists.txt3
-rw-r--r--examples/embedded/digiflip/CMakeLists.txt6
-rw-r--r--examples/embedded/flickable/CMakeLists.txt6
-rw-r--r--examples/embedded/flightinfo/CMakeLists.txt6
-rw-r--r--examples/embedded/lightmaps/CMakeLists.txt6
-rw-r--r--examples/embedded/raycasting/CMakeLists.txt6
-rw-r--r--examples/embedded/styleexample/CMakeLists.txt6
-rw-r--r--examples/gui/analogclock/.prev_CMakeLists.txt6
-rw-r--r--examples/gui/analogclock/CMakeLists.txt6
-rw-r--r--examples/gui/rasterwindow/.prev_CMakeLists.txt6
-rw-r--r--examples/gui/rasterwindow/CMakeLists.txt6
-rw-r--r--examples/network/.prev_CMakeLists.txt38
-rw-r--r--examples/network/CMakeLists.txt46
-rw-r--r--examples/network/blockingfortuneclient/CMakeLists.txt6
-rw-r--r--examples/network/broadcastreceiver/CMakeLists.txt6
-rw-r--r--examples/network/broadcastsender/CMakeLists.txt6
-rw-r--r--examples/network/dnslookup/CMakeLists.txt6
-rw-r--r--examples/network/download/CMakeLists.txt6
-rw-r--r--examples/network/downloadmanager/CMakeLists.txt6
-rw-r--r--examples/network/fortuneclient/CMakeLists.txt6
-rw-r--r--examples/network/fortuneserver/CMakeLists.txt6
-rw-r--r--examples/network/googlesuggest/CMakeLists.txt6
-rw-r--r--examples/network/http/CMakeLists.txt6
-rw-r--r--examples/network/loopback/CMakeLists.txt6
-rw-r--r--examples/network/multicastreceiver/CMakeLists.txt6
-rw-r--r--examples/network/multicastsender/CMakeLists.txt6
-rw-r--r--examples/network/multistreamclient/CMakeLists.txt6
-rw-r--r--examples/network/multistreamserver/CMakeLists.txt6
-rw-r--r--examples/network/network-chat/CMakeLists.txt6
-rw-r--r--examples/network/securesocketclient/CMakeLists.txt6
-rw-r--r--examples/network/secureudpclient/CMakeLists.txt6
-rw-r--r--examples/network/secureudpserver/CMakeLists.txt6
-rw-r--r--examples/network/threadedfortuneserver/CMakeLists.txt6
-rw-r--r--examples/network/torrent/.prev_CMakeLists.txt6
-rw-r--r--examples/network/torrent/CMakeLists.txt6
-rw-r--r--examples/opengl/2dpainting/CMakeLists.txt6
-rw-r--r--examples/opengl/computegles31/CMakeLists.txt6
-rw-r--r--examples/opengl/contextinfo/CMakeLists.txt6
-rw-r--r--examples/opengl/cube/CMakeLists.txt6
-rw-r--r--examples/opengl/hellogl2/CMakeLists.txt6
-rw-r--r--examples/opengl/hellogles3/CMakeLists.txt6
-rw-r--r--examples/opengl/hellowindow/CMakeLists.txt6
-rw-r--r--examples/opengl/openglwindow/CMakeLists.txt6
-rw-r--r--examples/opengl/paintedwindow/CMakeLists.txt6
-rw-r--r--examples/opengl/qopenglwidget/CMakeLists.txt6
-rw-r--r--examples/opengl/qopenglwindow/CMakeLists.txt6
-rw-r--r--examples/opengl/textures/CMakeLists.txt6
-rw-r--r--examples/opengl/threadedqopenglwidget/CMakeLists.txt6
-rw-r--r--examples/qpa/CMakeLists.txt3
-rw-r--r--examples/qpa/qrasterwindow/CMakeLists.txt6
-rw-r--r--examples/qpa/windows/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/CMakeLists.txt9
-rw-r--r--examples/qtconcurrent/imagescaling/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/map/.prev_CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/map/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/progressdialog/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/runfunction/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/wordcount/CMakeLists.txt6
-rw-r--r--examples/qtestlib/CMakeLists.txt3
-rw-r--r--examples/qtestlib/tutorial1/CMakeLists.txt6
-rw-r--r--examples/qtestlib/tutorial2/CMakeLists.txt6
-rw-r--r--examples/qtestlib/tutorial3/CMakeLists.txt6
-rw-r--r--examples/qtestlib/tutorial4/CMakeLists.txt6
-rw-r--r--examples/qtestlib/tutorial5/CMakeLists.txt6
-rw-r--r--examples/sql/.prev_CMakeLists.txt18
-rw-r--r--examples/sql/CMakeLists.txt4
-rw-r--r--examples/sql/books/CMakeLists.txt6
-rw-r--r--examples/sql/cachedtable/CMakeLists.txt6
-rw-r--r--examples/sql/drilldown/CMakeLists.txt6
-rw-r--r--examples/sql/masterdetail/CMakeLists.txt6
-rw-r--r--examples/sql/querymodel/CMakeLists.txt6
-rw-r--r--examples/sql/relationaltablemodel/CMakeLists.txt6
-rw-r--r--examples/sql/sqlbrowser/CMakeLists.txt6
-rw-r--r--examples/sql/sqlwidgetmapper/CMakeLists.txt6
-rw-r--r--examples/sql/tablemodel/CMakeLists.txt6
-rw-r--r--examples/vulkan/hellovulkancubes/CMakeLists.txt6
-rw-r--r--examples/vulkan/hellovulkantexture/CMakeLists.txt6
-rw-r--r--examples/vulkan/hellovulkantriangle/CMakeLists.txt6
-rw-r--r--examples/vulkan/hellovulkanwidget/CMakeLists.txt6
-rw-r--r--examples/vulkan/hellovulkanwindow/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/animatedtiles/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/easing/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/moveblocks/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/states/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/stickman/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/animation/sub-attaq/CMakeLists.txt6
-rw-r--r--examples/widgets/desktop/screenshot/CMakeLists.txt6
-rw-r--r--examples/widgets/desktop/systray/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/classwizard/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/extension/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/findfiles/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/licensewizard/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/standarddialogs/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/tabdialog/CMakeLists.txt6
-rw-r--r--examples/widgets/dialogs/trivialwizard/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/draggableicons/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/draggabletext/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/dropsite/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/puzzle/CMakeLists.txt6
-rw-r--r--examples/widgets/effects/blurpicker/CMakeLists.txt6
-rw-r--r--examples/widgets/effects/fademessage/CMakeLists.txt6
-rw-r--r--examples/widgets/gallery/CMakeLists.txt6
-rw-r--r--examples/widgets/gestures/imagegestures/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/anchorlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/chip/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/collidingmice/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/diagramscene/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/elasticnodes/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/flowlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/padnavigator/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/addressbook/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/chart/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/dirview/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/editabletreemodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/fetchmore/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/flattreeview/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/frozencolumn/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/interview/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/puzzle/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/simpledommodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/simpletreemodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/stardelegate/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt6
-rw-r--r--examples/widgets/layouts/basiclayouts/CMakeLists.txt6
-rw-r--r--examples/widgets/layouts/borderlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/layouts/dynamiclayouts/CMakeLists.txt6
-rw-r--r--examples/widgets/layouts/flowlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/application/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/mainwindow/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/mdi/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/menus/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/sdi/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/affine/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/composition/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/deform/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/gradients/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/calendar/CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/orderform/CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/textedit/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt6
-rw-r--r--examples/widgets/scroller/graphicsview/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/eventtransitions/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/factorial/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/pingpong/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/rogue/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/trafficlight/CMakeLists.txt6
-rw-r--r--examples/widgets/statemachine/twowaybutton/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/completer/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/customcompleter/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/echoplugin/plugin/CMakeLists.txt9
-rw-r--r--examples/widgets/tools/i18n/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/regularexpression/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/settingseditor/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/styleplugin/plugin/CMakeLists.txt9
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/undo/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/undoframework/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/dials/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/touch/fingerpaint/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/knobs/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/pinchzoom/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part1/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part2/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part3/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part4/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part5/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part6/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/addressbook/part7/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/notepad/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/notepad/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt6
-rw-r--r--examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/analogclock/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/calculator/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/calendarwidget/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/charactermap/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/codeeditor/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/digitalclock/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/elidedlabel/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/groupbox/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/icons/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/icons/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/imageviewer/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/lineedits/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/mousebuttons/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/movie/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/scribble/.prev_CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/scribble/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/shapedclock/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/sliders/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/spinboxes/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/styles/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/stylesheet/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/tablet/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/tetrix/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/tooltips/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/validators/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/wiggly/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/windowflags/CMakeLists.txt6
-rw-r--r--examples/widgets/windowcontainer/CMakeLists.txt6
-rw-r--r--examples/xml/CMakeLists.txt8
-rw-r--r--examples/xml/dombookmarks/CMakeLists.txt6
-rw-r--r--examples/xml/htmlinfo/CMakeLists.txt6
-rw-r--r--examples/xml/rsslisting/CMakeLists.txt6
-rw-r--r--examples/xml/streambookmarks/CMakeLists.txt6
-rw-r--r--examples/xml/xmlstreamlint/.prev_CMakeLists.txt6
-rw-r--r--examples/xml/xmlstreamlint/CMakeLists.txt6
296 files changed, 1588 insertions, 354 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index b4738284158..a48879d4475 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,54 +1,39 @@
-# special case begin
-qt_examples_build_begin()
-
-# special case end
-
# Generated from examples.pro.
+qt_examples_build_begin()
+
add_subdirectory(corelib)
add_subdirectory(embedded)
add_subdirectory(qpa)
-
if(TARGET Qt::DBus)
add_subdirectory(dbus)
endif()
-
if(TARGET Qt::Network)
add_subdirectory(network)
endif()
-
if(TARGET Qt::Test)
add_subdirectory(qtestlib)
endif()
-
if(TARGET Qt::Concurrent)
add_subdirectory(qtconcurrent)
endif()
-
if(TARGET Qt::Sql)
add_subdirectory(sql)
endif()
-
if(TARGET Qt::Widgets)
add_subdirectory(widgets)
endif()
-
if(TARGET Qt::Xml)
add_subdirectory(xml)
endif()
-
if(TARGET Qt::Gui)
add_subdirectory(gui)
-
- if(QT_FEATURE_opengl)
- add_subdirectory(opengl)
- endif()
-
- if(QT_FEATURE_vulkan)
- add_subdirectory(vulkan)
- endif()
+endif()
+if(QT_FEATURE_opengl AND TARGET Qt::Gui)
+ add_subdirectory(opengl)
+endif()
+if(QT_FEATURE_vulkan AND TARGET Qt::Gui)
+ add_subdirectory(vulkan)
endif()
-# special case begin
qt_examples_build_end()
-# special case end
diff --git a/examples/corelib/CMakeLists.txt b/examples/corelib/CMakeLists.txt
index 5e24def2510..9ec9dcb1563 100644
--- a/examples/corelib/CMakeLists.txt
+++ b/examples/corelib/CMakeLists.txt
@@ -4,7 +4,6 @@ add_subdirectory(ipc)
add_subdirectory(mimetypes)
add_subdirectory(serialization)
add_subdirectory(tools)
-
if(QT_FEATURE_thread)
add_subdirectory(threads)
endif()
diff --git a/examples/corelib/ipc/CMakeLists.txt b/examples/corelib/ipc/CMakeLists.txt
index b134a3aa172..29a8d4f592e 100644
--- a/examples/corelib/ipc/CMakeLists.txt
+++ b/examples/corelib/ipc/CMakeLists.txt
@@ -1,14 +1,12 @@
# Generated from ipc.pro.
-
+if(NOT TARGET Qt::Widgets)
+ return()
+endif()
if(QT_FEATURE_sharedmemory)
add_subdirectory(sharedmemory)
endif()
-
-if(TARGET Qt::Network)
-
- if(QT_FEATURE_localserver)
- add_subdirectory(localfortuneserver)
- add_subdirectory(localfortuneclient)
- endif()
+if(QT_FEATURE_localserver AND TARGET Qt::Network)
+ add_subdirectory(localfortuneserver)
+ add_subdirectory(localfortuneclient)
endif()
diff --git a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
index 4c011e751bb..b65f8d224f9 100644
--- a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/localfortuneclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
index 014df191851..b03dd740587 100644
--- a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/localfortuneserver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/ipc/sharedmemory/CMakeLists.txt b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
index 6db5ea1a3b1..13332bd3816 100644
--- a/examples/corelib/ipc/sharedmemory/CMakeLists.txt
+++ b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/sharedmemory")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/mimetypes/CMakeLists.txt b/examples/corelib/mimetypes/CMakeLists.txt
index 0b31e0db69c..ac06659362c 100644
--- a/examples/corelib/mimetypes/CMakeLists.txt
+++ b/examples/corelib/mimetypes/CMakeLists.txt
@@ -1,6 +1,5 @@
# Generated from mimetypes.pro.
-
if(TARGET Qt::Widgets)
add_subdirectory(mimetypebrowser)
endif()
diff --git a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
index b62df6dd1e0..9ccfff3e21d 100644
--- a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
+++ b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/mimetypes/mimetypebrowser")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/serialization/cbordump/CMakeLists.txt b/examples/corelib/serialization/cbordump/CMakeLists.txt
index 98b5044b4a1..d5795e23d3e 100644
--- a/examples/corelib/serialization/cbordump/CMakeLists.txt
+++ b/examples/corelib/serialization/cbordump/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/cbordump")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/corelib/serialization/convert/CMakeLists.txt b/examples/corelib/serialization/convert/CMakeLists.txt
index 98d4a943d6e..2156867ba06 100644
--- a/examples/corelib/serialization/convert/CMakeLists.txt
+++ b/examples/corelib/serialization/convert/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/convert")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/corelib/serialization/savegame/CMakeLists.txt b/examples/corelib/serialization/savegame/CMakeLists.txt
index 10851d55fd2..80305deb390 100644
--- a/examples/corelib/serialization/savegame/CMakeLists.txt
+++ b/examples/corelib/serialization/savegame/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/savegame")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/corelib/threads/CMakeLists.txt b/examples/corelib/threads/CMakeLists.txt
index b13dd16d93c..f84700fdb4e 100644
--- a/examples/corelib/threads/CMakeLists.txt
+++ b/examples/corelib/threads/CMakeLists.txt
@@ -2,7 +2,6 @@
add_subdirectory(semaphores)
add_subdirectory(waitconditions)
-
if(TARGET Qt::Widgets)
add_subdirectory(mandelbrot)
add_subdirectory(queuedcustomtype)
diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt
index 515eb3ed932..5ad1a37474e 100644
--- a/examples/corelib/threads/mandelbrot/CMakeLists.txt
+++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/threads/mandelbrot")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
index cc4ff1bd4aa..dccabb3a71c 100644
--- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
+++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/threads/queuedcustomtype")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt
index 15b5dc56b92..62d1f52e349 100644
--- a/examples/corelib/threads/semaphores/CMakeLists.txt
+++ b/examples/corelib/threads/semaphores/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/threads/semaphores")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt
index 0b6d889d771..82b0ed57ec2 100644
--- a/examples/corelib/threads/waitconditions/CMakeLists.txt
+++ b/examples/corelib/threads/waitconditions/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/threads/waitconditions")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/corelib/tools/CMakeLists.txt b/examples/corelib/tools/CMakeLists.txt
index d25014ee3c0..a9f82dfab55 100644
--- a/examples/corelib/tools/CMakeLists.txt
+++ b/examples/corelib/tools/CMakeLists.txt
@@ -1,5 +1,8 @@
# Generated from tools.pro.
+if(NOT TARGET Qt::Widgets)
+ return()
+endif()
add_subdirectory(contiguouscache)
add_subdirectory(customtype)
add_subdirectory(customtypesending)
diff --git a/examples/corelib/tools/contiguouscache/CMakeLists.txt b/examples/corelib/tools/contiguouscache/CMakeLists.txt
index 1e7a3350c27..d2647371bb8 100644
--- a/examples/corelib/tools/contiguouscache/CMakeLists.txt
+++ b/examples/corelib/tools/contiguouscache/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/tools/contiguouscache")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/tools/customtype/CMakeLists.txt b/examples/corelib/tools/customtype/CMakeLists.txt
index 74969ed2eaf..ef50a979d4a 100644
--- a/examples/corelib/tools/customtype/CMakeLists.txt
+++ b/examples/corelib/tools/customtype/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/tools/customtype")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/corelib/tools/customtypesending/CMakeLists.txt b/examples/corelib/tools/customtypesending/CMakeLists.txt
index 1456eaf5dc1..157542e4cbf 100644
--- a/examples/corelib/tools/customtypesending/CMakeLists.txt
+++ b/examples/corelib/tools/customtypesending/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/corelib/tools/customtypesending")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/CMakeLists.txt b/examples/dbus/CMakeLists.txt
index 42a3df658ab..065cc76022b 100644
--- a/examples/dbus/CMakeLists.txt
+++ b/examples/dbus/CMakeLists.txt
@@ -1,12 +1,13 @@
# Generated from dbus.pro.
+if(NOT TARGET Qt::DBus)
+ return()
+endif()
add_subdirectory(listnames)
add_subdirectory(pingpong)
-
if(QT_FEATURE_process)
add_subdirectory(complexpingpong)
endif()
-
if(TARGET Qt::Widgets)
add_subdirectory(chat)
add_subdirectory(remotecontrolledcar)
diff --git a/examples/dbus/chat/.prev_CMakeLists.txt b/examples/dbus/chat/.prev_CMakeLists.txt
index 78898687536..a78bd3683d4 100644
--- a/examples/dbus/chat/.prev_CMakeLists.txt
+++ b/examples/dbus/chat/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index f2fb0a55f81..e39a960af04 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index 01a824e5e73..6ea75ad4e7a 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -1,6 +1,37 @@
-# Generated from complexpong.pro.
+# Generated from complexpingpong.pro.
cmake_minimum_required(VERSION 3.14)
+project(complexping LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(complexping
+ complexping.cpp complexping.h
+ ping-common.h
+)
+target_link_libraries(complexping PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+
+install(TARGETS complexping
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+cmake_minimum_required(VERSION 3.14)
project(complexpong LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong")
find_package(Qt6 COMPONENTS DBus)
@@ -20,6 +55,7 @@ target_link_libraries(complexpong PUBLIC
# Remove: gui
Qt::DBus
)
+
install(TARGETS complexpong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
index acc1db632c1..a5a1a4b94f7 100644
--- a/examples/dbus/listnames/CMakeLists.txt
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/listnames")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/listnames")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS DBus)
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
index 6a2a84e9743..1c488b857ef 100644
--- a/examples/dbus/pingpong/CMakeLists.txt
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -1,6 +1,37 @@
-# Generated from pong.pro.
+# Generated from pingpong.pro.
cmake_minimum_required(VERSION 3.14)
+project(ping LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong")
+
+find_package(Qt6 COMPONENTS DBus)
+
+add_qt_gui_executable(ping
+ ping.cpp
+ ping-common.h
+)
+target_link_libraries(ping PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+
+install(TARGETS ping
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+cmake_minimum_required(VERSION 3.14)
project(pong LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -9,7 +40,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong")
find_package(Qt6 COMPONENTS DBus)
@@ -21,6 +56,7 @@ target_link_libraries(pong PUBLIC
# Remove: gui
Qt::DBus
)
+
install(TARGETS pong
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
index a028cbcb437..e121c9677cc 100644
--- a/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index 8be7f9ebd14..142268c1cef 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
index 65c32e7c07e..dab43f8076f 100644
--- a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index 5ad9d2e51d4..cca625fdeab 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/CMakeLists.txt b/examples/embedded/CMakeLists.txt
index bd7720809a4..84292edccc9 100644
--- a/examples/embedded/CMakeLists.txt
+++ b/examples/embedded/CMakeLists.txt
@@ -1,5 +1,8 @@
# Generated from embedded.pro.
+if(NOT TARGET Qt::Gui OR (NOT embedded AND NOT x11))
+ return()
+endif()
add_subdirectory(styleexample)
add_subdirectory(raycasting)
add_subdirectory(flickable)
diff --git a/examples/embedded/digiflip/CMakeLists.txt b/examples/embedded/digiflip/CMakeLists.txt
index cfad2a7c7bf..d2476cfd54e 100644
--- a/examples/embedded/digiflip/CMakeLists.txt
+++ b/examples/embedded/digiflip/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/digiflip")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/digiflip")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/flickable/CMakeLists.txt b/examples/embedded/flickable/CMakeLists.txt
index bae31467231..6a61d1968bd 100644
--- a/examples/embedded/flickable/CMakeLists.txt
+++ b/examples/embedded/flickable/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/flickable")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/flickable")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/flightinfo/CMakeLists.txt b/examples/embedded/flightinfo/CMakeLists.txt
index f7898e8ed87..4daf7d86c77 100644
--- a/examples/embedded/flightinfo/CMakeLists.txt
+++ b/examples/embedded/flightinfo/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/flightinfo")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/flightinfo")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/lightmaps/CMakeLists.txt b/examples/embedded/lightmaps/CMakeLists.txt
index 641f75c3c82..fb15654650d 100644
--- a/examples/embedded/lightmaps/CMakeLists.txt
+++ b/examples/embedded/lightmaps/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/lightmaps")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/lightmaps")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/raycasting/CMakeLists.txt b/examples/embedded/raycasting/CMakeLists.txt
index 86a3042f86b..05ba985f053 100644
--- a/examples/embedded/raycasting/CMakeLists.txt
+++ b/examples/embedded/raycasting/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/raycasting")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/raycasting")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/embedded/styleexample/CMakeLists.txt b/examples/embedded/styleexample/CMakeLists.txt
index ac03e583464..2b78a40d32b 100644
--- a/examples/embedded/styleexample/CMakeLists.txt
+++ b/examples/embedded/styleexample/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/embedded/styleexample")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/styleexample")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/gui/analogclock/.prev_CMakeLists.txt b/examples/gui/analogclock/.prev_CMakeLists.txt
index b71892d1b81..1118dde9e47 100644
--- a/examples/gui/analogclock/.prev_CMakeLists.txt
+++ b/examples/gui/analogclock/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/gui/analogclock")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/analogclock")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/gui/analogclock/CMakeLists.txt b/examples/gui/analogclock/CMakeLists.txt
index d5605ab8baa..30ff6e5c8ff 100644
--- a/examples/gui/analogclock/CMakeLists.txt
+++ b/examples/gui/analogclock/CMakeLists.txt
@@ -10,7 +10,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/gui/gui_analogclock") # special case
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/gui_analogclock") # special case
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/gui/rasterwindow/.prev_CMakeLists.txt b/examples/gui/rasterwindow/.prev_CMakeLists.txt
index 3f27ea597c3..9ad1fcdb2db 100644
--- a/examples/gui/rasterwindow/.prev_CMakeLists.txt
+++ b/examples/gui/rasterwindow/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/rasterwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt
index 555578725e6..4d78f10f897 100644
--- a/examples/gui/rasterwindow/CMakeLists.txt
+++ b/examples/gui/rasterwindow/CMakeLists.txt
@@ -11,7 +11,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/rasterwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/.prev_CMakeLists.txt b/examples/network/.prev_CMakeLists.txt
new file mode 100644
index 00000000000..c28c951b694
--- /dev/null
+++ b/examples/network/.prev_CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from network.pro.
+
+if(NOT TARGET Qt::Network)
+ return()
+endif()
+add_subdirectory(download)
+add_subdirectory(downloadmanager)
+if(NOT INTEGRITY)
+ add_subdirectory(dnslookup)
+endif()
+if(TARGET Qt::Widgets)
+ add_subdirectory(blockingfortuneclient)
+ add_subdirectory(broadcastreceiver)
+ add_subdirectory(broadcastsender)
+ add_subdirectory(http)
+ add_subdirectory(loopback)
+ add_subdirectory(threadedfortuneserver)
+ add_subdirectory(googlesuggest)
+ add_subdirectory(torrent)
+ add_subdirectory(multicastreceiver)
+ add_subdirectory(multicastsender)
+ add_subdirectory(fortuneclient)
+ add_subdirectory(fortuneserver)
+endif()
+if(QT_FEATURE_processenvironment AND TARGET Qt::Widgets)
+ add_subdirectory(network-chat)
+endif()
+if(QT_FEATURE_ssl AND TARGET Qt::Widgets)
+ add_subdirectory(securesocketclient)
+endif()
+if(QT_FEATURE_dtls AND TARGET Qt::Widgets)
+ add_subdirectory(secureudpserver)
+ add_subdirectory(secureudpclient)
+endif()
+if(QT_FEATURE_sctp AND TARGET Qt::Widgets)
+ add_subdirectory(multistreamserver)
+ add_subdirectory(multistreamclient)
+endif()
diff --git a/examples/network/CMakeLists.txt b/examples/network/CMakeLists.txt
index 919310df9aa..b6ae618d1d9 100644
--- a/examples/network/CMakeLists.txt
+++ b/examples/network/CMakeLists.txt
@@ -1,12 +1,13 @@
# Generated from network.pro.
+if(NOT TARGET Qt::Network)
+ return()
+endif()
add_subdirectory(download)
add_subdirectory(downloadmanager)
-
if(NOT INTEGRITY)
add_subdirectory(dnslookup)
endif()
-
if(TARGET Qt::Widgets)
add_subdirectory(blockingfortuneclient)
add_subdirectory(broadcastreceiver)
@@ -15,30 +16,23 @@ if(TARGET Qt::Widgets)
add_subdirectory(loopback)
add_subdirectory(threadedfortuneserver)
add_subdirectory(googlesuggest)
- # add_subdirectory(torrent) FIXME: This does not find its ui file:-/
+ # add_subdirectory(torrent) FIXME: This does not find its ui file:-/ # special case
add_subdirectory(multicastreceiver)
add_subdirectory(multicastsender)
-
- if(QT_FEATURE_bearermanagement)
- add_subdirectory(fortuneclient)
- add_subdirectory(fortuneserver)
-
- if(QT_FEATURE_processenvironment)
- add_subdirectory(network-chat)
- endif()
- endif()
-
- if(QT_FEATURE_openssl)
- add_subdirectory(securesocketclient)
- endif()
-
- if(QT_FEATURE_dtls)
- add_subdirectory(secureudpserver)
- add_subdirectory(secureudpclient)
- endif()
-
- if(QT_FEATURE_sctp)
- add_subdirectory(multistreamserver)
- add_subdirectory(multistreamclient)
- endif()
+ add_subdirectory(fortuneclient)
+ add_subdirectory(fortuneserver)
+endif()
+if(QT_FEATURE_processenvironment AND TARGET Qt::Widgets)
+ add_subdirectory(network-chat)
+endif()
+if(QT_FEATURE_ssl AND TARGET Qt::Widgets)
+ add_subdirectory(securesocketclient)
+endif()
+if(QT_FEATURE_dtls AND TARGET Qt::Widgets)
+ add_subdirectory(secureudpserver)
+ add_subdirectory(secureudpclient)
+endif()
+if(QT_FEATURE_sctp AND TARGET Qt::Widgets)
+ add_subdirectory(multistreamserver)
+ add_subdirectory(multistreamclient)
endif()
diff --git a/examples/network/blockingfortuneclient/CMakeLists.txt b/examples/network/blockingfortuneclient/CMakeLists.txt
index d2c79bbcd20..a1387734987 100644
--- a/examples/network/blockingfortuneclient/CMakeLists.txt
+++ b/examples/network/blockingfortuneclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/blockingfortuneclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/blockingfortuneclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/broadcastreceiver/CMakeLists.txt b/examples/network/broadcastreceiver/CMakeLists.txt
index ea057a647be..47497988adf 100644
--- a/examples/network/broadcastreceiver/CMakeLists.txt
+++ b/examples/network/broadcastreceiver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/broadcastreceiver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/broadcastreceiver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/broadcastsender/CMakeLists.txt b/examples/network/broadcastsender/CMakeLists.txt
index 0a1885cfbb6..2de88f3cb5c 100644
--- a/examples/network/broadcastsender/CMakeLists.txt
+++ b/examples/network/broadcastsender/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/broadcastsender")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/broadcastsender")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/dnslookup/CMakeLists.txt b/examples/network/dnslookup/CMakeLists.txt
index 721d89179fb..fb2b2728105 100644
--- a/examples/network/dnslookup/CMakeLists.txt
+++ b/examples/network/dnslookup/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/dnslookup")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/dnslookup")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Network)
diff --git a/examples/network/download/CMakeLists.txt b/examples/network/download/CMakeLists.txt
index b4124fc8a3b..8328b99cbab 100644
--- a/examples/network/download/CMakeLists.txt
+++ b/examples/network/download/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/download")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/download")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Network)
diff --git a/examples/network/downloadmanager/CMakeLists.txt b/examples/network/downloadmanager/CMakeLists.txt
index 8fc16bedb57..f1eddc7b14a 100644
--- a/examples/network/downloadmanager/CMakeLists.txt
+++ b/examples/network/downloadmanager/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/downloadmanager")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/downloadmanager")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Network)
diff --git a/examples/network/fortuneclient/CMakeLists.txt b/examples/network/fortuneclient/CMakeLists.txt
index d44e75b0fff..b504a621d22 100644
--- a/examples/network/fortuneclient/CMakeLists.txt
+++ b/examples/network/fortuneclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/fortuneclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/fortuneclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/fortuneserver/CMakeLists.txt b/examples/network/fortuneserver/CMakeLists.txt
index 2bcb9f076a1..9318c53bb69 100644
--- a/examples/network/fortuneserver/CMakeLists.txt
+++ b/examples/network/fortuneserver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/fortuneserver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/fortuneserver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/googlesuggest/CMakeLists.txt b/examples/network/googlesuggest/CMakeLists.txt
index 247980601ff..ea5fecb6b2a 100644
--- a/examples/network/googlesuggest/CMakeLists.txt
+++ b/examples/network/googlesuggest/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/googlesuggest")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/googlesuggest")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/http/CMakeLists.txt b/examples/network/http/CMakeLists.txt
index d9f50f5c9d1..d7ad5adaa65 100644
--- a/examples/network/http/CMakeLists.txt
+++ b/examples/network/http/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/http")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/http")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/loopback/CMakeLists.txt b/examples/network/loopback/CMakeLists.txt
index 8d42284914d..c3dc2ea559d 100644
--- a/examples/network/loopback/CMakeLists.txt
+++ b/examples/network/loopback/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/loopback")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/loopback")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/multicastreceiver/CMakeLists.txt b/examples/network/multicastreceiver/CMakeLists.txt
index f45b1b0db21..c46bb88c795 100644
--- a/examples/network/multicastreceiver/CMakeLists.txt
+++ b/examples/network/multicastreceiver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/multicastreceiver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multicastreceiver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/multicastsender/CMakeLists.txt b/examples/network/multicastsender/CMakeLists.txt
index 5ebd7cb7676..6aec72cb926 100644
--- a/examples/network/multicastsender/CMakeLists.txt
+++ b/examples/network/multicastsender/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/multicastsender")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multicastsender")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/multistreamclient/CMakeLists.txt b/examples/network/multistreamclient/CMakeLists.txt
index a4a4be05df8..482d4938e9d 100644
--- a/examples/network/multistreamclient/CMakeLists.txt
+++ b/examples/network/multistreamclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/multistreamclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multistreamclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/multistreamserver/CMakeLists.txt b/examples/network/multistreamserver/CMakeLists.txt
index ee871d06fad..1563084cbd0 100644
--- a/examples/network/multistreamserver/CMakeLists.txt
+++ b/examples/network/multistreamserver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/multistreamserver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multistreamserver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/network-chat/CMakeLists.txt b/examples/network/network-chat/CMakeLists.txt
index 4bd4879beb2..065d01a47e9 100644
--- a/examples/network/network-chat/CMakeLists.txt
+++ b/examples/network/network-chat/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/network-chat")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/network-chat")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/securesocketclient/CMakeLists.txt b/examples/network/securesocketclient/CMakeLists.txt
index 13cdeba66da..3909009ff5f 100644
--- a/examples/network/securesocketclient/CMakeLists.txt
+++ b/examples/network/securesocketclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/securesocketclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/securesocketclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/secureudpclient/CMakeLists.txt b/examples/network/secureudpclient/CMakeLists.txt
index 936d93524b1..0aac05a9ce8 100644
--- a/examples/network/secureudpclient/CMakeLists.txt
+++ b/examples/network/secureudpclient/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/secureudpclient")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/secureudpclient")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/secureudpserver/CMakeLists.txt b/examples/network/secureudpserver/CMakeLists.txt
index 70816aea6b5..ecb39244e91 100644
--- a/examples/network/secureudpserver/CMakeLists.txt
+++ b/examples/network/secureudpserver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/secureudpserver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/secureudpserver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/threadedfortuneserver/CMakeLists.txt b/examples/network/threadedfortuneserver/CMakeLists.txt
index 20463b14170..a6f044b9278 100644
--- a/examples/network/threadedfortuneserver/CMakeLists.txt
+++ b/examples/network/threadedfortuneserver/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/threadedfortuneserver")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/threadedfortuneserver")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/torrent/.prev_CMakeLists.txt b/examples/network/torrent/.prev_CMakeLists.txt
index b3ff66a4b38..bc2484d4ceb 100644
--- a/examples/network/torrent/.prev_CMakeLists.txt
+++ b/examples/network/torrent/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/torrent")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/torrent")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt
index 34df6e0c638..4c175fe1df9 100644
--- a/examples/network/torrent/CMakeLists.txt
+++ b/examples/network/torrent/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/network/torrent")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/torrent")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/2dpainting/CMakeLists.txt b/examples/opengl/2dpainting/CMakeLists.txt
index 31f8005a198..c8192dc5edb 100644
--- a/examples/opengl/2dpainting/CMakeLists.txt
+++ b/examples/opengl/2dpainting/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/2dpainting")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/2dpainting")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/computegles31/CMakeLists.txt b/examples/opengl/computegles31/CMakeLists.txt
index 2012fca361d..5960b349d4b 100644
--- a/examples/opengl/computegles31/CMakeLists.txt
+++ b/examples/opengl/computegles31/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/computegles31")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/computegles31")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/contextinfo/CMakeLists.txt b/examples/opengl/contextinfo/CMakeLists.txt
index 124dfd4b522..d3c31c856ef 100644
--- a/examples/opengl/contextinfo/CMakeLists.txt
+++ b/examples/opengl/contextinfo/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/contextinfo")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/contextinfo")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/cube/CMakeLists.txt b/examples/opengl/cube/CMakeLists.txt
index 2d0d0f78873..29b8f1ff560 100644
--- a/examples/opengl/cube/CMakeLists.txt
+++ b/examples/opengl/cube/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/cube")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/cube")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/hellogl2/CMakeLists.txt b/examples/opengl/hellogl2/CMakeLists.txt
index 798a83594e4..2647d5c364e 100644
--- a/examples/opengl/hellogl2/CMakeLists.txt
+++ b/examples/opengl/hellogl2/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/hellogl2")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellogl2")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/hellogles3/CMakeLists.txt b/examples/opengl/hellogles3/CMakeLists.txt
index 7e8a5e57a75..7595e9116a2 100644
--- a/examples/opengl/hellogles3/CMakeLists.txt
+++ b/examples/opengl/hellogles3/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/hellogles3")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellogles3")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/hellowindow/CMakeLists.txt b/examples/opengl/hellowindow/CMakeLists.txt
index 876c282fbe5..83cd5cb758f 100644
--- a/examples/opengl/hellowindow/CMakeLists.txt
+++ b/examples/opengl/hellowindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/hellowindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellowindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/openglwindow/CMakeLists.txt b/examples/opengl/openglwindow/CMakeLists.txt
index 9780e18c7ff..bebdf0c195d 100644
--- a/examples/opengl/openglwindow/CMakeLists.txt
+++ b/examples/opengl/openglwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/openglwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/openglwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/paintedwindow/CMakeLists.txt b/examples/opengl/paintedwindow/CMakeLists.txt
index 2711bdc45be..047174fb9e7 100644
--- a/examples/opengl/paintedwindow/CMakeLists.txt
+++ b/examples/opengl/paintedwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/paintedwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/paintedwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/qopenglwidget/CMakeLists.txt b/examples/opengl/qopenglwidget/CMakeLists.txt
index 10b30f9461c..c42251e4f26 100644
--- a/examples/opengl/qopenglwidget/CMakeLists.txt
+++ b/examples/opengl/qopenglwidget/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/qopenglwidget")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/qopenglwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/qopenglwindow/CMakeLists.txt b/examples/opengl/qopenglwindow/CMakeLists.txt
index 9d354d376b5..c3fcfb855d6 100644
--- a/examples/opengl/qopenglwindow/CMakeLists.txt
+++ b/examples/opengl/qopenglwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/qopenglwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/qopenglwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/textures/CMakeLists.txt b/examples/opengl/textures/CMakeLists.txt
index 1bb4ae62403..0fcbffb524c 100644
--- a/examples/opengl/textures/CMakeLists.txt
+++ b/examples/opengl/textures/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/textures")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/textures")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/opengl/threadedqopenglwidget/CMakeLists.txt b/examples/opengl/threadedqopenglwidget/CMakeLists.txt
index f5368f89ef2..4a03def63c1 100644
--- a/examples/opengl/threadedqopenglwidget/CMakeLists.txt
+++ b/examples/opengl/threadedqopenglwidget/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/opengl/threadedqopenglwidget")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/threadedqopenglwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qpa/CMakeLists.txt b/examples/qpa/CMakeLists.txt
index 0ae7f61e57e..6768aa052dd 100644
--- a/examples/qpa/CMakeLists.txt
+++ b/examples/qpa/CMakeLists.txt
@@ -1,4 +1,7 @@
# Generated from qpa.pro.
+if(NOT TARGET Qt::Gui)
+ return()
+endif()
add_subdirectory(windows)
add_subdirectory(qrasterwindow)
diff --git a/examples/qpa/qrasterwindow/CMakeLists.txt b/examples/qpa/qrasterwindow/CMakeLists.txt
index 8fd75f10798..4e3444d0b7c 100644
--- a/examples/qpa/qrasterwindow/CMakeLists.txt
+++ b/examples/qpa/qrasterwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qpa/qrasterwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qpa/qrasterwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt
index 4eeab0e3bc0..93d3d519fd1 100644
--- a/examples/qpa/windows/CMakeLists.txt
+++ b/examples/qpa/windows/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qpa/windows")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qpa/windows")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/CMakeLists.txt b/examples/qtconcurrent/CMakeLists.txt
index 13cfed87734..ed1be7ec4d3 100644
--- a/examples/qtconcurrent/CMakeLists.txt
+++ b/examples/qtconcurrent/CMakeLists.txt
@@ -1,5 +1,7 @@
-if(TARGET Qt::Gui)
- add_subdirectory(map)
+# Generated from qtconcurrent.pro.
+
+if(NOT TARGET Qt::Concurrent)
+ return()
endif()
if(TARGET Qt::Widgets)
add_subdirectory(imagescaling)
@@ -7,3 +9,6 @@ if(TARGET Qt::Widgets)
add_subdirectory(runfunction)
add_subdirectory(wordcount)
endif()
+if(TARGET Qt::Gui)
+ add_subdirectory(map)
+endif()
diff --git a/examples/qtconcurrent/imagescaling/CMakeLists.txt b/examples/qtconcurrent/imagescaling/CMakeLists.txt
index 8585ed89a03..350261d0a40 100644
--- a/examples/qtconcurrent/imagescaling/CMakeLists.txt
+++ b/examples/qtconcurrent/imagescaling/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/imagescaling")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/imagescaling")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/map/.prev_CMakeLists.txt b/examples/qtconcurrent/map/.prev_CMakeLists.txt
index 8e158b23973..65ff5ad455e 100644
--- a/examples/qtconcurrent/map/.prev_CMakeLists.txt
+++ b/examples/qtconcurrent/map/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/map")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/map")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/map/CMakeLists.txt b/examples/qtconcurrent/map/CMakeLists.txt
index e5a3ba1c665..8cf29e25b7a 100644
--- a/examples/qtconcurrent/map/CMakeLists.txt
+++ b/examples/qtconcurrent/map/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/map")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/map")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/progressdialog/CMakeLists.txt b/examples/qtconcurrent/progressdialog/CMakeLists.txt
index 912490bd653..f1c07b78245 100644
--- a/examples/qtconcurrent/progressdialog/CMakeLists.txt
+++ b/examples/qtconcurrent/progressdialog/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/progressdialog")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/progressdialog")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/runfunction/CMakeLists.txt b/examples/qtconcurrent/runfunction/CMakeLists.txt
index a8cb3de4d43..088d23c32b1 100644
--- a/examples/qtconcurrent/runfunction/CMakeLists.txt
+++ b/examples/qtconcurrent/runfunction/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/runfunction")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/runfunction")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtconcurrent/wordcount/CMakeLists.txt b/examples/qtconcurrent/wordcount/CMakeLists.txt
index 22d78c3877c..440b3139262 100644
--- a/examples/qtconcurrent/wordcount/CMakeLists.txt
+++ b/examples/qtconcurrent/wordcount/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/wordcount")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/wordcount")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtestlib/CMakeLists.txt b/examples/qtestlib/CMakeLists.txt
index 83e7df57686..a98c499c00a 100644
--- a/examples/qtestlib/CMakeLists.txt
+++ b/examples/qtestlib/CMakeLists.txt
@@ -1,5 +1,8 @@
# Generated from qtestlib.pro.
+if(NOT QT_BUILD_PARTS___contains___tools OR NOT TARGET Qt::Widgets)
+ return()
+endif()
add_subdirectory(tutorial1)
add_subdirectory(tutorial2)
add_subdirectory(tutorial3)
diff --git a/examples/qtestlib/tutorial1/CMakeLists.txt b/examples/qtestlib/tutorial1/CMakeLists.txt
index 27b5d886b5d..1c3e0f5440a 100644
--- a/examples/qtestlib/tutorial1/CMakeLists.txt
+++ b/examples/qtestlib/tutorial1/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial1")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial1")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtestlib/tutorial2/CMakeLists.txt b/examples/qtestlib/tutorial2/CMakeLists.txt
index 2a3a53ad344..fd62980f257 100644
--- a/examples/qtestlib/tutorial2/CMakeLists.txt
+++ b/examples/qtestlib/tutorial2/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial2")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial2")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtestlib/tutorial3/CMakeLists.txt b/examples/qtestlib/tutorial3/CMakeLists.txt
index f7a76b3b4f7..08d5c3318d9 100644
--- a/examples/qtestlib/tutorial3/CMakeLists.txt
+++ b/examples/qtestlib/tutorial3/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial3")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial3")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtestlib/tutorial4/CMakeLists.txt b/examples/qtestlib/tutorial4/CMakeLists.txt
index 40a6f4b9e2d..e4b99ad7541 100644
--- a/examples/qtestlib/tutorial4/CMakeLists.txt
+++ b/examples/qtestlib/tutorial4/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial4")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial4")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/qtestlib/tutorial5/CMakeLists.txt b/examples/qtestlib/tutorial5/CMakeLists.txt
index 88f5efb995f..a2f51a08c72 100644
--- a/examples/qtestlib/tutorial5/CMakeLists.txt
+++ b/examples/qtestlib/tutorial5/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial5")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial5")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/.prev_CMakeLists.txt b/examples/sql/.prev_CMakeLists.txt
new file mode 100644
index 00000000000..18e9112f119
--- /dev/null
+++ b/examples/sql/.prev_CMakeLists.txt
@@ -0,0 +1,18 @@
+# Generated from sql.pro.
+
+if(NOT TARGET Qt::Widgets)
+ return()
+endif()
+add_subdirectory(books)
+add_subdirectory(drilldown)
+add_subdirectory(cachedtable)
+add_subdirectory(querymodel)
+add_subdirectory(relationaltablemodel)
+add_subdirectory(sqlwidgetmapper)
+add_subdirectory(tablemodel)
+if(TARGET Qt::Xml)
+ add_subdirectory(masterdetail)
+endif()
+if(QT_BUILD_PARTS___contains___tools AND NOT CMAKE_CROSSCOMPILING)
+ add_subdirectory(sqlbrowser)
+endif()
diff --git a/examples/sql/CMakeLists.txt b/examples/sql/CMakeLists.txt
index ca15f22baf2..e54fc0860f2 100644
--- a/examples/sql/CMakeLists.txt
+++ b/examples/sql/CMakeLists.txt
@@ -1,5 +1,8 @@
# Generated from sql.pro.
+if(NOT TARGET Qt::Widgets)
+ return()
+endif()
add_subdirectory(books)
add_subdirectory(drilldown)
add_subdirectory(cachedtable)
@@ -7,7 +10,6 @@ add_subdirectory(querymodel)
add_subdirectory(relationaltablemodel)
add_subdirectory(sqlwidgetmapper)
add_subdirectory(tablemodel)
-
if(TARGET Qt::Xml)
add_subdirectory(masterdetail)
endif()
diff --git a/examples/sql/books/CMakeLists.txt b/examples/sql/books/CMakeLists.txt
index 870d90bf14b..92205f8325f 100644
--- a/examples/sql/books/CMakeLists.txt
+++ b/examples/sql/books/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/books")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/books")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/cachedtable/CMakeLists.txt b/examples/sql/cachedtable/CMakeLists.txt
index 872c462fdd9..b67a418b1dc 100644
--- a/examples/sql/cachedtable/CMakeLists.txt
+++ b/examples/sql/cachedtable/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/cachedtable")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/cachedtable")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/drilldown/CMakeLists.txt b/examples/sql/drilldown/CMakeLists.txt
index 5b6bea04235..d8bcd529531 100644
--- a/examples/sql/drilldown/CMakeLists.txt
+++ b/examples/sql/drilldown/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/drilldown")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/drilldown")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/masterdetail/CMakeLists.txt b/examples/sql/masterdetail/CMakeLists.txt
index 70524616013..62c97fc074d 100644
--- a/examples/sql/masterdetail/CMakeLists.txt
+++ b/examples/sql/masterdetail/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/masterdetail")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/masterdetail")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/querymodel/CMakeLists.txt b/examples/sql/querymodel/CMakeLists.txt
index e4127baeeff..94c3dd324c1 100644
--- a/examples/sql/querymodel/CMakeLists.txt
+++ b/examples/sql/querymodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/querymodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/querymodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/relationaltablemodel/CMakeLists.txt b/examples/sql/relationaltablemodel/CMakeLists.txt
index c758f3c32d6..dcf39bb1c4e 100644
--- a/examples/sql/relationaltablemodel/CMakeLists.txt
+++ b/examples/sql/relationaltablemodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/relationaltablemodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/relationaltablemodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/sqlbrowser/CMakeLists.txt b/examples/sql/sqlbrowser/CMakeLists.txt
index 833b57f1a18..1de8662b261 100644
--- a/examples/sql/sqlbrowser/CMakeLists.txt
+++ b/examples/sql/sqlbrowser/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/sqlbrowser")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/sqlbrowser")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/sqlwidgetmapper/CMakeLists.txt b/examples/sql/sqlwidgetmapper/CMakeLists.txt
index 8d8a1a82ed3..79f4442d928 100644
--- a/examples/sql/sqlwidgetmapper/CMakeLists.txt
+++ b/examples/sql/sqlwidgetmapper/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/sqlwidgetmapper")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/sqlwidgetmapper")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/sql/tablemodel/CMakeLists.txt b/examples/sql/tablemodel/CMakeLists.txt
index 85e1bd9167a..6de08f6c1a6 100644
--- a/examples/sql/tablemodel/CMakeLists.txt
+++ b/examples/sql/tablemodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/sql/tablemodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/tablemodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/vulkan/hellovulkancubes/CMakeLists.txt b/examples/vulkan/hellovulkancubes/CMakeLists.txt
index 94feac6401d..ebfd066d1fc 100644
--- a/examples/vulkan/hellovulkancubes/CMakeLists.txt
+++ b/examples/vulkan/hellovulkancubes/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkancubes")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkancubes")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/vulkan/hellovulkantexture/CMakeLists.txt b/examples/vulkan/hellovulkantexture/CMakeLists.txt
index 59e019998c1..9c7a5fafd9f 100644
--- a/examples/vulkan/hellovulkantexture/CMakeLists.txt
+++ b/examples/vulkan/hellovulkantexture/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkantexture")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkantexture")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/vulkan/hellovulkantriangle/CMakeLists.txt b/examples/vulkan/hellovulkantriangle/CMakeLists.txt
index dae891ea079..e8003515cd7 100644
--- a/examples/vulkan/hellovulkantriangle/CMakeLists.txt
+++ b/examples/vulkan/hellovulkantriangle/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkantriangle")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkantriangle")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/vulkan/hellovulkanwidget/CMakeLists.txt b/examples/vulkan/hellovulkanwidget/CMakeLists.txt
index 6dde273e947..cee9da8711a 100644
--- a/examples/vulkan/hellovulkanwidget/CMakeLists.txt
+++ b/examples/vulkan/hellovulkanwidget/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkanwidget")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkanwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/vulkan/hellovulkanwindow/CMakeLists.txt b/examples/vulkan/hellovulkanwindow/CMakeLists.txt
index 3a20345899b..9aed2678f3b 100644
--- a/examples/vulkan/hellovulkanwindow/CMakeLists.txt
+++ b/examples/vulkan/hellovulkanwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkanwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkanwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/animatedtiles/CMakeLists.txt b/examples/widgets/animation/animatedtiles/CMakeLists.txt
index b8755a33213..318ac77f8f9 100644
--- a/examples/widgets/animation/animatedtiles/CMakeLists.txt
+++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/animatedtiles")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt
index 6b09e45cffd..120d6242122 100644
--- a/examples/widgets/animation/easing/CMakeLists.txt
+++ b/examples/widgets/animation/easing/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/easing")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/easing")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/moveblocks/CMakeLists.txt b/examples/widgets/animation/moveblocks/CMakeLists.txt
index c5219c9e6a4..ed17097f5d9 100644
--- a/examples/widgets/animation/moveblocks/CMakeLists.txt
+++ b/examples/widgets/animation/moveblocks/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/moveblocks")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt
index cddcc6a7a31..6dd9847f03b 100644
--- a/examples/widgets/animation/states/CMakeLists.txt
+++ b/examples/widgets/animation/states/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/states")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/states")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/stickman/CMakeLists.txt b/examples/widgets/animation/stickman/CMakeLists.txt
index 791e685fc22..07f3d96ea07 100644
--- a/examples/widgets/animation/stickman/CMakeLists.txt
+++ b/examples/widgets/animation/stickman/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/stickman")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt
index 74f095f4f61..4967673c692 100644
--- a/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt
+++ b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/sub-attaq")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt
index 2e4e455b34a..a2249ea03b8 100644
--- a/examples/widgets/animation/sub-attaq/CMakeLists.txt
+++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/animation/sub-attaq")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt
index 3145dd41e52..6e07c3619bc 100644
--- a/examples/widgets/desktop/screenshot/CMakeLists.txt
+++ b/examples/widgets/desktop/screenshot/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/desktop/screenshot")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt
index 16af7808d7c..369d155380a 100644
--- a/examples/widgets/desktop/systray/CMakeLists.txt
+++ b/examples/widgets/desktop/systray/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/desktop/systray")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt
index 0a85f02b215..da17199827f 100644
--- a/examples/widgets/dialogs/classwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/classwizard")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt
index dfac53a3f68..ed1aabc3c4f 100644
--- a/examples/widgets/dialogs/extension/CMakeLists.txt
+++ b/examples/widgets/dialogs/extension/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/extension")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt
index 42681ca424c..c8c1cf9bc1c 100644
--- a/examples/widgets/dialogs/findfiles/CMakeLists.txt
+++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/findfiles")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index 20b4b7d7999..51e1d3b5cec 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/licensewizard")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
index ed4c11b0416..9651889d362 100644
--- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
+++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/standarddialogs")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
index 0df1238e560..3ae2bc50288 100644
--- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt
+++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/tabdialog")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
index 759483ab8fb..547a4c0c339 100644
--- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/trivialwizard")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
index 56956577921..74ebc879ce9 100644
--- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draggableicons")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicons")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
index d3dfc125b2f..8b2e249b00d 100644
--- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draggabletext")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/dropsite/CMakeLists.txt b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
index 7d6ce02b4b6..0b4f725ba1e 100644
--- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt
+++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/dropsite")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
index 31441ab7cbc..ea4c9047e0e 100644
--- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
+++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/fridgemagnets")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt b/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt
index 148f386115a..b7b6fa8373f 100644
--- a/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt
+++ b/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/puzzle")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/puzzle")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
index b181efd0902..01c60cc6843 100644
--- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt
+++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draganddrop_puzzle") # special case
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop_puzzle") # special case
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/effects/blurpicker/CMakeLists.txt b/examples/widgets/effects/blurpicker/CMakeLists.txt
index 3f9fa69797b..1f1b6b934b9 100644
--- a/examples/widgets/effects/blurpicker/CMakeLists.txt
+++ b/examples/widgets/effects/blurpicker/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/effects/blurpicker")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/effects/fademessage/CMakeLists.txt b/examples/widgets/effects/fademessage/CMakeLists.txt
index b84985a8860..b04df617d26 100644
--- a/examples/widgets/effects/fademessage/CMakeLists.txt
+++ b/examples/widgets/effects/fademessage/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/effects/fademessage")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/gallery/CMakeLists.txt b/examples/widgets/gallery/CMakeLists.txt
index 67e2a6bede2..0ad292853e1 100644
--- a/examples/widgets/gallery/CMakeLists.txt
+++ b/examples/widgets/gallery/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/gallery")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/gallery")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/gestures/imagegestures/CMakeLists.txt b/examples/widgets/gestures/imagegestures/CMakeLists.txt
index 9676089ff9b..b3c78e33493 100644
--- a/examples/widgets/gestures/imagegestures/CMakeLists.txt
+++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/gestures/imagegestures")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
index c04890d613e..bf37edacafd 100644
--- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/anchorlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
index 18c35e6a3e5..3e5ea4d8672 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/basicgraphicslayouts")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphicslayouts")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt b/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt
index b82c3eced8b..59ff14f6d4f 100644
--- a/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/chip")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index 41af2553eea..e88d1fe3695 100644
--- a/examples/widgets/graphicsview/chip/CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/chip")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
index c2b0479e766..fa7faa77376 100644
--- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
+++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/collidingmice")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmice")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
index 26afe90016a..9efaf3abc07 100644
--- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
+++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/diagramscene")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
index db6c34065ed..5ae6fdb27a4 100644
--- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
+++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/dragdroprobot")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobot")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
index 5dc52c97556..6d0c87b1317 100644
--- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/elasticnodes")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
index 0b9df4b4d6a..ea99825421f 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
+++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/embeddeddialogs")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddialogs")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt
index ce24a9fcb2e..bef01a1f8f7 100644
--- a/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/flowlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/flowlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
index 50f41f77828..984c231e50e 100644
--- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/graphicsview_flowlayout") # special case
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview_flowlayout") # special case
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
index 6514f07a5ab..e00a7d40a5f 100644
--- a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/padnavigator")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
index a84d3f08d16..cb21f80d22a 100644
--- a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/padnavigator")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
index c7ea760ede9..306a362c7b8 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/simpleanchorlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchorlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index d6ca46ab22c..b28aefe00b0 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/weatheranchorlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt
index 5c14da9ac53..b3d8e37f34e 100644
--- a/examples/widgets/itemviews/addressbook/CMakeLists.txt
+++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/addressbook")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
index 90862ac0b04..478bb9f30da 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/basicsortfiltermodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfiltermodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt
index 5788215de64..3879b8f05ea 100644
--- a/examples/widgets/itemviews/chart/CMakeLists.txt
+++ b/examples/widgets/itemviews/chart/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/chart")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
index 3ec96a2fc4a..d98c47a4114 100644
--- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
+++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/coloreditorfactory")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfactory")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
index c8a0bc1438b..8a1dc0b406d 100644
--- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/combowidgetmapper")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
index 859b88a397a..62031c64143 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/customsortfiltermodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfiltermodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt
index 6cb902c092a..d1d74c59e13 100644
--- a/examples/widgets/itemviews/dirview/CMakeLists.txt
+++ b/examples/widgets/itemviews/dirview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/dirview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
index faae8e1a808..585563a3515 100644
--- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/editabletreemodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
index fea985d049b..0ad7a5e19f3 100644
--- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/fetchmore")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
index c0c4ef6146e..e1a9dac0d2e 100644
--- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt
+++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/flattreeview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
index dab2e0a1537..0703de1e8b7 100644
--- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
+++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/frozencolumn")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt
index c27018ffa4d..56864a18139 100644
--- a/examples/widgets/itemviews/interview/CMakeLists.txt
+++ b/examples/widgets/itemviews/interview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/interview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
index 1c8ccc6f81d..3da67b14dea 100644
--- a/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
+++ b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt
index aba494c31ad..99c95a4a594 100644
--- a/examples/widgets/itemviews/pixelator/CMakeLists.txt
+++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
index 17765e9d473..4ab41084451 100644
--- a/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
+++ b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt
index 53494d37f1c..e1d1de1a34d 100644
--- a/examples/widgets/itemviews/puzzle/CMakeLists.txt
+++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
index e22e3fe1ad6..7828b911e4f 100644
--- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpledommodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
index 8a6607e584b..54ab94eed6f 100644
--- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpletreemodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
index 163dc98e2c2..bceebf16761 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simplewidgetmapper")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmapper")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
index b73158cd5a9..3466ea1f6c0 100644
--- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spinboxdelegate")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
index acf5f187fe6..9a74c7d216a 100644
--- a/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
+++ b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
index b1fc6ff01a1..44c3d557c7c 100644
--- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
+++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
index 5f6f660488c..05b0fd105b7 100644
--- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/stardelegate")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
index 99b4f13861c..ca6ef3bc26a 100644
--- a/examples/widgets/itemviews/storageview/CMakeLists.txt
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/storageview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/layouts/basiclayouts/CMakeLists.txt b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
index beb8a0ca90b..5ffc4eafb41 100644
--- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/basiclayouts")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt
index f4e51d2fab0..247f2b60d8a 100644
--- a/examples/widgets/layouts/borderlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/borderlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
index c2bcd050d5e..ecf77a3f37f 100644
--- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/dynamiclayouts")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt
index 85104eb3eb3..8ae7bca5596 100644
--- a/examples/widgets/layouts/flowlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/flowlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt
index d66c2ff38a4..d57bec2fc2f 100644
--- a/examples/widgets/mainwindows/application/CMakeLists.txt
+++ b/examples/widgets/mainwindows/application/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/application")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt
index 7bd57f1439e..d61059e09bc 100644
--- a/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/dockwidgets")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
index b8110946583..c752c3be296 100644
--- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/dockwidgets")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
index 3152fb0904b..dee27b42017 100644
--- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/mainwindow")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt
index c75049285d1..812d6e2f9fc 100644
--- a/examples/widgets/mainwindows/mdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/mdi")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt
index 0e76c3a4470..a6c207d3645 100644
--- a/examples/widgets/mainwindows/menus/CMakeLists.txt
+++ b/examples/widgets/mainwindows/menus/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/menus")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt
index f9d7d5ff3f3..1086bde4871 100644
--- a/examples/widgets/mainwindows/sdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/sdi")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/affine/.prev_CMakeLists.txt b/examples/widgets/painting/affine/.prev_CMakeLists.txt
index 948456d8212..9d0031d5659 100644
--- a/examples/widgets/painting/affine/.prev_CMakeLists.txt
+++ b/examples/widgets/painting/affine/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/affine")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index 56e862d20f4..8e51a925d22 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/affine")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index b7d4f0a24a3..864ce8e7402 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/basicdrawing")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/composition/.prev_CMakeLists.txt b/examples/widgets/painting/composition/.prev_CMakeLists.txt
index c5b1d12e4ab..a61e5fe2dd4 100644
--- a/examples/widgets/painting/composition/.prev_CMakeLists.txt
+++ b/examples/widgets/painting/composition/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/composition")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index 89e356b7ae6..0b359735d2b 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/composition")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index 44d907f12fa..6ce21e49d31 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/concentriccircles")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircles")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/deform/.prev_CMakeLists.txt b/examples/widgets/painting/deform/.prev_CMakeLists.txt
index 4a223487ab0..9fc526fb61f 100644
--- a/examples/widgets/painting/deform/.prev_CMakeLists.txt
+++ b/examples/widgets/painting/deform/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/deform")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index 79c14d2196b..56a54a41d87 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/deform")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index 11ad8a32424..adb1d42a9f2 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/fontsampler")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/fontsampler")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/gradients/.prev_CMakeLists.txt b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
index f28694a96bf..6ba984b3bdd 100644
--- a/examples/widgets/painting/gradients/.prev_CMakeLists.txt
+++ b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index 0b6c06e5b9e..38c3a8fd9e4 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index 1b3d06da8f0..37676e32e23 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/imagecomposition")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 7ae6f0a0160..71a250ea187 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/painterpaths")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index 9f5c24fe884..655a6c95ed1 100644
--- a/examples/widgets/painting/pathstroke/CMakeLists.txt
+++ b/examples/widgets/painting/pathstroke/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/pathstroke")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index b5725967eaa..edc27b85342 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/painting/transformations")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt
index 9cfc150a0eb..0fd588b2466 100644
--- a/examples/widgets/richtext/calendar/CMakeLists.txt
+++ b/examples/widgets/richtext/calendar/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/calendar")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt
index fc92c60c30c..ab5b59ec5dc 100644
--- a/examples/widgets/richtext/orderform/CMakeLists.txt
+++ b/examples/widgets/richtext/orderform/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/orderform")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
index ec98b1af4f2..163efaf5fff 100644
--- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
+++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/syntaxhighlighter")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighter")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/richtext/textedit/.prev_CMakeLists.txt b/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
index dcb2b628efa..7eb5f0aae96 100644
--- a/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
+++ b/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/textedit")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt
index 8aa4e016fe9..cd875f49c5b 100644
--- a/examples/widgets/richtext/textedit/CMakeLists.txt
+++ b/examples/widgets/richtext/textedit/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/textedit")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt
index 6e389956e9f..7520cf79142 100644
--- a/examples/widgets/scroller/graphicsview/CMakeLists.txt
+++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/scroller/graphicsview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
index c011eb1e0fa..642e6343db0 100644
--- a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
+++ b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/eventtransitions")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/statemachine/factorial/CMakeLists.txt b/examples/widgets/statemachine/factorial/CMakeLists.txt
index e4c5ddc92d1..17904e3cd2e 100644
--- a/examples/widgets/statemachine/factorial/CMakeLists.txt
+++ b/examples/widgets/statemachine/factorial/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/factorial")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/widgets/statemachine/pingpong/CMakeLists.txt b/examples/widgets/statemachine/pingpong/CMakeLists.txt
index e194afb59e2..68cb4acb443 100644
--- a/examples/widgets/statemachine/pingpong/CMakeLists.txt
+++ b/examples/widgets/statemachine/pingpong/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/pingpong")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/widgets/statemachine/rogue/CMakeLists.txt b/examples/widgets/statemachine/rogue/CMakeLists.txt
index 0142f60f633..156b0543118 100644
--- a/examples/widgets/statemachine/rogue/CMakeLists.txt
+++ b/examples/widgets/statemachine/rogue/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/rogue")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/statemachine/trafficlight/CMakeLists.txt b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
index 4069f601efb..ca2ec2313ae 100644
--- a/examples/widgets/statemachine/trafficlight/CMakeLists.txt
+++ b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/trafficlight")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
index 05a8b87004a..91abfc0db0f 100644
--- a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
+++ b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/twowaybutton")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt
index b60d38cfdcc..18359e54e3a 100644
--- a/examples/widgets/tools/completer/CMakeLists.txt
+++ b/examples/widgets/tools/completer/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/completer")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/completer")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt
index a1b1deee12b..1e8203b170c 100644
--- a/examples/widgets/tools/customcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/customcompleter/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/customcompleter")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt
index cd116482d8e..a3a3201d7eb 100644
--- a/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 5ca9e750738..f87513a70b6 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
index 9f3a93b3bdc..1ca49a1aca6 100644
--- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
@@ -9,13 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin/plugins")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin/plugins")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
-add_library(echoplugin MODULE
+qt_add_plugin(echoplugin)
+target_sources(echoplugin PRIVATE
echoplugin.cpp echoplugin.h
)
target_include_directories(echoplugin PUBLIC
diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt
index 783829fe104..e01508229fb 100644
--- a/examples/widgets/tools/i18n/CMakeLists.txt
+++ b/examples/widgets/tools/i18n/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/i18n")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt
index 0a7a7155ad7..2ec3418964c 100644
--- a/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index 5548074446b..07f6810bd64 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
index b0a752718f6..8baeb5357d2 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint/plugins")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
index 57f37843b8d..1c2d500497e 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint/plugins")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt
index be8fb60a447..da31574e8ba 100644
--- a/examples/widgets/tools/regularexpression/CMakeLists.txt
+++ b/examples/widgets/tools/regularexpression/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/regularexpression")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt
index 3ded759084d..957d0a0fa8f 100644
--- a/examples/widgets/tools/settingseditor/CMakeLists.txt
+++ b/examples/widgets/tools/settingseditor/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/settingseditor")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
index c1be706fde8..84266d0068b 100644
--- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
@@ -9,13 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/styleplugin/styles")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin/styles")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
-add_library(simplestyleplugin MODULE
+qt_add_plugin(simplestyleplugin)
+target_sources(simplestyleplugin PRIVATE
simplestyle.cpp simplestyle.h
simplestyleplugin.cpp simplestyleplugin.h
)
diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
index 06ae198b42e..4f8e652ede5 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/styleplugin")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index 71528b14b92..02a68df7e86 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/treemodelcompleter")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt
index 34bcac326cb..151825cf339 100644
--- a/examples/widgets/tools/undo/CMakeLists.txt
+++ b/examples/widgets/tools/undo/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/undo")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undo")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt
index 33b315d4e5b..59fc1a36a12 100644
--- a/examples/widgets/tools/undoframework/CMakeLists.txt
+++ b/examples/widgets/tools/undoframework/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tools/undoframework")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt
index cad784f9ecb..61ef07e133f 100644
--- a/examples/widgets/touch/dials/CMakeLists.txt
+++ b/examples/widgets/touch/dials/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/touch/dials")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/dials")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt b/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt
index f66e866cab2..05e3a2b3ac9 100644
--- a/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt
+++ b/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/touch/fingerpaint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt
index cc2c8caacff..7ed9a791dde 100644
--- a/examples/widgets/touch/fingerpaint/CMakeLists.txt
+++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/touch/fingerpaint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/touch/knobs/CMakeLists.txt b/examples/widgets/touch/knobs/CMakeLists.txt
index a3d44bf6509..20cbc7b1f57 100644
--- a/examples/widgets/touch/knobs/CMakeLists.txt
+++ b/examples/widgets/touch/knobs/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/touch/knobs")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt
index 08663b75afd..6a31f781bfe 100644
--- a/examples/widgets/touch/pinchzoom/CMakeLists.txt
+++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/touch/pinchzoom")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
index f07c38f5086..d11fb80b863 100644
--- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part1")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part1")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
index 07fb93d02f1..dd0716be135 100644
--- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part2")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part2")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
index 89d76cc9ee0..c6c5bad9ba5 100644
--- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part3")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part3")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
index 325490517bc..87ce53f9b11 100644
--- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part4")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part4")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
index d2ac0f18d88..10d2a6b2498 100644
--- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part5")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part5")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
index a9375d8913a..1e0c0463ca0 100644
--- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part6")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part6")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
index 16cc1391e50..199158c4540 100644
--- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part7")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part7")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
index 4cf9a49d1ea..58c9d877ba5 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part1")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part1")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
index f5ab1d10d1a..0e0c8595350 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part2")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part2")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
index c152c765e29..e5f146712fe 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part3")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part3")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
index 770d9590b77..00f5cab2918 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part4")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part4")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
index 3369838e959..0e39536e95c 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part5")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part5")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
index cc34842bcfb..4f70b55ebb3 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/1_readonly")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_readonly")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
index 7f8d68b6f82..17f6987baa8 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/2_formatting")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_formatting")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
index aace87e2ab5..4d5dbfeea62 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/3_changingmodel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_changingmodel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
index 9d2f9cd7e83..e6a138c2864 100644
--- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/4_headers")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_headers")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
index 50af3c39a46..2d631172386 100644
--- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/5_edit")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edit")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
index 435ff71c0f4..e6c56365edf 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/6_treeview")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_treeview")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
index e0d591ab29e..188ef60bcfa 100644
--- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/7_selections")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_selections")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt b/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
index 3d874dec973..a31c2ed093f 100644
--- a/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/notepad")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt
index aab7e536b38..77a763b044a 100644
--- a/examples/widgets/tutorials/notepad/CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/notepad")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
index 4119f69fd53..e09d1ec6ae3 100644
--- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/childwidget")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
index 75387bd9e5c..8ed3501ceab 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/nestedlayouts")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedlayouts")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
index 6d2bdb5ba54..3b7c50d5bf9 100644
--- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/toplevel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/toplevel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
index 07b50185f3e..e6d9c70b677 100644
--- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/windowlayout")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowlayout")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt
index 8f7639df707..bc0040baf76 100644
--- a/examples/widgets/widgets/analogclock/CMakeLists.txt
+++ b/examples/widgets/widgets/analogclock/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/analogclock")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt
index 89ee6e9ccbb..1475ebe0a06 100644
--- a/examples/widgets/widgets/calculator/CMakeLists.txt
+++ b/examples/widgets/widgets/calculator/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/calculator")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
index 00c1b8154a7..d0641961b8e 100644
--- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt
+++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/calendarwidget")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt
index 8ecaf5af202..5668ae96b0d 100644
--- a/examples/widgets/widgets/charactermap/CMakeLists.txt
+++ b/examples/widgets/widgets/charactermap/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/charactermap")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt
index 790b9bc1033..632f2661d40 100644
--- a/examples/widgets/widgets/codeeditor/CMakeLists.txt
+++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/codeeditor")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt
index 904c53890d3..cf0257f34a5 100644
--- a/examples/widgets/widgets/digitalclock/CMakeLists.txt
+++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/digitalclock")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
index b9841c00f1f..041add330ff 100644
--- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt
+++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/elidedlabel")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/groupbox/CMakeLists.txt b/examples/widgets/widgets/groupbox/CMakeLists.txt
index dbccf0b2222..8ce733c2261 100644
--- a/examples/widgets/widgets/groupbox/CMakeLists.txt
+++ b/examples/widgets/widgets/groupbox/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/groupbox")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/icons/.prev_CMakeLists.txt b/examples/widgets/widgets/icons/.prev_CMakeLists.txt
index 01cc94abdb3..da1313abc52 100644
--- a/examples/widgets/widgets/icons/.prev_CMakeLists.txt
+++ b/examples/widgets/widgets/icons/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/icons")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt
index f154c534f91..4f4c104fc4f 100644
--- a/examples/widgets/widgets/icons/CMakeLists.txt
+++ b/examples/widgets/widgets/icons/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/icons")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt b/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt
index d5911d117f6..f939062f572 100644
--- a/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt
+++ b/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/imageviewer")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt
index fefccbbd1b2..80f3bd9d2fc 100644
--- a/examples/widgets/widgets/imageviewer/CMakeLists.txt
+++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/imageviewer")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/lineedits/CMakeLists.txt b/examples/widgets/widgets/lineedits/CMakeLists.txt
index ca9393c323f..da5a88224ce 100644
--- a/examples/widgets/widgets/lineedits/CMakeLists.txt
+++ b/examples/widgets/widgets/lineedits/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/lineedits")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
index 625e068cc00..cbc141c0c2d 100644
--- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt
+++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/mousebuttons")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt
index 140fff2cc87..ebd42761c2a 100644
--- a/examples/widgets/widgets/movie/CMakeLists.txt
+++ b/examples/widgets/widgets/movie/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/movie")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/scribble/.prev_CMakeLists.txt b/examples/widgets/widgets/scribble/.prev_CMakeLists.txt
index dff1bccec7d..c40542de912 100644
--- a/examples/widgets/widgets/scribble/.prev_CMakeLists.txt
+++ b/examples/widgets/widgets/scribble/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/scribble")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt
index ca2f7b590ec..5d0b1c913ff 100644
--- a/examples/widgets/widgets/scribble/CMakeLists.txt
+++ b/examples/widgets/widgets/scribble/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/scribble")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/shapedclock/CMakeLists.txt b/examples/widgets/widgets/shapedclock/CMakeLists.txt
index 211c0cc432b..5a02f97234a 100644
--- a/examples/widgets/widgets/shapedclock/CMakeLists.txt
+++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/shapedclock")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt
index a47ada2d481..1dc8ccb9788 100644
--- a/examples/widgets/widgets/sliders/CMakeLists.txt
+++ b/examples/widgets/widgets/sliders/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/sliders")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt
index 050c4a8866b..57bcf613f9e 100644
--- a/examples/widgets/widgets/spinboxes/CMakeLists.txt
+++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/spinboxes")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt
index fc48780487b..bb0b174073e 100644
--- a/examples/widgets/widgets/styles/CMakeLists.txt
+++ b/examples/widgets/widgets/styles/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/styles")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt
index 1cdf8ff8ddd..6b1becefff8 100644
--- a/examples/widgets/widgets/stylesheet/CMakeLists.txt
+++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/stylesheet")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/tablet/CMakeLists.txt b/examples/widgets/widgets/tablet/CMakeLists.txt
index 3de5d165238..b1eb827e1d8 100644
--- a/examples/widgets/widgets/tablet/CMakeLists.txt
+++ b/examples/widgets/widgets/tablet/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tablet")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/tetrix/CMakeLists.txt b/examples/widgets/widgets/tetrix/CMakeLists.txt
index d36b82b90ba..49012ac50da 100644
--- a/examples/widgets/widgets/tetrix/CMakeLists.txt
+++ b/examples/widgets/widgets/tetrix/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tetrix")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt
index 9543bef5da1..0ae500ccdd7 100644
--- a/examples/widgets/widgets/tooltips/CMakeLists.txt
+++ b/examples/widgets/widgets/tooltips/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tooltips")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/validators/CMakeLists.txt b/examples/widgets/widgets/validators/CMakeLists.txt
index 085eac4e666..5f4e7001112 100644
--- a/examples/widgets/widgets/validators/CMakeLists.txt
+++ b/examples/widgets/widgets/validators/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/validators")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/wiggly/CMakeLists.txt b/examples/widgets/widgets/wiggly/CMakeLists.txt
index 3d00965a341..750f3d44ba0 100644
--- a/examples/widgets/widgets/wiggly/CMakeLists.txt
+++ b/examples/widgets/widgets/wiggly/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/wiggly")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt
index 0c2cb2b95b8..b118d6901d5 100644
--- a/examples/widgets/widgets/windowflags/CMakeLists.txt
+++ b/examples/widgets/widgets/windowflags/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/windowflags")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/widgets/windowcontainer/CMakeLists.txt b/examples/widgets/windowcontainer/CMakeLists.txt
index 399cade1c54..988dc01c3a8 100644
--- a/examples/widgets/windowcontainer/CMakeLists.txt
+++ b/examples/widgets/windowcontainer/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/widgets/windowcontainer")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/xml/CMakeLists.txt b/examples/xml/CMakeLists.txt
index 9291c191e03..8e145b4ccbc 100644
--- a/examples/xml/CMakeLists.txt
+++ b/examples/xml/CMakeLists.txt
@@ -2,12 +2,10 @@
add_subdirectory(htmlinfo)
add_subdirectory(xmlstreamlint)
-
if(TARGET Qt::Widgets)
add_subdirectory(dombookmarks)
add_subdirectory(streambookmarks)
-
- if(TARGET Qt::Network)
- add_subdirectory(rsslisting)
- endif()
+endif()
+if(TARGET Qt::Network AND TARGET Qt::Widgets)
+ add_subdirectory(rsslisting)
endif()
diff --git a/examples/xml/dombookmarks/CMakeLists.txt b/examples/xml/dombookmarks/CMakeLists.txt
index 24d34443ded..bce2094a83e 100644
--- a/examples/xml/dombookmarks/CMakeLists.txt
+++ b/examples/xml/dombookmarks/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/dombookmarks")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/dombookmarks")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/xml/htmlinfo/CMakeLists.txt b/examples/xml/htmlinfo/CMakeLists.txt
index 77fa423eff3..e2480ef1a04 100644
--- a/examples/xml/htmlinfo/CMakeLists.txt
+++ b/examples/xml/htmlinfo/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/htmlinfo")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/htmlinfo")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/xml/rsslisting/CMakeLists.txt b/examples/xml/rsslisting/CMakeLists.txt
index 96f79d20436..7007b2bdeb7 100644
--- a/examples/xml/rsslisting/CMakeLists.txt
+++ b/examples/xml/rsslisting/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/rsslisting")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/rsslisting")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/xml/streambookmarks/CMakeLists.txt b/examples/xml/streambookmarks/CMakeLists.txt
index 22ba383558b..671b22f7ae4 100644
--- a/examples/xml/streambookmarks/CMakeLists.txt
+++ b/examples/xml/streambookmarks/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/streambookmarks")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/streambookmarks")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
diff --git a/examples/xml/xmlstreamlint/.prev_CMakeLists.txt b/examples/xml/xmlstreamlint/.prev_CMakeLists.txt
index bb5cad16da8..3c2e8cb19a1 100644
--- a/examples/xml/xmlstreamlint/.prev_CMakeLists.txt
+++ b/examples/xml/xmlstreamlint/.prev_CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/xmlstreamlint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/xmlstreamlint")
find_package(Qt6 COMPONENTS Core)
diff --git a/examples/xml/xmlstreamlint/CMakeLists.txt b/examples/xml/xmlstreamlint/CMakeLists.txt
index b1009435376..bea0c5c1f47 100644
--- a/examples/xml/xmlstreamlint/CMakeLists.txt
+++ b/examples/xml/xmlstreamlint/CMakeLists.txt
@@ -9,7 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples/xml/xmlstreamlint")
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/xmlstreamlint")
find_package(Qt6 COMPONENTS Core Xml) # special case