summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-10 18:31:58 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-02-10 18:35:07 +0100
commit3af9d49bb78ac56bff57d1c3867853730f97a8e1 (patch)
treec9d6c1d1fe90dba3c788fd06795cf05a6d4ed5bb
parent71436d5499a9e0355f778f47ef465486a727049d (diff)
parentc431e2d33c2b13dee8b43a08c267c20ec1ae9654 (diff)
Merge remote-tracking branch 'origin/wip/cmake' into dev
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake12
-rw-r--r--cmake/3rdparty/kwin/FindLibdrm.cmake8
-rw-r--r--cmake/FindWrapDBus1.cmake4
-rw-r--r--cmake/QtBaseGlobalTargets.cmake2
-rw-r--r--cmake/QtBuild.cmake239
-rw-r--r--cmake/QtCompilerOptimization.cmake2
-rw-r--r--cmake/QtModuleConfig.cmake.in23
-rw-r--r--cmake/QtPostProcess.cmake2
-rw-r--r--cmake/QtResource.cmake.in44
-rw-r--r--coin/instructions/call_host_cmake.yaml24
-rw-r--r--coin/instructions/call_target_cmake.yaml24
-rw-r--r--coin/instructions/cmake_cross_compilation_module_build_instructions.yaml81
-rw-r--r--coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml (renamed from coin/instructions/cmake_cross_compilation.yaml)29
-rw-r--r--coin/instructions/coin_module_build_template_v2.yaml18
-rw-r--r--coin/instructions/coin_module_test_template_v2.yaml16
-rw-r--r--coin/instructions/coin_qtbase_build_template_v2.yaml18
-rw-r--r--coin/module_config.yaml32
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--examples/corelib/ipc/localfortuneclient/CMakeLists.txt7
-rw-r--r--examples/corelib/ipc/localfortuneserver/CMakeLists.txt7
-rw-r--r--examples/corelib/ipc/sharedmemory/CMakeLists.txt7
-rw-r--r--examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt9
-rw-r--r--examples/corelib/serialization/cbordump/CMakeLists.txt4
-rw-r--r--examples/corelib/serialization/convert/CMakeLists.txt4
-rw-r--r--examples/corelib/serialization/savegame/CMakeLists.txt4
-rw-r--r--examples/corelib/threads/mandelbrot/CMakeLists.txt13
-rw-r--r--examples/corelib/threads/queuedcustomtype/CMakeLists.txt7
-rw-r--r--examples/corelib/threads/semaphores/CMakeLists.txt3
-rw-r--r--examples/corelib/threads/waitconditions/CMakeLists.txt3
-rw-r--r--examples/corelib/tools/contiguouscache/CMakeLists.txt7
-rw-r--r--examples/corelib/tools/customtype/CMakeLists.txt7
-rw-r--r--examples/corelib/tools/customtypesending/CMakeLists.txt7
-rw-r--r--examples/dbus/chat/.prev_CMakeLists.txt35
-rw-r--r--examples/dbus/chat/CMakeLists.txt7
-rw-r--r--examples/dbus/listnames/CMakeLists.txt6
-rw-r--r--examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt34
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt7
-rw-r--r--examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt34
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt7
-rw-r--r--examples/embedded/digiflip/CMakeLists.txt7
-rw-r--r--examples/embedded/flickable/CMakeLists.txt7
-rw-r--r--examples/embedded/flightinfo/.prev_CMakeLists.txt47
-rw-r--r--examples/embedded/flightinfo/CMakeLists.txt21
-rw-r--r--examples/embedded/lightmaps/CMakeLists.txt7
-rw-r--r--examples/embedded/raycasting/CMakeLists.txt21
-rw-r--r--examples/embedded/styleexample/.prev_CMakeLists.txt52
-rw-r--r--examples/embedded/styleexample/CMakeLists.txt28
-rw-r--r--examples/gui/analogclock/.prev_CMakeLists.txt34
-rw-r--r--examples/gui/analogclock/CMakeLists.txt18
-rw-r--r--examples/gui/rasterwindow/.prev_CMakeLists.txt34
-rw-r--r--examples/gui/rasterwindow/CMakeLists.txt9
-rw-r--r--examples/network/bearermonitor/CMakeLists.txt8
-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.txt2
-rw-r--r--examples/network/download/CMakeLists.txt2
-rw-r--r--examples/network/downloadmanager/CMakeLists.txt2
-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.txt20
-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.txt28
-rw-r--r--examples/network/torrent/CMakeLists.txt27
-rw-r--r--examples/qpa/qrasterwindow/.prev_CMakeLists.txt29
-rw-r--r--examples/qpa/qrasterwindow/CMakeLists.txt12
-rw-r--r--examples/qpa/windows/CMakeLists.txt5
-rw-r--r--examples/qtconcurrent/imagescaling/CMakeLists.txt6
-rw-r--r--examples/qtconcurrent/map/.prev_CMakeLists.txt7
-rw-r--r--examples/qtconcurrent/map/CMakeLists.txt8
-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/tutorial1/CMakeLists.txt9
-rw-r--r--examples/qtestlib/tutorial2/CMakeLists.txt9
-rw-r--r--examples/qtestlib/tutorial3/CMakeLists.txt9
-rw-r--r--examples/qtestlib/tutorial4/CMakeLists.txt9
-rw-r--r--examples/qtestlib/tutorial5/CMakeLists.txt9
-rw-r--r--examples/sql/books/CMakeLists.txt21
-rw-r--r--examples/sql/cachedtable/CMakeLists.txt6
-rw-r--r--examples/sql/drilldown/CMakeLists.txt23
-rw-r--r--examples/sql/masterdetail/CMakeLists.txt21
-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.txt4
-rw-r--r--examples/vulkan/hellovulkantexture/CMakeLists.txt4
-rw-r--r--examples/vulkan/hellovulkantriangle/CMakeLists.txt4
-rw-r--r--examples/vulkan/hellovulkanwidget/CMakeLists.txt4
-rw-r--r--examples/vulkan/hellovulkanwindow/CMakeLists.txt2
-rw-r--r--examples/widgets/animation/animatedtiles/CMakeLists.txt26
-rw-r--r--examples/widgets/animation/easing/CMakeLists.txt20
-rw-r--r--examples/widgets/animation/moveblocks/CMakeLists.txt6
-rw-r--r--examples/widgets/animation/states/CMakeLists.txt25
-rw-r--r--examples/widgets/animation/stickman/CMakeLists.txt24
-rw-r--r--examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt192
-rw-r--r--examples/widgets/animation/sub-attaq/CMakeLists.txt159
-rw-r--r--examples/widgets/desktop/screenshot/CMakeLists.txt6
-rw-r--r--examples/widgets/desktop/systray/CMakeLists.txt22
-rw-r--r--examples/widgets/dialogs/classwizard/CMakeLists.txt27
-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.txt22
-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.txt22
-rw-r--r--examples/widgets/draganddrop/draggabletext/CMakeLists.txt20
-rw-r--r--examples/widgets/draganddrop/dropsite/CMakeLists.txt6
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt20
-rw-r--r--examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt47
-rw-r--r--examples/widgets/draganddrop/puzzle/CMakeLists.txt22
-rw-r--r--examples/widgets/effects/blurpicker/CMakeLists.txt29
-rw-r--r--examples/widgets/effects/fademessage/CMakeLists.txt21
-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.txt20
-rw-r--r--examples/widgets/graphicsview/chip/.prev_CMakeLists.txt58
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt35
-rw-r--r--examples/widgets/graphicsview/collidingmice/CMakeLists.txt20
-rw-r--r--examples/widgets/graphicsview/diagramscene/CMakeLists.txt35
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt21
-rw-r--r--examples/widgets/graphicsview/elasticnodes/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt20
-rw-r--r--examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt33
-rw-r--r--examples/widgets/graphicsview/flowlayout/CMakeLists.txt8
-rw-r--r--examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt94
-rw-r--r--examples/widgets/graphicsview/padnavigator/CMakeLists.txt38
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt6
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt25
-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.txt26
-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.txt20
-rw-r--r--examples/widgets/itemviews/dirview/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/editabletreemodel/CMakeLists.txt20
-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.txt20
-rw-r--r--examples/widgets/itemviews/interview/CMakeLists.txt22
-rw-r--r--examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt53
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt23
-rw-r--r--examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt47
-rw-r--r--examples/widgets/itemviews/puzzle/CMakeLists.txt22
-rw-r--r--examples/widgets/itemviews/simpledommodel/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/simpletreemodel/CMakeLists.txt20
-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.txt54
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt27
-rw-r--r--examples/widgets/itemviews/stardelegate/CMakeLists.txt6
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt2
-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/mac/qmaccocoaviewcontainer/CMakeLists.txt8
-rw-r--r--examples/widgets/mac/qmacnativewidget/CMakeLists.txt8
-rw-r--r--examples/widgets/mainwindows/application/CMakeLists.txt25
-rw-r--r--examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt54
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt29
-rw-r--r--examples/widgets/mainwindows/mainwindow/CMakeLists.txt24
-rw-r--r--examples/widgets/mainwindows/mdi/CMakeLists.txt25
-rw-r--r--examples/widgets/mainwindows/menus/CMakeLists.txt6
-rw-r--r--examples/widgets/mainwindows/sdi/CMakeLists.txt25
-rw-r--r--examples/widgets/painting/affine/.prev_CMakeLists.txt215
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt184
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt21
-rw-r--r--examples/widgets/painting/composition/.prev_CMakeLists.txt216
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt186
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt6
-rw-r--r--examples/widgets/painting/deform/.prev_CMakeLists.txt214
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt183
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt12
-rw-r--r--examples/widgets/painting/gradients/.prev_CMakeLists.txt214
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt184
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt21
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt12
-rw-r--r--examples/widgets/painting/shared/CMakeLists.txt3
-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.txt14
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt6
-rw-r--r--examples/widgets/richtext/textedit/.prev_CMakeLists.txt98
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt74
-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.txt2
-rw-r--r--examples/widgets/statemachine/pingpong/CMakeLists.txt2
-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/codecs/CMakeLists.txt20
-rw-r--r--examples/widgets/tools/completer/CMakeLists.txt21
-rw-r--r--examples/widgets/tools/customcompleter/CMakeLists.txt20
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt33
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt8
-rw-r--r--examples/widgets/tools/echoplugin/plugin/.prev_CMakeLists.txt35
-rw-r--r--examples/widgets/tools/echoplugin/plugin/CMakeLists.txt33
-rw-r--r--examples/widgets/tools/i18n/CMakeLists.txt33
-rw-r--r--examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt66
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt36
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/.prev_CMakeLists.txt35
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt38
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/.prev_CMakeLists.txt35
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt36
-rw-r--r--examples/widgets/tools/regexp/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/regularexpression/CMakeLists.txt20
-rw-r--r--examples/widgets/tools/settingseditor/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/styleplugin/plugin/.prev_CMakeLists.txt32
-rw-r--r--examples/widgets/tools/styleplugin/plugin/CMakeLists.txt29
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt6
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt21
-rw-r--r--examples/widgets/tools/undo/CMakeLists.txt35
-rw-r--r--examples/widgets/tools/undoframework/CMakeLists.txt20
-rw-r--r--examples/widgets/touch/dials/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt39
-rw-r--r--examples/widgets/touch/fingerpaint/CMakeLists.txt12
-rw-r--r--examples/widgets/touch/knobs/CMakeLists.txt6
-rw-r--r--examples/widgets/touch/pinchzoom/CMakeLists.txt20
-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.txt101
-rw-r--r--examples/widgets/tutorials/notepad/CMakeLists.txt49
-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.txt2
-rw-r--r--examples/widgets/widgets/groupbox/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/icons/.prev_CMakeLists.txt39
-rw-r--r--examples/widgets/widgets/icons/CMakeLists.txt10
-rw-r--r--examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt38
-rw-r--r--examples/widgets/widgets/imageviewer/CMakeLists.txt12
-rw-r--r--examples/widgets/widgets/lineedits/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/mousebuttons/CMakeLists.txt4
-rw-r--r--examples/widgets/widgets/movie/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/scribble/.prev_CMakeLists.txt39
-rw-r--r--examples/widgets/widgets/scribble/CMakeLists.txt12
-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.txt21
-rw-r--r--examples/widgets/widgets/stylesheet/CMakeLists.txt54
-rw-r--r--examples/widgets/widgets/tablet/CMakeLists.txt23
-rw-r--r--examples/widgets/widgets/tetrix/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/tooltips/CMakeLists.txt22
-rw-r--r--examples/widgets/widgets/validators/CMakeLists.txt22
-rw-r--r--examples/widgets/widgets/wiggly/CMakeLists.txt6
-rw-r--r--examples/widgets/widgets/windowflags/CMakeLists.txt6
-rw-r--r--examples/xml/dombookmarks/CMakeLists.txt7
-rw-r--r--examples/xml/htmlinfo/.prev_CMakeLists.txt44
-rw-r--r--examples/xml/htmlinfo/CMakeLists.txt24
-rw-r--r--examples/xml/rsslisting/CMakeLists.txt7
-rw-r--r--examples/xml/streambookmarks/CMakeLists.txt7
-rw-r--r--examples/xml/xmlstreamlint/.prev_CMakeLists.txt27
-rw-r--r--examples/xml/xmlstreamlint/CMakeLists.txt7
-rw-r--r--src/concurrent/CMakeLists.txt2
-rw-r--r--src/corelib/CMakeLists.txt30
-rw-r--r--src/corelib/Qt6CoreMacros.cmake306
-rw-r--r--src/dbus/.prev_CMakeLists.txt2
-rw-r--r--src/dbus/CMakeLists.txt2
-rw-r--r--src/dbus/Qt6DBusMacros.cmake13
-rw-r--r--src/gui/.prev_CMakeLists.txt2
-rw-r--r--src/gui/CMakeLists.txt2
-rw-r--r--src/network/.prev_CMakeLists.txt2
-rw-r--r--src/network/CMakeLists.txt2
-rw-r--r--src/opengl/.prev_CMakeLists.txt5
-rw-r--r--src/opengl/CMakeLists.txt5
-rw-r--r--src/platformsupport/accessibility/CMakeLists.txt5
-rw-r--r--src/platformsupport/clipboard/CMakeLists.txt4
-rw-r--r--src/platformsupport/devicediscovery/CMakeLists.txt4
-rw-r--r--src/platformsupport/edid/CMakeLists.txt4
-rw-r--r--src/platformsupport/eglconvenience/.prev_CMakeLists.txt5
-rw-r--r--src/platformsupport/eglconvenience/CMakeLists.txt5
-rw-r--r--src/platformsupport/eventdispatchers/.prev_CMakeLists.txt5
-rw-r--r--src/platformsupport/eventdispatchers/CMakeLists.txt5
-rw-r--r--src/platformsupport/fbconvenience/CMakeLists.txt5
-rw-r--r--src/platformsupport/fontdatabases/.prev_CMakeLists.txt11
-rw-r--r--src/platformsupport/fontdatabases/CMakeLists.txt11
-rw-r--r--src/platformsupport/glxconvenience/.prev_CMakeLists.txt5
-rw-r--r--src/platformsupport/glxconvenience/CMakeLists.txt5
-rw-r--r--src/platformsupport/graphics/CMakeLists.txt5
-rw-r--r--src/platformsupport/input/.prev_CMakeLists.txt9
-rw-r--r--src/platformsupport/input/CMakeLists.txt9
-rw-r--r--src/platformsupport/input/xkbcommon/CMakeLists.txt5
-rw-r--r--src/platformsupport/kmsconvenience/.prev_CMakeLists.txt7
-rw-r--r--src/platformsupport/kmsconvenience/CMakeLists.txt7
-rw-r--r--src/platformsupport/linuxaccessibility/.prev_CMakeLists.txt10
-rw-r--r--src/platformsupport/linuxaccessibility/CMakeLists.txt10
-rw-r--r--src/platformsupport/platformcompositor/CMakeLists.txt5
-rw-r--r--src/platformsupport/services/CMakeLists.txt5
-rw-r--r--src/platformsupport/themes/CMakeLists.txt5
-rw-r--r--src/platformsupport/vkconvenience/.prev_CMakeLists.txt5
-rw-r--r--src/platformsupport/vkconvenience/CMakeLists.txt5
-rw-r--r--src/platformsupport/windowsuiautomation/CMakeLists.txt5
-rw-r--r--src/plugins/bearer/android/src/CMakeLists.txt5
-rw-r--r--src/plugins/bearer/connman/CMakeLists.txt7
-rw-r--r--src/plugins/bearer/corewlan/CMakeLists.txt7
-rw-r--r--src/plugins/bearer/generic/CMakeLists.txt5
-rw-r--r--src/plugins/bearer/networkmanager/CMakeLists.txt7
-rw-r--r--src/plugins/generic/evdevkeyboard/CMakeLists.txt8
-rw-r--r--src/plugins/generic/evdevmouse/CMakeLists.txt8
-rw-r--r--src/plugins/generic/evdevtablet/CMakeLists.txt8
-rw-r--r--src/plugins/generic/evdevtouch/CMakeLists.txt8
-rw-r--r--src/plugins/generic/libinput/CMakeLists.txt8
-rw-r--r--src/plugins/generic/tslib/.prev_CMakeLists.txt8
-rw-r--r--src/plugins/generic/tslib/CMakeLists.txt8
-rw-r--r--src/plugins/generic/tuiotouch/CMakeLists.txt5
-rw-r--r--src/plugins/imageformats/ico/CMakeLists.txt3
-rw-r--r--src/plugins/imageformats/jpeg/.prev_CMakeLists.txt5
-rw-r--r--src/plugins/imageformats/jpeg/CMakeLists.txt5
-rw-r--r--src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt4
-rw-r--r--src/plugins/platforminputcontexts/compose/CMakeLists.txt4
-rw-r--r--src/plugins/platforminputcontexts/ibus/CMakeLists.txt6
-rw-r--r--src/plugins/platforms/android/.prev_CMakeLists.txt15
-rw-r--r--src/plugins/platforms/android/CMakeLists.txt15
-rw-r--r--src/plugins/platforms/cocoa/.prev_CMakeLists.txt33
-rw-r--r--src/plugins/platforms/cocoa/CMakeLists.txt33
-rw-r--r--src/plugins/platforms/directfb/.prev_CMakeLists.txt16
-rw-r--r--src/plugins/platforms/directfb/CMakeLists.txt16
-rw-r--r--src/plugins/platforms/eglfs/.prev_CMakeLists.txt40
-rw-r--r--src/plugins/platforms/eglfs/CMakeLists.txt28
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt8
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt13
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt13
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt12
-rw-r--r--src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt8
-rw-r--r--src/plugins/platforms/ios/CMakeLists.txt30
-rw-r--r--src/plugins/platforms/ios/optional/CMakeLists.txt1
-rw-r--r--src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt3
-rw-r--r--src/plugins/platforms/linuxfb/.prev_CMakeLists.txt19
-rw-r--r--src/plugins/platforms/linuxfb/CMakeLists.txt19
-rw-r--r--src/plugins/platforms/minimal/.prev_CMakeLists.txt9
-rw-r--r--src/plugins/platforms/minimal/CMakeLists.txt9
-rw-r--r--src/plugins/platforms/minimalegl/.prev_CMakeLists.txt10
-rw-r--r--src/plugins/platforms/minimalegl/CMakeLists.txt10
-rw-r--r--src/plugins/platforms/offscreen/.prev_CMakeLists.txt13
-rw-r--r--src/plugins/platforms/offscreen/CMakeLists.txt13
-rw-r--r--src/plugins/platforms/vnc/.prev_CMakeLists.txt18
-rw-r--r--src/plugins/platforms/vnc/CMakeLists.txt18
-rw-r--r--src/plugins/platforms/windows/.prev_CMakeLists.txt25
-rw-r--r--src/plugins/platforms/windows/CMakeLists.txt25
-rw-r--r--src/plugins/platforms/xcb/.prev_CMakeLists.txt30
-rw-r--r--src/plugins/platforms/xcb/CMakeLists.txt30
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt9
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt9
-rw-r--r--src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt8
-rw-r--r--src/plugins/platformthemes/gtk3/CMakeLists.txt9
-rw-r--r--src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt8
-rw-r--r--src/plugins/printsupport/cocoa/CMakeLists.txt6
-rw-r--r--src/plugins/printsupport/cups/.prev_CMakeLists.txt6
-rw-r--r--src/plugins/printsupport/cups/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/db2/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/mysql/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/oci/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/odbc/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/psql/.prev_CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/psql/CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt6
-rw-r--r--src/plugins/sqldrivers/sqlite/CMakeLists.txt7
-rw-r--r--src/plugins/styles/mac/CMakeLists.txt3
-rw-r--r--src/plugins/styles/windowsvista/CMakeLists.txt3
-rw-r--r--src/printsupport/CMakeLists.txt4
-rw-r--r--src/sql/CMakeLists.txt2
-rw-r--r--src/testlib/.prev_CMakeLists.txt2
-rw-r--r--src/testlib/CMakeLists.txt2
-rw-r--r--src/tools/qdbuscpp2xml/.prev_CMakeLists.txt10
-rw-r--r--src/tools/qdbuscpp2xml/CMakeLists.txt2
-rw-r--r--src/tools/qdbusxml2cpp/.prev_CMakeLists.txt10
-rw-r--r--src/tools/qdbusxml2cpp/CMakeLists.txt2
-rw-r--r--src/widgets/.prev_CMakeLists.txt3
-rw-r--r--src/widgets/CMakeLists.txt3
-rw-r--r--src/widgets/Qt6WidgetsMacros.cmake1
-rw-r--r--src/xml/CMakeLists.txt2
-rw-r--r--tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt31
-rw-r--r--util/cmake/helper.py1
-rwxr-xr-xutil/cmake/pro2cmake.py65
417 files changed, 6634 insertions, 1578 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb41b25406..6c670e3eb8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,4 @@
+# special case skip regeneration
cmake_minimum_required(VERSION 3.15.0)
# Run auto detection routines
diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake
index ed9c4c4c9a..13291afcda 100644
--- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake
+++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake
@@ -129,11 +129,15 @@ function(ecm_add_wayland_client_protocol out_var)
add_custom_command(OUTPUT "${_client_header}"
COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header}
- DEPENDS ${_infile} VERBATIM)
+ DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile}
+ VERBATIM
+ )
add_custom_command(OUTPUT "${_code}"
COMMAND ${WaylandScanner_EXECUTABLE} code ${_infile} ${_code}
- DEPENDS ${_infile} ${_client_header} VERBATIM)
+ DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile} ${_client_header}
+ VERBATIM
+ )
list(APPEND ${out_var} "${_client_header}" "${_code}")
set(${out_var} ${${out_var}} PARENT_SCOPE)
@@ -160,7 +164,9 @@ function(ecm_add_wayland_server_protocol out_var)
add_custom_command(OUTPUT "${_server_header}"
COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header}
- DEPENDS ${_infile} VERBATIM)
+ DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile}
+ VERBATIM
+ )
list(APPEND ${out_var} "${_server_header}")
set(${out_var} ${${out_var}} PARENT_SCOPE)
diff --git a/cmake/3rdparty/kwin/FindLibdrm.cmake b/cmake/3rdparty/kwin/FindLibdrm.cmake
index 9936e07eee..10822e693a 100644
--- a/cmake/3rdparty/kwin/FindLibdrm.cmake
+++ b/cmake/3rdparty/kwin/FindLibdrm.cmake
@@ -105,13 +105,19 @@ if(NOT WIN32)
INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}"
INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}/libdrm"
)
+ if(EXISTS "${Libdrm_INCLUDE_DIR}/drm")
+ set_property(TARGET Libdrm::Libdrm APPEND PROPERTY
+ INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}/drm"
+ )
+ endif()
+
endif()
mark_as_advanced(Libdrm_LIBRARY Libdrm_INCLUDE_DIR)
# compatibility variables
set(Libdrm_LIBRARIES ${Libdrm_LIBRARY})
- set(Libdrm_INCLUDE_DIRS ${Libdrm_INCLUDE_DIR} "${Libdrm_INCLUDE_DIR}/libdrm")
+ set(Libdrm_INCLUDE_DIRS ${Libdrm_INCLUDE_DIR} "${Libdrm_INCLUDE_DIR}/libdrm" "${Libdrm_INCLUDE_DIR}/drm")
set(Libdrm_VERSION_STRING ${Libdrm_VERSION})
else()
diff --git a/cmake/FindWrapDBus1.cmake b/cmake/FindWrapDBus1.cmake
index c2668d6cc8..55f9757c45 100644
--- a/cmake/FindWrapDBus1.cmake
+++ b/cmake/FindWrapDBus1.cmake
@@ -2,6 +2,10 @@
# Work around that:-/
# See https://gitlab.freedesktop.org/dbus/dbus/issues/267 for more information
+if(DBus1_FOUND OR WrapDBus1_FOUND)
+ return()
+endif()
+
if(DEFINED ENV{PKG_CONFIG_DIR})
set(__qt_dbus_pcd "$ENV{PKG_CONFIG_DIR}")
endif()
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index a8189dad5f..fb27618499 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -4,7 +4,7 @@ add_library(Qt::Platform ALIAS Platform)
target_include_directories(Platform
INTERFACE
$<BUILD_INTERFACE:${QT_PLATFORM_DEFINITION_DIR_ABSOLUTE}>
- $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
+ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/${INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${QT_PLATFORM_DEFINITION_DIR}>
$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}>
)
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index e23d0e93d1..25756c89d9 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -791,6 +791,12 @@ function(qt_ensure_sync_qt)
qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_LIBEXECDIR})
qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}"
DESTINATION "${syncqt_install_dir}")
+ elseif(QT_HOST_PATH)
+ get_filename_component(syncqt_absolute_path
+ "${QT_HOST_PATH}/${INSTALL_LIBEXECDIR}/syncqt.pl"
+ ABSOLUTE)
+ set(QT_SYNCQT "${syncqt_absolute_path}" CACHE FILEPATH "syncqt script")
+ message(STATUS "Using host syncqt found at: ${QT_SYNCQT}")
else()
get_filename_component(syncqt_absolute_path
"${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}/syncqt.pl"
@@ -931,8 +937,8 @@ function(qt_internal_module_info result target)
string(REPLACE "." "_" define "${define}")
set("${result}_upper" "${upper}" PARENT_SCOPE)
set("${result}_lower" "${lower}" PARENT_SCOPE)
- set("${result}_repo_include_dir" "${QT_BUILD_DIR}/include" PARENT_SCOPE)
- set("${result}_include_dir" "${QT_BUILD_DIR}/include/${module}" PARENT_SCOPE)
+ set("${result}_repo_include_dir" "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}" PARENT_SCOPE)
+ set("${result}_include_dir" "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}/${module}" PARENT_SCOPE)
set("${result}_define" "${define}" PARENT_SCOPE)
endfunction()
@@ -940,7 +946,7 @@ endfunction()
set(__default_private_args "SOURCES;LIBRARIES;INCLUDE_DIRECTORIES;DEFINES;DBUS_ADAPTOR_BASENAME;DBUS_ADAPTOR_FLAGS;DBUS_ADAPTOR_SOURCES;DBUS_INTERFACE_BASENAME;DBUS_INTERFACE_FLAGS;DBUS_INTERFACE_SOURCES;FEATURE_DEPENDENCIES;COMPILE_OPTIONS;LINK_OPTIONS;MOC_OPTIONS;DISABLE_AUTOGEN_TOOLS;ENABLE_AUTOGEN_TOOLS;PLUGIN_TYPES")
set(__default_public_args "PUBLIC_LIBRARIES;PUBLIC_INCLUDE_DIRECTORIES;PUBLIC_DEFINES;PUBLIC_COMPILE_OPTIONS;PUBLIC_LINK_OPTIONS")
-
+set(__default_private_module_args "PRIVATE_MODULE_INTERFACE")
option(QT_CMAKE_DEBUG_EXTEND_TARGET "Debug extend_target calls in Qt's build system" OFF)
@@ -1079,7 +1085,7 @@ function(qt_extend_target target)
message(FATAL_ERROR "Trying to extend non-existing target \"${target}\".")
endif()
qt_parse_all_arguments(arg "qt_extend_target" "HEADER_MODULE" "PRECOMPILED_HEADER"
- "CONDITION;${__default_public_args};${__default_private_args};COMPILE_FLAGS;NO_PCH_SOURCES" ${ARGN})
+ "CONDITION;${__default_public_args};${__default_private_args};${__default_private_module_args};COMPILE_FLAGS;NO_PCH_SOURCES" ${ARGN})
if ("x${arg_CONDITION}" STREQUAL x)
set(arg_CONDITION ON)
endif()
@@ -1187,7 +1193,8 @@ function(qt_extend_target target)
set(target_private "${target}Private")
if(TARGET "${target_private}")
- target_link_libraries("${target_private}" INTERFACE "${target}" "${qt_libs_private}")
+ target_link_libraries("${target_private}"
+ INTERFACE "${target}" ${arg_PRIVATE_MODULE_INTERFACE})
endif()
qt_register_target_dependencies("${target}"
"${arg_PUBLIC_LIBRARIES}"
@@ -1527,7 +1534,7 @@ function(qt_add_module target)
qt_parse_all_arguments(arg "qt_add_module"
"NO_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES"
"CONFIG_MODULE_NAME;PRECOMPILED_HEADER"
- "${__default_private_args};${__default_public_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN})
+ "${__default_private_args};${__default_public_args};${__default_private_module_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN})
if(NOT DEFINED arg_CONFIG_MODULE_NAME)
set(arg_CONFIG_MODULE_NAME "${module_lower}")
@@ -1715,7 +1722,7 @@ function(qt_add_module target)
if(NOT arg_NO_MODULE_HEADERS AND NOT arg_NO_SYNC_QT)
# For the syncqt headers
- list(APPEND ${public_headers_list} "$<INSTALL_INTERFACE:include/${module}>")
+ list(APPEND ${public_headers_list} "$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}>")
endif()
list(APPEND ${public_headers_list} ${arg_PUBLIC_INCLUDE_DIRECTORIES})
@@ -1745,6 +1752,7 @@ function(qt_add_module target)
"${deprecation_define}"
PUBLIC_LIBRARIES ${arg_PUBLIC_LIBRARIES}
LIBRARIES ${arg_LIBRARIES} Qt::PlatformModuleInternal
+ PRIVATE_MODULE_INTERFACE ${arg_PRIVATE_MODULE_INTERFACE}
FEATURE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES}
DBUS_ADAPTOR_SOURCES ${arg_DBUS_ADAPTOR_SOURCES}
DBUS_ADAPTOR_FLAGS ${arg_DBUS_ADAPTOR_FLAGS}
@@ -1854,14 +1862,20 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
set(args INSTALL_DIR "${metatypes_install_dir}")
endif()
qt6_generate_meta_types_json_file(${target} ${args})
- get_target_property(QT_MODULE_META_TYPES_FILE ${target} INTERFACE_QT_META_TYPES_INSTALL_FILE)
- get_target_property(QT_MODULE_META_TYPES_DEP_FILE ${target} INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE)
endif()
configure_package_config_file(
"${QT_CMAKE_DIR}/QtModuleConfig.cmake.in"
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}Config.cmake"
INSTALL_DESTINATION "${config_install_dir}"
)
+
+ if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake")
+ configure_file("${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake"
+ "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake"
+ @ONLY)
+ list(APPEND extra_cmake_files "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake")
+ endif()
+
write_basic_package_version_file(
"${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigVersion.cmake"
VERSION ${PROJECT_VERSION}
@@ -1933,12 +1947,13 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
# Handle cases like QmlDevTools which do not have their own headers, but rather borrow them
# from another module.
if(NOT arg_NO_SYNC_QT)
- list(APPEND interface_includes
- "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
- "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
+ list(APPEND interface_includes "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
if(NOT arg_NO_MODULE_HEADERS)
+ list(APPEND interface_includes
+ "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}>"
+ "$<BUILD_INTERFACE:${module_include_dir}/${PROJECT_VERSION}/${module}>")
+
if(is_framework)
set(fw_headers_dir
"${INSTALL_LIBDIR}/${module}.framework/Headers/")
@@ -1947,8 +1962,8 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
"$<INSTALL_INTERFACE:${fw_headers_dir}${PROJECT_VERSION}/${module}>")
else()
list(APPEND interface_includes
- "$<INSTALL_INTERFACE:include/${module}/${PROJECT_VERSION}>"
- "$<INSTALL_INTERFACE:include/${module}/${PROJECT_VERSION}/${module}>")
+ "$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}>"
+ "$<INSTALL_INTERFACE:${INSTALL_INCLUDEDIR}/${module}/${PROJECT_VERSION}/${module}>")
endif()
endif()
endif()
@@ -2446,167 +2461,6 @@ function(qt_add_resource target resourceName)
endfunction()
-
-# This function creates a CMake target for qml modules. It will also make
-# sure that if no C++ source are present, that qml files show up in the project
-# in an IDE. Finally, it will also create a custom ${target}_qmltypes which
-# can be used to generate the respective plugin.qmltypes file.
-#
-# CPP_PLUGIN: Whether this qml module has any c++ source files.
-# URI: Module's uri.
-# TARGET_PATH: Expected installation path for the Qml Module. Equivalent
-# to the module's URI where '.' is replaced with '/'. Use this to override the
-# default substitution pattern.
-# VERSION: Version of the qml module
-# QML_PLUGINDUMP_DEPENDENCIES: Path to a dependencies.json file to be consumed
-# with the ${target}_qmltypes target (optional)
-# SKIP_TYPE_REGISTRATION: All qml files are expected to be registered by the
-# c++ plugin code.
-#
-function(qt_add_qml_module target)
-
- set(qml_module_optional_args
- GENERATE_QMLTYPES
- DESIGNER_SUPPORTED
- DO_NOT_INSTALL
- SKIP_TYPE_REGISTRATION
- )
-
- set(qml_module_single_args
- URI
- TARGET_PATH
- VERSION
- QML_PLUGINDUMP_DEPENDENCIES
- CLASSNAME
- )
-
- set(qml_module_multi_args
- IMPORTS
- TYPEINFO
- DEPENDENCIES
- )
-
- qt_parse_all_arguments(arg "qt_add_qml_module"
- "${__qt_add_plugin_optional_args};${qml_module_optional_args}"
- "${__qt_add_plugin_single_args};${qml_module_single_args}"
- "${__qt_add_plugin_multi_args};${qml_module_multi_args}" ${ARGN})
-
- if (NOT arg_URI)
- message(FATAL_ERROR "qt_add_qml_module called without specifying the module's uri. Please specify one using the URI parameter.")
- endif()
-
- set(target_path ${arg_TARGET_PATH})
-
- if (NOT arg_VERSION)
- message(FATAL_ERROR "qt_add_qml_module called without specifying the module's import version. Please specify one using the VERSION parameter.")
- endif()
-
- if (NOT arg_TARGET_PATH)
- string(REPLACE "." "/" arg_TARGET_PATH ${arg_URI})
- endif()
-
- qt_remove_args(plugin_args
- ARGS_TO_REMOVE
- ${target}
- ${qml_module_multi_args}
- ${qml_module_single_args}
- ALL_ARGS
- ${__qt_add_plugin_optional_args}
- ${__qt_add_plugin_single_args}
- ${qml_module_single_args}
- ${__qt_add_plugin_multi_args}
- ${qml_module_multi_args}
- ARGS
- ${ARGV}
- )
-
- # If we have no sources, but qml files, create a custom target so the
- # qml file will be visibile in an IDE.
- if (arg_SOURCES)
- qt_add_plugin(${target}
- TYPE
- qml_plugin
- QML_TARGET_PATH
- "${arg_TARGET_PATH}"
- ${plugin_args}
- )
- endif()
-
-
- if (arg_CPP_PLUGIN)
- set(no_create_option DO_NOT_CREATE_TARGET)
- endif()
-
- if (arg_CLASSNAME)
- set(classname_arg CLASSNAME ${arg_CLASSNAME})
- endif()
-
- if (arg_DESIGNER_SUPPORTED)
- set(designer_supported_arg DESIGNER_SUPPORTED)
- endif()
-
- if (arg_SKIP_TYPE_REGISTRATION)
- set(skip_registration_arg SKIP_TYPE_REGISTRATION)
- endif()
-
- if (arg_GENERATE_QMLTYPES)
- set(generate_qmltypes_arg GENERATE_QMLTYPES)
- endif()
-
- qt6_add_qml_module(${target}
- ${designer_supported_arg}
- ${no_create_option}
- ${skip_registration_arg}
- ${classname_arg}
- ${generate_qmltypes_arg}
- RESOURCE_PREFIX "/qt-project.org/imports"
- TARGET_PATH ${arg_TARGET_PATH}
- URI ${arg_URI}
- VERSION ${arg_VERSION}
- QML_FILES ${arg_QML_FILES}
- IMPORTS "${arg_IMPORTS}"
- TYPEINFO "${arg_TYPEINFO}"
- DO_NOT_INSTALL_METADATA
- DO_NOT_CREATE_TARGET
- INSTALL_QML_FILES
- DEPENDENCIES ${arg_DEPENDENCIES}
- RESOURCE_EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets"
- )
-
- get_target_property(qmldir_file ${target} QT_QML_MODULE_QMLDIR_FILE)
- get_target_property(plugin_types ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE)
- qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}")
- if (EXISTS ${plugin_types})
- qt_copy_or_install(FILES ${plugin_types}
- DESTINATION "${qml_module_install_dir}"
- )
-
- if(QT_WILL_INSTALL)
- # plugin.qmltypes when present should also be copied to the
- # cmake binary dir when doing prefix builds
- file(COPY ${plugin_types}
- DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}"
- )
- endif()
- endif()
-
- qt_copy_or_install(
- FILES
- "${qmldir_file}"
- DESTINATION
- "${qml_module_install_dir}"
- )
-
- if(QT_WILL_INSTALL)
- # qmldir should also be copied to the cmake binary dir when doing
- # prefix builds
- file(COPY "${qmldir_file}"
- DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}"
- )
- endif()
-
-endfunction()
-
# Collection of qt_add_executable arguments so they can be shared across qt_add_executable
# and qt_add_test_helper.
set(__qt_add_executable_optional_args
@@ -2796,7 +2650,7 @@ function(qt_add_test name)
set(private_includes
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}"
- "$<BUILD_INTERFACE:${QT_BUILD_DIR}/include>"
+ "$<BUILD_INTERFACE:${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}>"
${arg_INCLUDE_DIRECTORIES}
)
@@ -3327,8 +3181,9 @@ endfunction()
# Complete manual moc invocation with full control.
# Use AUTOMOC whenever possible.
function(qt_manual_moc result)
- cmake_parse_arguments(arg "" "" "FLAGS" ${ARGN})
+ cmake_parse_arguments(arg "" "OUTPUT_MOC_JSON_FILES" "FLAGS" ${ARGN})
set(moc_files)
+ set(metatypes_json_list)
foreach(infile ${arg_UNPARSED_ARGUMENTS})
qt_make_output_file("${infile}" "moc_" ".cpp"
"${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" outfile)
@@ -3336,16 +3191,30 @@ function(qt_manual_moc result)
set(moc_parameters_file "${outfile}_parameters$<$<BOOL:$<CONFIGURATION>>:_$<CONFIGURATION>>")
set(moc_parameters ${arg_FLAGS} -o "${outfile}" "${infile}")
+
+ set(metatypes_byproducts)
+ if (arg_OUTPUT_MOC_JSON_FILES)
+ set(moc_json_file "${outfile}.json")
+ list(APPEND moc_parameters --output-json)
+ list(APPEND metatypes_json_list "${outfile}.json")
+ set(metatypes_byproducts "${outfile}.json")
+ endif()
+
string (REPLACE ";" "\n" moc_parameters "${moc_parameters}")
file(GENERATE OUTPUT "${moc_parameters_file}" CONTENT "${moc_parameters}\n")
- add_custom_command(OUTPUT "${outfile}"
+ add_custom_command(OUTPUT "${outfile}" ${metatypes_byproducts}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc "@${moc_parameters_file}"
DEPENDS "${infile}" ${moc_depends} ${QT_CMAKE_EXPORT_NAMESPACE}::moc
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM)
endforeach()
set("${result}" ${moc_files} PARENT_SCOPE)
+
+ # Register generated json files
+ if (arg_OUTPUT_MOC_JSON_FILES)
+ set(${arg_OUTPUT_MOC_JSON_FILES} "${metatypes_json_list}" PARENT_SCOPE)
+ endif()
endfunction()
@@ -3398,7 +3267,7 @@ function(qt_create_qdbusxml2cpp_command target infile)
add_custom_command(OUTPUT "${header_file}" "${source_file}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp ${arg_FLAGS} "${option}"
"${header_file}:${source_file}" "${absolute_in_file_path}"
- DEPENDS "${absolute_in_file_path}"
+ DEPENDS "${absolute_in_file_path}" ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
VERBATIM)
@@ -3486,6 +3355,7 @@ function(qt_add_docs)
# qtattributionsscanner
add_custom_target(qattributionsscanner_${target}
+ DEPENDS ${qattributionsscanner_bin}
COMMAND ${qtattributionsscanner_bin}
${PROJECT_SOURCE_DIR}
--filter "QDocModule=${qdoc_target}"
@@ -3518,6 +3388,7 @@ function(qt_add_docs)
)
add_custom_target(prepare_docs_${target}
+ DEPENDS ${qdoc_bin}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args}
${qdoc_bin}
${prepare_qdoc_args}
@@ -3536,6 +3407,7 @@ function(qt_add_docs)
)
add_custom_target(generate_docs_${target}
+ DEPENDS ${qdoc_bin}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args}
${qdoc_bin}
${generate_qdocs_args}
@@ -3553,6 +3425,7 @@ function(qt_add_docs)
)
add_custom_target(html_docs_${target}
+ DEPENDS ${qdoc_bin}
COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args}
${qdoc_bin}
${html_qdocs_args}
@@ -3565,6 +3438,7 @@ function(qt_add_docs)
set(qch_file_path ${qdoc_output_dir}/${qch_file_name})
add_custom_target(qch_docs_${target}
+ DEPENDS ${qhelpgenerator_bin}
COMMAND ${qhelpgenerator_bin}
"${qdoc_output_dir}/${doc_target}.qhp"
-o "${qch_file_path}"
@@ -3885,6 +3759,7 @@ function(qt_process_qlalr consuming_target input_file_list flags)
add_custom_command(
OUTPUT ${cpp_file} ${private_file} ${decl_file} ${impl_file}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr ${flags} ${input_file}
+ DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr
MAIN_DEPENDENCY ${input_file}
)
target_sources(${consuming_target} PRIVATE ${cpp_file} ${impl_file})
@@ -4047,10 +3922,6 @@ function(add_qt_resource)
qt_add_resource(${ARGV})
endfunction()
-function(add_qml_module)
- qt_add_qml_module(${ARGV})
-endfunction()
-
function(add_cmake_library)
qt_add_cmake_library(${ARGV})
endfunction()
diff --git a/cmake/QtCompilerOptimization.cmake b/cmake/QtCompilerOptimization.cmake
index f1ebafc009..1f50044a6f 100644
--- a/cmake/QtCompilerOptimization.cmake
+++ b/cmake/QtCompilerOptimization.cmake
@@ -62,7 +62,7 @@ if(GCC OR CLANG)
set(QT_CFLAGS_AVX512VBMI "-mavx512vbmi")
set(QT_CFLAGS_AESNI "-maes")
set(QT_CFLAGS_SHANI "-msha")
- if(NOT APPLE_UIKIT)
+ if(NOT APPLE_UIKIT AND NOT QT_64BIT)
set(QT_CFLAGS_NEON "-mfpu=neon")
endif()
set(QT_CFLAGS_MIPS_DSP "-mdsp")
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
index 58a84fb5d5..b2e1511870 100644
--- a/cmake/QtModuleConfig.cmake.in
+++ b/cmake/QtModuleConfig.cmake.in
@@ -45,24 +45,9 @@ if(NOT _qt_module_target_type STREQUAL "INTERFACE_LIBRARY")
endif()
endif()
-# Apply meta types properties
-if (@QT_MODULE_HAS_META_TYPES_FILE@)
- if (NOT QT_NO_CREATE_TARGETS)
- set_target_properties("@INSTALL_CMAKE_NAMESPACE@::@target@" PROPERTIES
- INTERFACE_QT_MODULE_HAS_META_TYPES TRUE
- INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@"
- INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@"
- )
- endif()
- if (NOT QT_NO_CREATE_VERSIONLESS_TARGETS)
- get_target_property(is_alias_target "Qt::@target@" ALIASED_TARGET)
- if (NOT is_alias_target)
- set_target_properties("Qt::@target@" PROPERTIES
- INTERFACE_QT_MODULE_HAS_META_TYPES TRUE
- INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@"
- INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@"
- )
- endif()
- endif()
+# Load Module's BuildIntenals should any exist
+if (@INSTALL_CMAKE_NAMESPACE@BuildInternals_DIR AND
+ EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@BuildInternals.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@BuildInternals.cmake")
endif()
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index ab2cab447f..afd1cfd1dd 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -1,6 +1,6 @@
function(qt_internal_write_depends_file target)
set(module Qt${target})
- set(outfile "${QT_BUILD_DIR}/include/${module}/${module}Depends")
+ set(outfile "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}/${module}/${module}Depends")
message("Generate ${outfile}...")
set(contents "/* This file was generated by cmake with the info from ${module} target. */\n")
string(APPEND contents "#ifdef __cplusplus /* create empty PCH in C mode */\n")
diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in
index 2f8f77eb79..bef47707ea 100644
--- a/cmake/QtResource.cmake.in
+++ b/cmake/QtResource.cmake.in
@@ -40,13 +40,11 @@ function(__qt_quick_compiler_process_resources target resource_name)
set(qml_files)
set(resource_files)
- set(retained_files)
# scan for qml files
foreach(file IN LISTS arg_FILES)
# check whether this resource should not be processed by the qt quick
# compiler
get_source_file_property(skip_compiler_check ${file} QT_SKIP_QUICKCOMPILER)
- get_source_file_property(retain_compiler_check ${file} QT_RETAIN_QUICKCOMPILER)
if (skip_compiler_check)
list(APPEND resource_files ${file})
continue()
@@ -56,19 +54,13 @@ function(__qt_quick_compiler_process_resources target resource_name)
OR ${file} MATCHES "\.mjs$"
OR ${file} MATCHES "\.qml$")
list(APPEND qml_files ${file})
- if (retain_compiler_check)
- list(APPEND retained_files ${file})
- list(APPEND resource_files ${file})
- endif()
- else()
- list(APPEND resource_files ${file})
endif()
+ list(APPEND resource_files ${file})
endforeach()
if (NOT TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files)
message(WARNING "QT@PROJECT_VERSION_MAJOR@_PROCESS_RESOURCE: Qml files were detected but the qmlcachgen target is not defined. Consider adding QmlTools to your find_package command.")
endif()
- set(retained_resource_paths)
if (TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files)
# Enable qt quick compiler support
set(qml_resource_file "${CMAKE_CURRENT_BINARY_DIR}/.rcc/${resource_name}.qrc")
@@ -86,9 +78,6 @@ function(__qt_quick_compiler_process_resources target resource_name)
else()
set(file_resource_path "${arg_PREFIX}/${file_resource_path}")
endif()
- if (file IN_LIST retained_files)
- list(APPEND retained_resource_paths ${file_resource_path})
- endif()
file(TO_CMAKE_PATH ${file_resource_path} file_resource_path)
list(APPEND file_resource_paths ${file_resource_path})
string(REGEX REPLACE "\.js$" "_js" compiled_file ${file_relative})
@@ -102,13 +91,15 @@ function(__qt_quick_compiler_process_resources target resource_name)
endif()
add_custom_command(
OUTPUT ${compiled_file}
- DEPENDS ${file_absolute}
${QT_TOOL_PATH_SETUP_COMMAND}
COMMAND
@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen
- --resource-path ${file_resource_path}
- -o ${compiled_file}
- ${file_absolute}
+ --resource-path "${file_resource_path}"
+ -o "${compiled_file}"
+ "${file_absolute}"
+ DEPENDS
+ $<TARGET_FILE:@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen>
+ "${file_absolute}"
)
target_sources(${target} PRIVATE ${compiled_file})
endforeach()
@@ -125,25 +116,17 @@ function(__qt_quick_compiler_process_resources target resource_name)
set(resource_name_arg "${resource_name_arg}=${chained_resource_name}")
endif()
- if (retained_resource_paths)
- set(retained_loader_list "${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache/${resource_name}/retained_file_list.rsp")
- file(GENERATE
- OUTPUT ${retained_loader_list}
- CONTENT "$<JOIN:${retained_resource_paths},\n>"
- )
- set(retained_args "--retain" "@${retained_loader_list}")
- endif()
-
add_custom_command(
OUTPUT ${qmlcache_loader_file}
- DEPENDS ${qmlcache_loader_list}
${QT_TOOL_PATH_SETUP_COMMAND}
COMMAND
@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen
- ${retained_args}
--resource-name "${resource_name_arg}"
- -o ${qmlcache_loader_file}
+ -o "${qmlcache_loader_file}"
"@${qmlcache_loader_list}"
+ DEPENDS
+ $<TARGET_FILE:@QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen>
+ "${qmlcache_loader_list}"
)
__qt_propagate_generated_resource(${target}
@@ -293,7 +276,10 @@ function(QT@PROJECT_VERSION_MAJOR@_PROCESS_RESOURCE target resourceName)
add_custom_command(OUTPUT "${generatedSourceCode}"
COMMAND "@QT_CMAKE_EXPORT_NAMESPACE@::rcc"
ARGS ${rccArgs}
- DEPENDS ${resource_dependencies} ${generatedResourceFile}
+ DEPENDS
+ ${resource_dependencies}
+ ${generatedResourceFile}
+ "@QT_CMAKE_EXPORT_NAMESPACE@::rcc"
COMMENT "RCC ${newResourceName}"
VERBATIM)
diff --git a/coin/instructions/call_host_cmake.yaml b/coin/instructions/call_host_cmake.yaml
new file mode 100644
index 0000000000..0dfcec5c75
--- /dev/null
+++ b/coin/instructions/call_host_cmake.yaml
@@ -0,0 +1,24 @@
+type: Group
+instructions:
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\host\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call cmake. Contact Liang then.
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: ExecuteCommand
+ command: "{{.InstallDir}}/host/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call cmake. Contact Liang then.
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/call_target_cmake.yaml b/coin/instructions/call_target_cmake.yaml
new file mode 100644
index 0000000000..2c0102511f
--- /dev/null
+++ b/coin/instructions/call_target_cmake.yaml
@@ -0,0 +1,24 @@
+type: Group
+instructions:
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} {{.InstallDir}}\\target\\bin\\qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call cmake. Contact Liang then.
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: ExecuteCommand
+ command: "{{.InstallDir}}/target/bin/qt-cmake {{.Env.COIN_CMAKE_ARGS}}"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call cmake. Contact Liang then.
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml
new file mode 100644
index 0000000000..a816f6aa7d
--- /dev/null
+++ b/coin/instructions/cmake_cross_compilation_module_build_instructions.yaml
@@ -0,0 +1,81 @@
+type: Group
+instructions:
+ - type: MakeDirectory
+ directory: .git
+ - type: MakeDirectory
+ directory: build
+ - type: ChangeDirectory
+ directory: "{{.BuildDir}}/build"
+ - type: MakeDirectory
+ directory: host
+ - type: MakeDirectory
+ directory: target
+ - type: SetBuildDirectory
+ directory: "{{.SourceDir}}/build/host"
+ - type: ChangeDirectory
+ directory: "{{.BuildDir}}"
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: "-DBUILD_TESTING=OFF {{.SourceDir}}"
+ - !include "{{qt/qtbase}}/call_host_cmake.yaml"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel"
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to build sources. In the current state bug can be everywhere. Contact Liang first.
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: "{{.InstallRoot}}"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package for archiving.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: ""
+ - type: SetBuildDirectory
+ directory: "{{.SourceDir}}/build/target"
+ - type: ChangeDirectory
+ directory: "{{.BuildDir}}"
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: "-DBUILD_TESTING=OFF {{.SourceDir}}"
+ - !include "{{qt/qtbase}}/call_target_cmake.yaml"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --build . --parallel"
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to build sources. In the current state bug can be everywhere. Contact Liang first.
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: "{{.InstallRoot}}"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package for archiving.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: ""
+ - type: UploadArtifact
+ archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
+ transferType: UploadModuleBuildArtifact
+ maxTimeInSeconds: 1200
+ maxTimeBetweenOutput: 1200
diff --git a/coin/instructions/cmake_cross_compilation.yaml b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
index 2037a4d331..aa024d8c30 100644
--- a/coin/instructions/cmake_cross_compilation.yaml
+++ b/coin/instructions/cmake_cross_compilation_qtbase_build_instructions.yaml
@@ -33,6 +33,18 @@ instructions:
maxTimeBetweenOutput: 1200
userMessageOnFailure: >
Failed to install package.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: "{{.InstallRoot}}"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package for archiving.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: ""
- type: SetBuildDirectory
directory: "{{.SourceDir}}/build/target"
- type: ChangeDirectory
@@ -56,3 +68,20 @@ instructions:
maxTimeBetweenOutput: 1200
userMessageOnFailure: >
Failed to install package.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: "{{.InstallRoot}}"
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} cmake --install ."
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to install package for archiving.
+ - type: EnvironmentVariable
+ variableName: DESTDIR
+ variableValue: ""
+ - type: UploadArtifact
+ archiveDirectory: "{{.InstallRoot}}/{{.AgentWorkingDir}}"
+ transferType: UploadModuleBuildArtifact
+ maxTimeInSeconds: 1200
+ maxTimeBetweenOutput: 1200
diff --git a/coin/instructions/coin_module_build_template_v2.yaml b/coin/instructions/coin_module_build_template_v2.yaml
new file mode 100644
index 0000000000..a05b4ba915
--- /dev/null
+++ b/coin/instructions/coin_module_build_template_v2.yaml
@@ -0,0 +1,18 @@
+type: Group
+instructions:
+ - !include "{{qt/qtbase}}/prepare_building_env.yaml"
+ - type: Group
+ instructions:
+ - !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml"
+ - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
+ - type: Group
+ instructions:
+ - !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
diff --git a/coin/instructions/coin_module_test_template_v2.yaml b/coin/instructions/coin_module_test_template_v2.yaml
new file mode 100644
index 0000000000..a94ed9fd84
--- /dev/null
+++ b/coin/instructions/coin_module_test_template_v2.yaml
@@ -0,0 +1,16 @@
+type: Group
+instructions:
+ - type: Group
+ instructions:
+ - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
+ - type: EnvironmentVariable
+ variableName: Dummy
+ variableValue: dummy
+ disable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
diff --git a/coin/instructions/coin_qtbase_build_template_v2.yaml b/coin/instructions/coin_qtbase_build_template_v2.yaml
new file mode 100644
index 0000000000..de7a5b8e11
--- /dev/null
+++ b/coin/instructions/coin_qtbase_build_template_v2.yaml
@@ -0,0 +1,18 @@
+type: Group
+instructions:
+ - !include "{{qt/qtbase}}/prepare_building_env.yaml"
+ - type: Group
+ instructions:
+ - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml"
+ - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
+ - type: Group
+ instructions:
+ - !include "{{qt/qtbase}}/cmake_cross_compilation_qtbase_build_instructions.yaml"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_property: target.os
diff --git a/coin/module_config.yaml b/coin/module_config.yaml
index ab615583a5..5d50c02afe 100644
--- a/coin/module_config.yaml
+++ b/coin/module_config.yaml
@@ -6,35 +6,7 @@ accept_configuration:
instructions:
Build:
- - !include "{{qt/qtbase}}/prepare_building_env.yaml"
- - type: Group
- instructions:
- - !include "{{qt/qtbase}}/cmake_qtbase_build_instructions.yaml"
- - !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
- enable_if:
- condition: property
- property: host.os
- equals_property: target.os
- - type: Group
- instructions:
- - !include "{{qt/qtbase}}/cmake_cross_compilation.yaml"
- disable_if:
- condition: property
- property: host.os
- equals_property: target.os
+ - !include "{{qt/qtbase}}/coin_qtbase_build_template_v2.yaml"
Test:
- - type: Group
- instructions:
- - !include "{{qt/qtbase}}/cmake_regular_test_instructions.yaml"
- enable_if:
- condition: property
- property: host.os
- equals_property: target.os
- - type: EnvironmentVariable
- variableName: Dummy
- variableValue: dummy
- disable_if:
- condition: property
- property: host.os
- equals_property: target.os
+ - !include "{{qt/qtbase}}/coin_module_test_template_v2.yaml"
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index f81cca7a33..81f1017dde 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,3 +1,4 @@
+# special case skip regeneration
#
# Copy/Install doc configuration files to the build/install directory
#
diff --git a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
index b664e5795c..4c011e751b 100644
--- a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/localfortuneclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,9 +21,12 @@ add_qt_gui_executable(localfortuneclient
main.cpp
)
target_link_libraries(localfortuneclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
install(TARGETS localfortuneclient
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
index 4d75ad437f..014df19185 100644
--- a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/localfortuneserver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,9 +21,12 @@ add_qt_gui_executable(localfortuneserver
server.cpp server.h
)
target_link_libraries(localfortuneserver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
install(TARGETS localfortuneserver
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/ipc/sharedmemory/CMakeLists.txt b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
index 514a49914f..6db5ea1a3b 100644
--- a/examples/corelib/ipc/sharedmemory/CMakeLists.txt
+++ b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/ipc/sharedmemory")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(sharedmemory
@@ -18,8 +20,11 @@ add_qt_gui_executable(sharedmemory
main.cpp
)
target_link_libraries(sharedmemory PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS sharedmemory
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
index e3ae3b7bb2..b62df6dd1e 100644
--- a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
+++ b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/mimetypes/mimetypebrowser")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
-add_qt_gui_executable(mimetypebrowser
+add_executable(mimetypebrowser
main.cpp
mainwindow.cpp mainwindow.h
mimetypemodel.cpp mimetypemodel.h
)
target_link_libraries(mimetypebrowser PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS mimetypebrowser
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/serialization/cbordump/CMakeLists.txt b/examples/corelib/serialization/cbordump/CMakeLists.txt
index cedf7712d4..98b5044b4a 100644
--- a/examples/corelib/serialization/cbordump/CMakeLists.txt
+++ b/examples/corelib/serialization/cbordump/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/cbordump")
find_package(Qt6 COMPONENTS Core)
@@ -17,9 +17,9 @@ add_executable(cbordump
main.cpp
)
target_link_libraries(cbordump PUBLIC
- # Remove: gui
Qt::Core
)
+
install(TARGETS cbordump
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/serialization/convert/CMakeLists.txt b/examples/corelib/serialization/convert/CMakeLists.txt
index 04b57bbd3d..98d4a943d6 100644
--- a/examples/corelib/serialization/convert/CMakeLists.txt
+++ b/examples/corelib/serialization/convert/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/convert")
find_package(Qt6 COMPONENTS Core)
@@ -24,9 +24,9 @@ add_executable(convert
xmlconverter.cpp xmlconverter.h
)
target_link_libraries(convert PUBLIC
- # Remove: gui
Qt::Core
)
+
install(TARGETS convert
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/serialization/savegame/CMakeLists.txt b/examples/corelib/serialization/savegame/CMakeLists.txt
index 97d866da43..10851d55fd 100644
--- a/examples/corelib/serialization/savegame/CMakeLists.txt
+++ b/examples/corelib/serialization/savegame/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/serialization/savegame")
find_package(Qt6 COMPONENTS Core)
@@ -20,9 +20,9 @@ add_executable(savegame
main.cpp
)
target_link_libraries(savegame PUBLIC
- # Remove: gui
Qt::Core
)
+
install(TARGETS savegame
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt
index 6905429559..515eb3ed93 100644
--- a/examples/corelib/threads/mandelbrot/CMakeLists.txt
+++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/threads/mandelbrot")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mandelbrot
@@ -19,8 +21,17 @@ add_qt_gui_executable(mandelbrot
renderthread.cpp renderthread.h
)
target_link_libraries(mandelbrot PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(mandelbrot PUBLIC
+ m
+ )
+endif()
+
install(TARGETS mandelbrot
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
index 78a59ac2dc..cc4ff1bd4a 100644
--- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
+++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/threads/queuedcustomtype")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(queuedcustomtype
@@ -20,8 +22,11 @@ add_qt_gui_executable(queuedcustomtype
window.cpp window.h
)
target_link_libraries(queuedcustomtype PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS queuedcustomtype
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt
index ed36acde55..15b5dc56b9 100644
--- a/examples/corelib/threads/semaphores/CMakeLists.txt
+++ b/examples/corelib/threads/semaphores/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/threads/semaphores")
find_package(Qt6 COMPONENTS Core)
@@ -19,6 +19,7 @@ add_executable(semaphores
target_link_libraries(semaphores PUBLIC
Qt::Core
)
+
install(TARGETS semaphores
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt
index 235cb91cdb..0b6d889d77 100644
--- a/examples/corelib/threads/waitconditions/CMakeLists.txt
+++ b/examples/corelib/threads/waitconditions/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/threads/waitconditions")
find_package(Qt6 COMPONENTS Core)
@@ -19,6 +19,7 @@ add_executable(waitconditions
target_link_libraries(waitconditions PUBLIC
Qt::Core
)
+
install(TARGETS waitconditions
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/tools/contiguouscache/CMakeLists.txt b/examples/corelib/tools/contiguouscache/CMakeLists.txt
index 3adb033c49..1e7a3350c2 100644
--- a/examples/corelib/tools/contiguouscache/CMakeLists.txt
+++ b/examples/corelib/tools/contiguouscache/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/tools/contiguouscache")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(contiguouscache
@@ -18,8 +20,11 @@ add_qt_gui_executable(contiguouscache
randomlistmodel.cpp randomlistmodel.h
)
target_link_libraries(contiguouscache PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS contiguouscache
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/tools/customtype/CMakeLists.txt b/examples/corelib/tools/customtype/CMakeLists.txt
index 11958e1c1b..74969ed2ea 100644
--- a/examples/corelib/tools/customtype/CMakeLists.txt
+++ b/examples/corelib/tools/customtype/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/tools/customtype")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(customtype
@@ -18,8 +20,11 @@ add_qt_gui_executable(customtype
message.cpp message.h
)
target_link_libraries(customtype PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS customtype
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/corelib/tools/customtypesending/CMakeLists.txt b/examples/corelib/tools/customtypesending/CMakeLists.txt
index f22894d919..1456eaf5dc 100644
--- a/examples/corelib/tools/customtypesending/CMakeLists.txt
+++ b/examples/corelib/tools/customtypesending/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/corelib/tools/customtypesending")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(customtypesending
@@ -19,8 +21,11 @@ add_qt_gui_executable(customtypesending
window.cpp window.h
)
target_link_libraries(customtypesending PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS customtypesending
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/chat/.prev_CMakeLists.txt b/examples/dbus/chat/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7889868753
--- /dev/null
+++ b/examples/dbus/chat/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from chat.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chat LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(chat
+ chat.cpp chat.h
+ chatmainwindow.ui
+ chatsetnickname.ui
+)
+target_link_libraries(chat PUBLIC
+ Qt::Core
+ Qt::DBus
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS chat
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index 064ce26833..f2fb0a55f8 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/dbus/chat")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)
@@ -34,9 +36,12 @@ add_qt_gui_executable(chat
${chat_SRCS} # special case
)
target_link_libraries(chat PUBLIC
+ Qt::Core
Qt::DBus
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS chat
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
index 60c91ba8b4..acc1db632c 100644
--- a/examples/dbus/listnames/CMakeLists.txt
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -9,17 +9,19 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/dbus/listnames")
+find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS DBus)
add_qt_gui_executable(listnames
listnames.cpp
)
target_link_libraries(listnames PUBLIC
- # Remove: gui
+ Qt::Core
Qt::DBus
)
+
install(TARGETS listnames
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
new file mode 100644
index 0000000000..a028cbcb43
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/car/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from car.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(car LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(car
+ car.cpp car.h
+ main.cpp
+)
+target_link_libraries(car PUBLIC
+ Qt::Core
+ Qt::DBus
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS car
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index 10abdd8f70..8be7f9ebd1 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/car")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)
@@ -29,9 +31,12 @@ add_qt_gui_executable(car
${car_SRCS} # special case
)
target_link_libraries(car PUBLIC
+ Qt::Core
Qt::DBus
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS car
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..65c32e7c07
--- /dev/null
+++ b/examples/dbus/remotecontrolledcar/controller/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from controller.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(controller LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS DBus)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(controller
+ controller.cpp controller.h controller.ui
+ main.cpp
+)
+target_link_libraries(controller PUBLIC
+ Qt::Core
+ Qt::DBus
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS controller
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index 2075261d18..5ad9d2e51d 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/dbus/remotecontrolledcar/controller")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS DBus)
find_package(Qt6 COMPONENTS Widgets)
@@ -27,9 +29,12 @@ add_qt_gui_executable(controller
${controller_SRCS} # special case
)
target_link_libraries(controller PUBLIC
+ Qt::Core
Qt::DBus
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS controller
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/digiflip/CMakeLists.txt b/examples/embedded/digiflip/CMakeLists.txt
index f5557766ad..cfad2a7c7b 100644
--- a/examples/embedded/digiflip/CMakeLists.txt
+++ b/examples/embedded/digiflip/CMakeLists.txt
@@ -9,16 +9,21 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/digiflip")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(digiflip
digiflip.cpp
)
target_link_libraries(digiflip PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS digiflip
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/flickable/CMakeLists.txt b/examples/embedded/flickable/CMakeLists.txt
index bd435d1352..bae3146723 100644
--- a/examples/embedded/flickable/CMakeLists.txt
+++ b/examples/embedded/flickable/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/flickable")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flickable
@@ -18,8 +20,11 @@ add_qt_gui_executable(flickable
main.cpp
)
target_link_libraries(flickable PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS flickable
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/flightinfo/.prev_CMakeLists.txt b/examples/embedded/flightinfo/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f7898e8ed8
--- /dev/null
+++ b/examples/embedded/flightinfo/.prev_CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from flightinfo.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(flightinfo LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/embedded/flightinfo")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Network)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(flightinfo
+ flightinfo.cpp
+ form.ui
+)
+target_link_libraries(flightinfo PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Network
+ Qt::Widgets
+)
+
+
+# Resources:
+set(flightinfo_resource_files
+ "aircraft.png"
+)
+
+qt6_add_resources(flightinfo "flightinfo"
+ PREFIX
+ "/"
+ FILES
+ ${flightinfo_resource_files}
+)
+
+install(TARGETS flightinfo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/embedded/flightinfo/CMakeLists.txt b/examples/embedded/flightinfo/CMakeLists.txt
index b2d7695c37..f7898e8ed8 100644
--- a/examples/embedded/flightinfo/CMakeLists.txt
+++ b/examples/embedded/flightinfo/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/flightinfo")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flightinfo
flightinfo.cpp
form.ui
- flightinfo.qrc # special case: add
)
target_link_libraries(flightinfo PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
+
+# Resources:
+set(flightinfo_resource_files
+ "aircraft.png"
+)
+
+qt6_add_resources(flightinfo "flightinfo"
+ PREFIX
+ "/"
+ FILES
+ ${flightinfo_resource_files}
+)
+
install(TARGETS flightinfo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/lightmaps/CMakeLists.txt b/examples/embedded/lightmaps/CMakeLists.txt
index 775c12be66..641f75c3c8 100644
--- a/examples/embedded/lightmaps/CMakeLists.txt
+++ b/examples/embedded/lightmaps/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/lightmaps")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,9 +23,12 @@ add_qt_gui_executable(lightmaps
slippymap.cpp slippymap.h
)
target_link_libraries(lightmaps PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
install(TARGETS lightmaps
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/raycasting/CMakeLists.txt b/examples/embedded/raycasting/CMakeLists.txt
index 0b48de26a5..86a3042f86 100644
--- a/examples/embedded/raycasting/CMakeLists.txt
+++ b/examples/embedded/raycasting/CMakeLists.txt
@@ -9,17 +9,34 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/raycasting")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(raycasting
- raycasting.cpp raycasting.qrc
+ raycasting.cpp
)
target_link_libraries(raycasting PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(raycasting_resource_files
+ "textures.png"
+)
+
+qt6_add_resources(raycasting "raycasting"
+ PREFIX
+ "/"
+ FILES
+ ${raycasting_resource_files}
+)
+
install(TARGETS raycasting
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/embedded/styleexample/.prev_CMakeLists.txt b/examples/embedded/styleexample/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ac03e58346
--- /dev/null
+++ b/examples/embedded/styleexample/.prev_CMakeLists.txt
@@ -0,0 +1,52 @@
+# Generated from styleexample.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(styleexample LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/embedded/styleexample")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(styleexample
+ main.cpp
+ stylewidget.cpp stylewidget.h stylewidget.ui
+)
+target_link_libraries(styleexample PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(styleexample_resource_files
+ "files/add.png"
+ "files/application.qss"
+ "files/blue.qss"
+ "files/khaki.qss"
+ "files/nature_1.jpg"
+ "files/nostyle.qss"
+ "files/remove.png"
+ "files/transparent.qss"
+)
+
+qt6_add_resources(styleexample "styleexample"
+ PREFIX
+ "/"
+ FILES
+ ${styleexample_resource_files}
+)
+
+install(TARGETS styleexample
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/embedded/styleexample/CMakeLists.txt b/examples/embedded/styleexample/CMakeLists.txt
index a0ec3d738a..ac03e58346 100644
--- a/examples/embedded/styleexample/CMakeLists.txt
+++ b/examples/embedded/styleexample/CMakeLists.txt
@@ -9,18 +9,42 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/embedded/styleexample")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(styleexample
main.cpp
stylewidget.cpp stylewidget.h stylewidget.ui
- styleexample.qrc # special case: add
)
target_link_libraries(styleexample PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+
+# Resources:
+set(styleexample_resource_files
+ "files/add.png"
+ "files/application.qss"
+ "files/blue.qss"
+ "files/khaki.qss"
+ "files/nature_1.jpg"
+ "files/nostyle.qss"
+ "files/remove.png"
+ "files/transparent.qss"
+)
+
+qt6_add_resources(styleexample "styleexample"
+ PREFIX
+ "/"
+ FILES
+ ${styleexample_resource_files}
+)
+
install(TARGETS styleexample
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/gui/analogclock/.prev_CMakeLists.txt b/examples/gui/analogclock/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b71892d1b8
--- /dev/null
+++ b/examples/gui/analogclock/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from analogclock.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(analogclock LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/gui/analogclock")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(analogclock
+ ../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
+ main.cpp
+)
+target_include_directories(analogclock PUBLIC
+ ../rasterwindow
+)
+
+target_link_libraries(analogclock PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS analogclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/analogclock/CMakeLists.txt b/examples/gui/analogclock/CMakeLists.txt
index 2b727a48db..d5605ab8ba 100644
--- a/examples/gui/analogclock/CMakeLists.txt
+++ b/examples/gui/analogclock/CMakeLists.txt
@@ -3,7 +3,6 @@
cmake_minimum_required(VERSION 3.14)
project(analogclock LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Widgets) # special case: add
set(CMAKE_INCLUDE_CURRENT_DIR ON)
@@ -11,22 +10,31 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/gui/gui_analogclock") # special case
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets) # special case: add
add_qt_gui_executable(gui_analogclock # special case: renamed target
../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
main.cpp
)
-target_include_directories(gui_analogclock PUBLIC
+target_include_directories(gui_analogclock PUBLIC # special case
../rasterwindow
)
# special case begin
-target_link_libraries(gui_analogclock PUBLIC
+target_link_libraries(gui_analogclock PUBLIC # special case
Qt::Gui
)
# special case end
-install(TARGETS gui_analogclock
+target_link_libraries(gui_analogclock PUBLIC # special case
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS gui_analogclock # special case
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/gui/rasterwindow/.prev_CMakeLists.txt b/examples/gui/rasterwindow/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..3f27ea597c
--- /dev/null
+++ b/examples/gui/rasterwindow/.prev_CMakeLists.txt
@@ -0,0 +1,34 @@
+# Generated from rasterwindow.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(rasterwindow LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(rasterwindow
+ main.cpp
+ rasterwindow.cpp rasterwindow.h
+)
+target_include_directories(rasterwindow PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+
+target_link_libraries(rasterwindow PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS rasterwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt
index dd1bcf4f3b..555578725e 100644
--- a/examples/gui/rasterwindow/CMakeLists.txt
+++ b/examples/gui/rasterwindow/CMakeLists.txt
@@ -11,7 +11,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/gui/rasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
add_qt_gui_executable(rasterwindow
main.cpp
@@ -20,11 +23,11 @@ add_qt_gui_executable(rasterwindow
target_include_directories(rasterwindow PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
)
-# special case begin
target_link_libraries(rasterwindow PUBLIC
+ Qt::Core
Qt::Gui
)
-# special case end
+
install(TARGETS rasterwindow
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/network/bearermonitor/CMakeLists.txt b/examples/network/bearermonitor/CMakeLists.txt
index eb992a0c58..4e8bfca813 100644
--- a/examples/network/bearermonitor/CMakeLists.txt
+++ b/examples/network/bearermonitor/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/bearermonitor")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -30,6 +30,12 @@ target_link_libraries(bearermonitor PUBLIC
Qt::Widgets
)
+if(WIN32)
+ target_link_libraries(bearermonitor PUBLIC
+ ws2_32
+ )
+endif()
+
install(TARGETS bearermonitor
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/network/blockingfortuneclient/CMakeLists.txt b/examples/network/blockingfortuneclient/CMakeLists.txt
index 14e15f9e13..d2c79bbcd2 100644
--- a/examples/network/blockingfortuneclient/CMakeLists.txt
+++ b/examples/network/blockingfortuneclient/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/blockingfortuneclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,6 +22,8 @@ add_qt_gui_executable(blockingfortuneclient
main.cpp
)
target_link_libraries(blockingfortuneclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/broadcastreceiver/CMakeLists.txt b/examples/network/broadcastreceiver/CMakeLists.txt
index ad1f9823d4..ea057a647b 100644
--- a/examples/network/broadcastreceiver/CMakeLists.txt
+++ b/examples/network/broadcastreceiver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/broadcastreceiver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(broadcastreceiver
receiver.cpp receiver.h
)
target_link_libraries(broadcastreceiver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/broadcastsender/CMakeLists.txt b/examples/network/broadcastsender/CMakeLists.txt
index b823046396..0a1885cfbb 100644
--- a/examples/network/broadcastsender/CMakeLists.txt
+++ b/examples/network/broadcastsender/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/broadcastsender")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(broadcastsender
sender.cpp sender.h
)
target_link_libraries(broadcastsender PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/dnslookup/CMakeLists.txt b/examples/network/dnslookup/CMakeLists.txt
index bc0bb4d1eb..721d89179f 100644
--- a/examples/network/dnslookup/CMakeLists.txt
+++ b/examples/network/dnslookup/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 462bf30554..b4124fc8a3 100644
--- a/examples/network/download/CMakeLists.txt
+++ b/examples/network/download/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 09d1db51d0..8fc16bedb5 100644
--- a/examples/network/downloadmanager/CMakeLists.txt
+++ b/examples/network/downloadmanager/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 7af88e9626..d44e75b0ff 100644
--- a/examples/network/fortuneclient/CMakeLists.txt
+++ b/examples/network/fortuneclient/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/fortuneclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(fortuneclient
main.cpp
)
target_link_libraries(fortuneclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/fortuneserver/CMakeLists.txt b/examples/network/fortuneserver/CMakeLists.txt
index 19897104e0..2bcb9f076a 100644
--- a/examples/network/fortuneserver/CMakeLists.txt
+++ b/examples/network/fortuneserver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/fortuneserver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(fortuneserver
server.cpp server.h
)
target_link_libraries(fortuneserver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/googlesuggest/CMakeLists.txt b/examples/network/googlesuggest/CMakeLists.txt
index 5a6a52ce33..247980601f 100644
--- a/examples/network/googlesuggest/CMakeLists.txt
+++ b/examples/network/googlesuggest/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/googlesuggest")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,6 +22,8 @@ add_qt_gui_executable(googlesuggest
searchbox.cpp searchbox.h
)
target_link_libraries(googlesuggest PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/http/CMakeLists.txt b/examples/network/http/CMakeLists.txt
index 2e00f20635..3ce82d63da 100644
--- a/examples/network/http/CMakeLists.txt
+++ b/examples/network/http/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/http")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,6 +22,8 @@ add_qt_gui_executable(http
main.cpp
)
target_link_libraries(http PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/loopback/CMakeLists.txt b/examples/network/loopback/CMakeLists.txt
index 233ff460e3..8d42284914 100644
--- a/examples/network/loopback/CMakeLists.txt
+++ b/examples/network/loopback/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/loopback")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(loopback
main.cpp
)
target_link_libraries(loopback PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/multicastreceiver/CMakeLists.txt b/examples/network/multicastreceiver/CMakeLists.txt
index 8073c9fb7e..f45b1b0db2 100644
--- a/examples/network/multicastreceiver/CMakeLists.txt
+++ b/examples/network/multicastreceiver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/multicastreceiver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(multicastreceiver
receiver.cpp receiver.h
)
target_link_libraries(multicastreceiver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/multicastsender/CMakeLists.txt b/examples/network/multicastsender/CMakeLists.txt
index 062c942b35..5ebd7cb767 100644
--- a/examples/network/multicastsender/CMakeLists.txt
+++ b/examples/network/multicastsender/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/multicastsender")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(multicastsender
sender.cpp sender.h
)
target_link_libraries(multicastsender PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/multistreamclient/CMakeLists.txt b/examples/network/multistreamclient/CMakeLists.txt
index 617e556cff..a4a4be05df 100644
--- a/examples/network/multistreamclient/CMakeLists.txt
+++ b/examples/network/multistreamclient/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/multistreamclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -23,6 +25,8 @@ add_qt_gui_executable(multistreamclient
timeconsumer.cpp timeconsumer.h
)
target_link_libraries(multistreamclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/multistreamserver/CMakeLists.txt b/examples/network/multistreamserver/CMakeLists.txt
index 3564e370d7..ee871d06fa 100644
--- a/examples/network/multistreamserver/CMakeLists.txt
+++ b/examples/network/multistreamserver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/multistreamserver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -23,6 +25,8 @@ add_qt_gui_executable(multistreamserver
timeprovider.cpp timeprovider.h
)
target_link_libraries(multistreamserver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/network-chat/CMakeLists.txt b/examples/network/network-chat/CMakeLists.txt
index eb836df8c9..4bd4879beb 100644
--- a/examples/network/network-chat/CMakeLists.txt
+++ b/examples/network/network-chat/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/network-chat")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -23,6 +25,8 @@ add_qt_gui_executable(network-chat
server.cpp server.h
)
target_link_libraries(network-chat PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/securesocketclient/CMakeLists.txt b/examples/network/securesocketclient/CMakeLists.txt
index d83bd5f284..13cdeba66d 100644
--- a/examples/network/securesocketclient/CMakeLists.txt
+++ b/examples/network/securesocketclient/CMakeLists.txt
@@ -9,23 +9,39 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/securesocketclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(securesocketclient
certificateinfo.cpp certificateinfo.h certificateinfo.ui
main.cpp
- securesocketclient.qrc
sslclient.cpp sslclient.h sslclient.ui
sslerrors.ui
)
target_link_libraries(securesocketclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
+# Resources:
+set(securesocketclient_resource_files
+ "encrypted.png"
+)
+
+qt6_add_resources(securesocketclient "securesocketclient"
+ PREFIX
+ "/"
+ FILES
+ ${securesocketclient_resource_files}
+)
+
install(TARGETS securesocketclient
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/network/secureudpclient/CMakeLists.txt b/examples/network/secureudpclient/CMakeLists.txt
index 385918a61b..936d93524b 100644
--- a/examples/network/secureudpclient/CMakeLists.txt
+++ b/examples/network/secureudpclient/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/secureudpclient")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
@@ -21,6 +23,8 @@ add_qt_gui_executable(secureudpclient
mainwindow.cpp mainwindow.h mainwindow.ui
)
target_link_libraries(secureudpclient PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/secureudpserver/CMakeLists.txt b/examples/network/secureudpserver/CMakeLists.txt
index 28d01df849..70816aea6b 100644
--- a/examples/network/secureudpserver/CMakeLists.txt
+++ b/examples/network/secureudpserver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/secureudpserver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Network)
@@ -21,6 +23,8 @@ add_qt_gui_executable(secureudpserver
server.cpp server.h
)
target_link_libraries(secureudpserver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/threadedfortuneserver/CMakeLists.txt b/examples/network/threadedfortuneserver/CMakeLists.txt
index 35372da369..20463b1417 100644
--- a/examples/network/threadedfortuneserver/CMakeLists.txt
+++ b/examples/network/threadedfortuneserver/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/threadedfortuneserver")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,6 +23,8 @@ add_qt_gui_executable(threadedfortuneserver
main.cpp
)
target_link_libraries(threadedfortuneserver PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
diff --git a/examples/network/torrent/.prev_CMakeLists.txt b/examples/network/torrent/.prev_CMakeLists.txt
index 8c294427f7..b3ff66a4b3 100644
--- a/examples/network/torrent/.prev_CMakeLists.txt
+++ b/examples/network/torrent/.prev_CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/torrent")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,7 +22,6 @@ add_qt_gui_executable(torrent
connectionmanager.cpp connectionmanager.h
filemanager.cpp filemanager.h
forms/addtorrentform.ui
- icons.qrc
main.cpp
mainwindow.cpp mainwindow.h
metainfo.cpp metainfo.h
@@ -31,11 +32,34 @@ add_qt_gui_executable(torrent
trackerclient.cpp trackerclient.h
)
target_link_libraries(torrent PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
+# Resources:
+set(icons_resource_files
+ "icons/1downarrow.png"
+ "icons/1uparrow.png"
+ "icons/bottom.png"
+ "icons/exit.png"
+ "icons/peertopeer.png"
+ "icons/player_pause.png"
+ "icons/player_play.png"
+ "icons/player_stop.png"
+)
+
+qt6_add_resources(torrent "icons"
+ PREFIX
+ "/"
+ FILES
+ ${icons_resource_files}
+)
+
install(TARGETS torrent
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt
index 9398369064..34df6e0c63 100644
--- a/examples/network/torrent/CMakeLists.txt
+++ b/examples/network/torrent/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/network/torrent")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,7 +22,6 @@ add_qt_gui_executable(torrent
connectionmanager.cpp connectionmanager.h
filemanager.cpp filemanager.h
forms/addtorrentform.ui
- icons.qrc
main.cpp
mainwindow.cpp mainwindow.h
metainfo.cpp metainfo.h
@@ -32,10 +33,32 @@ add_qt_gui_executable(torrent
)
target_include_directories(torrent PUBLIC forms) # special case
target_link_libraries(torrent PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
)
+
+# Resources:
+set(icons_resource_files
+ "icons/1downarrow.png"
+ "icons/1uparrow.png"
+ "icons/bottom.png"
+ "icons/exit.png"
+ "icons/peertopeer.png"
+ "icons/player_pause.png"
+ "icons/player_play.png"
+ "icons/player_stop.png"
+)
+
+qt6_add_resources(torrent "icons"
+ PREFIX
+ "/"
+ FILES
+ ${icons_resource_files}
+)
+
install(TARGETS torrent
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qpa/qrasterwindow/.prev_CMakeLists.txt b/examples/qpa/qrasterwindow/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..8fd75f1079
--- /dev/null
+++ b/examples/qpa/qrasterwindow/.prev_CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from qrasterwindow.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(qrasterwindow LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/qpa/qrasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(qrasterwindow
+ main.cpp
+)
+target_link_libraries(qrasterwindow PUBLIC
+ Qt::Core
+ Qt::Gui
+)
+
+install(TARGETS qrasterwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qpa/qrasterwindow/CMakeLists.txt b/examples/qpa/qrasterwindow/CMakeLists.txt
index 1567d38285..8fd75f1079 100644
--- a/examples/qpa/qrasterwindow/CMakeLists.txt
+++ b/examples/qpa/qrasterwindow/CMakeLists.txt
@@ -3,20 +3,24 @@
cmake_minimum_required(VERSION 3.14)
project(qrasterwindow LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Gui) # special case
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qpa/qrasterwindow")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
add_qt_gui_executable(qrasterwindow
main.cpp
)
-target_link_libraries(qrasterwindow PUBLIC Qt::Gui) # special case: add
+target_link_libraries(qrasterwindow PUBLIC
+ Qt::Core
+ Qt::Gui
+)
install(TARGETS qrasterwindow
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt
index 22f98c28f3..6f9bbe7534 100644
--- a/examples/qpa/windows/CMakeLists.txt
+++ b/examples/qpa/windows/CMakeLists.txt
@@ -9,10 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qpa/windows")
-find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
add_executable(windows
main.cpp
@@ -22,6 +22,7 @@ target_link_libraries(windows PRIVATE
Qt::CorePrivate
Qt::GuiPrivate
)
+
target_link_libraries(windows PUBLIC
Qt::Core
Qt::Gui
diff --git a/examples/qtconcurrent/imagescaling/CMakeLists.txt b/examples/qtconcurrent/imagescaling/CMakeLists.txt
index 5d487ab409..8585ed89a0 100644
--- a/examples/qtconcurrent/imagescaling/CMakeLists.txt
+++ b/examples/qtconcurrent/imagescaling/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/imagescaling")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,6 +22,8 @@ add_qt_gui_executable(imagescaling
)
target_link_libraries(imagescaling PUBLIC
Qt::Concurrent
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/qtconcurrent/map/.prev_CMakeLists.txt b/examples/qtconcurrent/map/.prev_CMakeLists.txt
index cd53409ec8..8e158b2397 100644
--- a/examples/qtconcurrent/map/.prev_CMakeLists.txt
+++ b/examples/qtconcurrent/map/.prev_CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/map")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
add_executable(mapdemo
@@ -18,9 +20,12 @@ add_executable(mapdemo
)
target_link_libraries(mapdemo PUBLIC
Qt::Concurrent
+ Qt::Core
+ Qt::Gui
)
install(TARGETS mapdemo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/qtconcurrent/map/CMakeLists.txt b/examples/qtconcurrent/map/CMakeLists.txt
index 1707825b8f..e5a3ba1c66 100644
--- a/examples/qtconcurrent/map/CMakeLists.txt
+++ b/examples/qtconcurrent/map/CMakeLists.txt
@@ -9,17 +9,19 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/map")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
-find_package(Qt6 COMPONENTS Gui) # special case
add_executable(mapdemo
main.cpp
)
target_link_libraries(mapdemo PUBLIC
Qt::Concurrent
- Qt::Gui # special case
+ Qt::Core
+ Qt::Gui
)
install(TARGETS mapdemo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qtconcurrent/progressdialog/CMakeLists.txt b/examples/qtconcurrent/progressdialog/CMakeLists.txt
index f9e7980b63..912490bd65 100644
--- a/examples/qtconcurrent/progressdialog/CMakeLists.txt
+++ b/examples/qtconcurrent/progressdialog/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/progressdialog")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_executable(progressdialog
)
target_link_libraries(progressdialog PUBLIC
Qt::Concurrent
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/qtconcurrent/runfunction/CMakeLists.txt b/examples/qtconcurrent/runfunction/CMakeLists.txt
index de20553212..a8cb3de4d4 100644
--- a/examples/qtconcurrent/runfunction/CMakeLists.txt
+++ b/examples/qtconcurrent/runfunction/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/runfunction")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_executable(runfunction
)
target_link_libraries(runfunction PUBLIC
Qt::Concurrent
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/qtconcurrent/wordcount/CMakeLists.txt b/examples/qtconcurrent/wordcount/CMakeLists.txt
index e4afbaa4c5..22d78c3877 100644
--- a/examples/qtconcurrent/wordcount/CMakeLists.txt
+++ b/examples/qtconcurrent/wordcount/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtconcurrent/wordcount")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Concurrent)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_executable(wordcount
)
target_link_libraries(wordcount PUBLIC
Qt::Concurrent
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/qtestlib/tutorial1/CMakeLists.txt b/examples/qtestlib/tutorial1/CMakeLists.txt
index fabe54bf1a..27b5d886b5 100644
--- a/examples/qtestlib/tutorial1/CMakeLists.txt
+++ b/examples/qtestlib/tutorial1/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial1")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Test)
-add_qt_gui_executable(tutorial1
+add_executable(tutorial1
testqstring.cpp
)
target_link_libraries(tutorial1 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Test
Qt::Widgets
)
+
install(TARGETS tutorial1
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qtestlib/tutorial2/CMakeLists.txt b/examples/qtestlib/tutorial2/CMakeLists.txt
index 52ad642cca..2a3a53ad34 100644
--- a/examples/qtestlib/tutorial2/CMakeLists.txt
+++ b/examples/qtestlib/tutorial2/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial2")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Test)
-add_qt_gui_executable(tutorial2
+add_executable(tutorial2
testqstring.cpp
)
target_link_libraries(tutorial2 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Test
Qt::Widgets
)
+
install(TARGETS tutorial2
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qtestlib/tutorial3/CMakeLists.txt b/examples/qtestlib/tutorial3/CMakeLists.txt
index 8dfba0bbe1..f7a76b3b4f 100644
--- a/examples/qtestlib/tutorial3/CMakeLists.txt
+++ b/examples/qtestlib/tutorial3/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial3")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Test)
-add_qt_gui_executable(tutorial3
+add_executable(tutorial3
testgui.cpp
)
target_link_libraries(tutorial3 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Test
Qt::Widgets
)
+
install(TARGETS tutorial3
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qtestlib/tutorial4/CMakeLists.txt b/examples/qtestlib/tutorial4/CMakeLists.txt
index e5af801801..40a6f4b9e2 100644
--- a/examples/qtestlib/tutorial4/CMakeLists.txt
+++ b/examples/qtestlib/tutorial4/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial4")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Test)
-add_qt_gui_executable(tutorial4
+add_executable(tutorial4
testgui.cpp
)
target_link_libraries(tutorial4 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Test
Qt::Widgets
)
+
install(TARGETS tutorial4
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/qtestlib/tutorial5/CMakeLists.txt b/examples/qtestlib/tutorial5/CMakeLists.txt
index 3b6f4db4d0..88f5efb995 100644
--- a/examples/qtestlib/tutorial5/CMakeLists.txt
+++ b/examples/qtestlib/tutorial5/CMakeLists.txt
@@ -9,18 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/qtestlib/tutorial5")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Test)
-add_qt_gui_executable(tutorial5
+add_executable(tutorial5
benchmarking.cpp
)
target_link_libraries(tutorial5 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Test
Qt::Widgets
)
+
install(TARGETS tutorial5
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/sql/books/CMakeLists.txt b/examples/sql/books/CMakeLists.txt
index 5890c6c85f..870d90bf14 100644
--- a/examples/sql/books/CMakeLists.txt
+++ b/examples/sql/books/CMakeLists.txt
@@ -9,14 +9,15 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/books")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(books
bookdelegate.cpp bookdelegate.h
- books.qrc
bookwindow.cpp bookwindow.h bookwindow.ui
initdb.h
main.cpp
@@ -24,11 +25,27 @@ add_qt_gui_executable(books
target_include_directories(books PUBLIC
.
)
+
target_link_libraries(books PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
+
+# Resources:
+set(books_resource_files
+ "images/star.png"
+)
+
+qt6_add_resources(books "books"
+ PREFIX
+ "/"
+ FILES
+ ${books_resource_files}
+)
+
install(TARGETS books
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/sql/cachedtable/CMakeLists.txt b/examples/sql/cachedtable/CMakeLists.txt
index 512c7c4891..872c462fdd 100644
--- a/examples/sql/cachedtable/CMakeLists.txt
+++ b/examples/sql/cachedtable/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/cachedtable")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,6 +22,8 @@ add_qt_gui_executable(cachedtable
tableeditor.cpp tableeditor.h
)
target_link_libraries(cachedtable PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/sql/drilldown/CMakeLists.txt b/examples/sql/drilldown/CMakeLists.txt
index 128ebc107f..5b6bea0423 100644
--- a/examples/sql/drilldown/CMakeLists.txt
+++ b/examples/sql/drilldown/CMakeLists.txt
@@ -9,24 +9,43 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/drilldown")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(drilldown
../connection.h
- drilldown.qrc
imageitem.cpp imageitem.h
informationwindow.cpp informationwindow.h
main.cpp
view.cpp view.h
)
target_link_libraries(drilldown PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
+
+# Resources:
+set(drilldown_resource_files
+ "images/qt-creator.png"
+ "images/qt-logo.png"
+ "images/qt-project.png"
+ "images/qt-quick.png"
+)
+
+qt6_add_resources(drilldown "drilldown"
+ PREFIX
+ "/"
+ FILES
+ ${drilldown_resource_files}
+)
+
install(TARGETS drilldown
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/sql/masterdetail/CMakeLists.txt b/examples/sql/masterdetail/CMakeLists.txt
index a142d41d5f..7052461601 100644
--- a/examples/sql/masterdetail/CMakeLists.txt
+++ b/examples/sql/masterdetail/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/masterdetail")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS Xml)
@@ -20,14 +22,29 @@ add_qt_gui_executable(masterdetail
dialog.cpp dialog.h
main.cpp
mainwindow.cpp mainwindow.h
- masterdetail.qrc
)
target_link_libraries(masterdetail PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
Qt::Xml
)
+
+# Resources:
+set(masterdetail_resource_files
+ "images/icon.png"
+ "images/image.png"
+)
+
+qt6_add_resources(masterdetail "masterdetail"
+ PREFIX
+ "/"
+ FILES
+ ${masterdetail_resource_files}
+)
+
install(TARGETS masterdetail
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/sql/querymodel/CMakeLists.txt b/examples/sql/querymodel/CMakeLists.txt
index a31abc40fc..e4127baeef 100644
--- a/examples/sql/querymodel/CMakeLists.txt
+++ b/examples/sql/querymodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/querymodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,6 +23,8 @@ add_qt_gui_executable(querymodel
main.cpp
)
target_link_libraries(querymodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/sql/relationaltablemodel/CMakeLists.txt b/examples/sql/relationaltablemodel/CMakeLists.txt
index fbdab96aff..c758f3c32d 100644
--- a/examples/sql/relationaltablemodel/CMakeLists.txt
+++ b/examples/sql/relationaltablemodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/relationaltablemodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(relationaltablemodel
relationaltablemodel.cpp
)
target_link_libraries(relationaltablemodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/sql/sqlbrowser/CMakeLists.txt b/examples/sql/sqlbrowser/CMakeLists.txt
index b9aae1c7eb..833b57f1a1 100644
--- a/examples/sql/sqlbrowser/CMakeLists.txt
+++ b/examples/sql/sqlbrowser/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/sqlbrowser")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -22,6 +24,8 @@ add_qt_gui_executable(sqlbrowser
qsqlconnectiondialog.cpp qsqlconnectiondialog.h qsqlconnectiondialog.ui
)
target_link_libraries(sqlbrowser PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/sql/sqlwidgetmapper/CMakeLists.txt b/examples/sql/sqlwidgetmapper/CMakeLists.txt
index ad0d5cfce9..8d8a1a82ed 100644
--- a/examples/sql/sqlwidgetmapper/CMakeLists.txt
+++ b/examples/sql/sqlwidgetmapper/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/sqlwidgetmapper")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(sqlwidgetmapper
window.cpp window.h
)
target_link_libraries(sqlwidgetmapper PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/sql/tablemodel/CMakeLists.txt b/examples/sql/tablemodel/CMakeLists.txt
index 9e90e56b7f..85e1bd9167 100644
--- a/examples/sql/tablemodel/CMakeLists.txt
+++ b/examples/sql/tablemodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/sql/tablemodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Sql)
find_package(Qt6 COMPONENTS Widgets)
@@ -19,6 +21,8 @@ add_qt_gui_executable(tablemodel
tablemodel.cpp
)
target_link_libraries(tablemodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Sql
Qt::Widgets
)
diff --git a/examples/vulkan/hellovulkancubes/CMakeLists.txt b/examples/vulkan/hellovulkancubes/CMakeLists.txt
index c77cd59d8c..94feac6401 100644
--- a/examples/vulkan/hellovulkancubes/CMakeLists.txt
+++ b/examples/vulkan/hellovulkancubes/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkancubes")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -32,6 +32,7 @@ target_link_libraries(hellovulkancubes PUBLIC
Qt::Widgets
)
+
# Resources:
set_source_files_properties("../shared/block.buf"
PROPERTIES QT_RESOURCE_ALIAS "block.buf"
@@ -55,7 +56,6 @@ qt6_add_resources(hellovulkancubes "hellovulkancubes"
${hellovulkancubes_resource_files}
)
-
install(TARGETS hellovulkancubes
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/vulkan/hellovulkantexture/CMakeLists.txt b/examples/vulkan/hellovulkantexture/CMakeLists.txt
index b9cbd179f0..59e019998c 100644
--- a/examples/vulkan/hellovulkantexture/CMakeLists.txt
+++ b/examples/vulkan/hellovulkantexture/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkantexture")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -23,6 +23,7 @@ target_link_libraries(hellovulkantexture PUBLIC
Qt::Gui
)
+
# Resources:
set(hellovulkantexture_resource_files
"qt256.png"
@@ -37,7 +38,6 @@ qt6_add_resources(hellovulkantexture "hellovulkantexture"
${hellovulkantexture_resource_files}
)
-
install(TARGETS hellovulkantexture
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/vulkan/hellovulkantriangle/CMakeLists.txt b/examples/vulkan/hellovulkantriangle/CMakeLists.txt
index 73ca042881..dae891ea07 100644
--- a/examples/vulkan/hellovulkantriangle/CMakeLists.txt
+++ b/examples/vulkan/hellovulkantriangle/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkantriangle")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -23,6 +23,7 @@ target_link_libraries(hellovulkantriangle PUBLIC
Qt::Gui
)
+
# Resources:
set_source_files_properties("../shared/color_frag.spv"
PROPERTIES QT_RESOURCE_ALIAS "color_frag.spv"
@@ -42,7 +43,6 @@ qt6_add_resources(hellovulkantriangle "hellovulkantriangle"
${hellovulkantriangle_resource_files}
)
-
install(TARGETS hellovulkantriangle
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/vulkan/hellovulkanwidget/CMakeLists.txt b/examples/vulkan/hellovulkanwidget/CMakeLists.txt
index 281c49e77d..6dde273e94 100644
--- a/examples/vulkan/hellovulkanwidget/CMakeLists.txt
+++ b/examples/vulkan/hellovulkanwidget/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/vulkan/hellovulkanwidget")
find_package(Qt6 COMPONENTS Core)
find_package(Qt6 COMPONENTS Gui)
@@ -26,6 +26,7 @@ target_link_libraries(hellovulkanwidget PUBLIC
Qt::Widgets
)
+
# Resources:
set_source_files_properties("../shared/color_frag.spv"
PROPERTIES QT_RESOURCE_ALIAS "color_frag.spv"
@@ -45,7 +46,6 @@ qt6_add_resources(hellovulkanwidget "hellovulkanwidget"
${hellovulkanwidget_resource_files}
)
-
install(TARGETS hellovulkanwidget
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/vulkan/hellovulkanwindow/CMakeLists.txt b/examples/vulkan/hellovulkanwindow/CMakeLists.txt
index 6e79b959a8..3a20345899 100644
--- a/examples/vulkan/hellovulkanwindow/CMakeLists.txt
+++ b/examples/vulkan/hellovulkanwindow/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 d35fd9cf92..b8755a3321 100644
--- a/examples/widgets/animation/animatedtiles/CMakeLists.txt
+++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt
@@ -9,18 +9,40 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/animatedtiles")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(animatedtiles
- animatedtiles.qrc
main.cpp
)
target_link_libraries(animatedtiles PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(animatedtiles_resource_files
+ "images/Time-For-Lunch-2.jpg"
+ "images/centered.png"
+ "images/ellipse.png"
+ "images/figure8.png"
+ "images/kinetic.png"
+ "images/random.png"
+ "images/tile.png"
+)
+
+qt6_add_resources(animatedtiles "animatedtiles"
+ PREFIX
+ "/"
+ FILES
+ ${animatedtiles_resource_files}
+)
+
install(TARGETS animatedtiles
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt
index 76750aac54..6b09e45cff 100644
--- a/examples/widgets/animation/easing/CMakeLists.txt
+++ b/examples/widgets/animation/easing/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/easing")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(easing
animation.h
- easing.qrc
form.ui
main.cpp
window.cpp window.h
)
target_link_libraries(easing PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(easing_resource_files
+ "images/qt-logo.png"
+)
+
+qt6_add_resources(easing "easing"
+ PREFIX
+ "/"
+ FILES
+ ${easing_resource_files}
+)
+
install(TARGETS easing
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/animation/moveblocks/CMakeLists.txt b/examples/widgets/animation/moveblocks/CMakeLists.txt
index e522d72477..c5219c9e6a 100644
--- a/examples/widgets/animation/moveblocks/CMakeLists.txt
+++ b/examples/widgets/animation/moveblocks/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/moveblocks")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(moveblocks
main.cpp
)
target_link_libraries(moveblocks PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt
index e8d1d42f03..cddcc6a7a3 100644
--- a/examples/widgets/animation/states/CMakeLists.txt
+++ b/examples/widgets/animation/states/CMakeLists.txt
@@ -9,18 +9,39 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/states")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(states
main.cpp
- states.qrc
)
target_link_libraries(states PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(states_resource_files
+ "accessories-dictionary.png"
+ "akregator.png"
+ "digikam.png"
+ "help-browser.png"
+ "k3b.png"
+ "kchart.png"
+)
+
+qt6_add_resources(states "states"
+ PREFIX
+ "/"
+ FILES
+ ${states_resource_files}
+)
+
install(TARGETS states
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/animation/stickman/CMakeLists.txt b/examples/widgets/animation/stickman/CMakeLists.txt
index 4c76380f51..791e685fc2 100644
--- a/examples/widgets/animation/stickman/CMakeLists.txt
+++ b/examples/widgets/animation/stickman/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/stickman")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(stickman
@@ -20,12 +22,30 @@ add_qt_gui_executable(stickman
main.cpp
node.cpp node.h
rectbutton.cpp rectbutton.h
- stickman.cpp stickman.h stickman.qrc
+ stickman.cpp stickman.h
)
target_link_libraries(stickman PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(stickman_resource_files
+ "animations/chilling.bin"
+ "animations/dancing.bin"
+ "animations/dead.bin"
+ "animations/jumping.bin"
+)
+
+qt6_add_resources(stickman "stickman"
+ PREFIX
+ "/"
+ FILES
+ ${stickman_resource_files}
+)
+
install(TARGETS stickman
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..74f095f4f6
--- /dev/null
+++ b/examples/widgets/animation/sub-attaq/.prev_CMakeLists.txt
@@ -0,0 +1,192 @@
+# Generated from sub-attaq.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(sub-attaq LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/sub-attaq")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(sub-attaq
+ animationmanager.cpp animationmanager.h
+ boat.cpp boat.h boat_p.h
+ bomb.cpp bomb.h
+ graphicsscene.cpp graphicsscene.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pixmapitem.cpp pixmapitem.h
+ progressitem.cpp progressitem.h
+ qanimationstate.cpp qanimationstate.h
+ states.cpp states.h
+ submarine.cpp submarine.h submarine_p.h
+ textinformationitem.cpp textinformationitem.h
+ torpedo.cpp torpedo.h
+)
+target_link_libraries(sub-attaq PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("pics/big/background.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/background"
+)
+set_source_files_properties("pics/big/boat.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/boat"
+)
+set_source_files_properties("pics/big/bomb.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/bomb"
+)
+set_source_files_properties("pics/big/explosion/boat/step1.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step1"
+)
+set_source_files_properties("pics/big/explosion/boat/step2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step2"
+)
+set_source_files_properties("pics/big/explosion/boat/step3.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step3"
+)
+set_source_files_properties("pics/big/explosion/boat/step4.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step4"
+)
+set_source_files_properties("pics/big/explosion/submarine/step1.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step1"
+)
+set_source_files_properties("pics/big/explosion/submarine/step2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step2"
+)
+set_source_files_properties("pics/big/explosion/submarine/step3.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step3"
+)
+set_source_files_properties("pics/big/explosion/submarine/step4.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step4"
+)
+set_source_files_properties("pics/big/submarine.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/submarine"
+)
+set_source_files_properties("pics/big/surface.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/surface"
+)
+set_source_files_properties("pics/big/torpedo.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/torpedo"
+)
+set_source_files_properties("pics/scalable/boat.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "boat"
+)
+set_source_files_properties("pics/scalable/sub-attaq.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "all"
+)
+set_source_files_properties("pics/scalable/submarine.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "submarine"
+)
+set_source_files_properties("pics/scalable/torpedo.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "torpedo"
+)
+set_source_files_properties("pics/small/background.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/background"
+)
+set_source_files_properties("pics/small/boat.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/boat"
+)
+set_source_files_properties("pics/small/bomb.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/bomb"
+)
+set_source_files_properties("pics/small/submarine.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/submarine"
+)
+set_source_files_properties("pics/small/surface.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/surface"
+)
+set_source_files_properties("pics/small/torpedo.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/torpedo"
+)
+set_source_files_properties("pics/welcome/logo-a.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-a"
+)
+set_source_files_properties("pics/welcome/logo-a2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-a2"
+)
+set_source_files_properties("pics/welcome/logo-b.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-b"
+)
+set_source_files_properties("pics/welcome/logo-dash.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-dash"
+)
+set_source_files_properties("pics/welcome/logo-excl.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-excl"
+)
+set_source_files_properties("pics/welcome/logo-q.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-q"
+)
+set_source_files_properties("pics/welcome/logo-s.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-s"
+)
+set_source_files_properties("pics/welcome/logo-t.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-t"
+)
+set_source_files_properties("pics/welcome/logo-t2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-t2"
+)
+set_source_files_properties("pics/welcome/logo-u.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-u"
+)
+set(subattaq_resource_files
+ "data.xml"
+ "pics/big/background.png"
+ "pics/big/boat.png"
+ "pics/big/bomb.png"
+ "pics/big/explosion/boat/step1.png"
+ "pics/big/explosion/boat/step2.png"
+ "pics/big/explosion/boat/step3.png"
+ "pics/big/explosion/boat/step4.png"
+ "pics/big/explosion/submarine/step1.png"
+ "pics/big/explosion/submarine/step2.png"
+ "pics/big/explosion/submarine/step3.png"
+ "pics/big/explosion/submarine/step4.png"
+ "pics/big/submarine.png"
+ "pics/big/surface.png"
+ "pics/big/torpedo.png"
+ "pics/scalable/boat.svg"
+ "pics/scalable/sub-attaq.svg"
+ "pics/scalable/submarine.svg"
+ "pics/scalable/torpedo.svg"
+ "pics/small/background.png"
+ "pics/small/boat.png"
+ "pics/small/bomb.png"
+ "pics/small/submarine.png"
+ "pics/small/surface.png"
+ "pics/small/torpedo.png"
+ "pics/welcome/logo-a.png"
+ "pics/welcome/logo-a2.png"
+ "pics/welcome/logo-b.png"
+ "pics/welcome/logo-dash.png"
+ "pics/welcome/logo-excl.png"
+ "pics/welcome/logo-q.png"
+ "pics/welcome/logo-s.png"
+ "pics/welcome/logo-t.png"
+ "pics/welcome/logo-t2.png"
+ "pics/welcome/logo-u.png"
+)
+
+qt6_add_resources(sub-attaq "subattaq"
+ PREFIX
+ "/"
+ FILES
+ ${subattaq_resource_files}
+)
+
+install(TARGETS sub-attaq
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt
index 52bed5c278..2e4e455b34 100644
--- a/examples/widgets/animation/sub-attaq/CMakeLists.txt
+++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/animation/sub-attaq")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS OpenGL) # special case
@@ -25,17 +27,164 @@ add_qt_gui_executable(sub-attaq
progressitem.cpp progressitem.h
qanimationstate.cpp qanimationstate.h
states.cpp states.h
- subattaq.qrc
submarine.cpp submarine.h submarine_p.h
textinformationitem.cpp textinformationitem.h
torpedo.cpp torpedo.h
)
target_link_libraries(sub-attaq PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
-if (TARGET Qt::OpenGL)
- target_link_libraries(sub-attaq PUBLIC Qt::OpenGL)
-endif()
+
+
+# Resources:
+set_source_files_properties("pics/big/background.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/background"
+)
+set_source_files_properties("pics/big/boat.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/boat"
+)
+set_source_files_properties("pics/big/bomb.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/bomb"
+)
+set_source_files_properties("pics/big/explosion/boat/step1.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step1"
+)
+set_source_files_properties("pics/big/explosion/boat/step2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step2"
+)
+set_source_files_properties("pics/big/explosion/boat/step3.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step3"
+)
+set_source_files_properties("pics/big/explosion/boat/step4.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/boat/step4"
+)
+set_source_files_properties("pics/big/explosion/submarine/step1.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step1"
+)
+set_source_files_properties("pics/big/explosion/submarine/step2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step2"
+)
+set_source_files_properties("pics/big/explosion/submarine/step3.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step3"
+)
+set_source_files_properties("pics/big/explosion/submarine/step4.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/explosion/submarine/step4"
+)
+set_source_files_properties("pics/big/submarine.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/submarine"
+)
+set_source_files_properties("pics/big/surface.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/surface"
+)
+set_source_files_properties("pics/big/torpedo.png"
+ PROPERTIES QT_RESOURCE_ALIAS "big/torpedo"
+)
+set_source_files_properties("pics/scalable/boat.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "boat"
+)
+set_source_files_properties("pics/scalable/sub-attaq.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "all"
+)
+set_source_files_properties("pics/scalable/submarine.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "submarine"
+)
+set_source_files_properties("pics/scalable/torpedo.svg"
+ PROPERTIES QT_RESOURCE_ALIAS "torpedo"
+)
+set_source_files_properties("pics/small/background.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/background"
+)
+set_source_files_properties("pics/small/boat.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/boat"
+)
+set_source_files_properties("pics/small/bomb.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/bomb"
+)
+set_source_files_properties("pics/small/submarine.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/submarine"
+)
+set_source_files_properties("pics/small/surface.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/surface"
+)
+set_source_files_properties("pics/small/torpedo.png"
+ PROPERTIES QT_RESOURCE_ALIAS "small/torpedo"
+)
+set_source_files_properties("pics/welcome/logo-a.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-a"
+)
+set_source_files_properties("pics/welcome/logo-a2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-a2"
+)
+set_source_files_properties("pics/welcome/logo-b.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-b"
+)
+set_source_files_properties("pics/welcome/logo-dash.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-dash"
+)
+set_source_files_properties("pics/welcome/logo-excl.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-excl"
+)
+set_source_files_properties("pics/welcome/logo-q.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-q"
+)
+set_source_files_properties("pics/welcome/logo-s.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-s"
+)
+set_source_files_properties("pics/welcome/logo-t.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-t"
+)
+set_source_files_properties("pics/welcome/logo-t2.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-t2"
+)
+set_source_files_properties("pics/welcome/logo-u.png"
+ PROPERTIES QT_RESOURCE_ALIAS "logo-u"
+)
+set(subattaq_resource_files
+ "data.xml"
+ "pics/big/background.png"
+ "pics/big/boat.png"
+ "pics/big/bomb.png"
+ "pics/big/explosion/boat/step1.png"
+ "pics/big/explosion/boat/step2.png"
+ "pics/big/explosion/boat/step3.png"
+ "pics/big/explosion/boat/step4.png"
+ "pics/big/explosion/submarine/step1.png"
+ "pics/big/explosion/submarine/step2.png"
+ "pics/big/explosion/submarine/step3.png"
+ "pics/big/explosion/submarine/step4.png"
+ "pics/big/submarine.png"
+ "pics/big/surface.png"
+ "pics/big/torpedo.png"
+ "pics/scalable/boat.svg"
+ "pics/scalable/sub-attaq.svg"
+ "pics/scalable/submarine.svg"
+ "pics/scalable/torpedo.svg"
+ "pics/small/background.png"
+ "pics/small/boat.png"
+ "pics/small/bomb.png"
+ "pics/small/submarine.png"
+ "pics/small/surface.png"
+ "pics/small/torpedo.png"
+ "pics/welcome/logo-a.png"
+ "pics/welcome/logo-a2.png"
+ "pics/welcome/logo-b.png"
+ "pics/welcome/logo-dash.png"
+ "pics/welcome/logo-excl.png"
+ "pics/welcome/logo-q.png"
+ "pics/welcome/logo-s.png"
+ "pics/welcome/logo-t.png"
+ "pics/welcome/logo-t2.png"
+ "pics/welcome/logo-u.png"
+)
+
+qt6_add_resources(sub-attaq "subattaq"
+ PREFIX
+ "/"
+ FILES
+ ${subattaq_resource_files}
+)
install(TARGETS sub-attaq
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt
index 9b85cc591e..3145dd41e5 100644
--- a/examples/widgets/desktop/screenshot/CMakeLists.txt
+++ b/examples/widgets/desktop/screenshot/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/desktop/screenshot")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(screenshot
@@ -18,6 +20,8 @@ add_qt_gui_executable(screenshot
screenshot.cpp screenshot.h
)
target_link_libraries(screenshot PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt
index 0086b79229..16af7808d7 100644
--- a/examples/widgets/desktop/systray/CMakeLists.txt
+++ b/examples/widgets/desktop/systray/CMakeLists.txt
@@ -9,19 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/desktop/systray")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(systray
main.cpp
- systray.qrc
window.cpp window.h
)
target_link_libraries(systray PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(systray_resource_files
+ "images/bad.png"
+ "images/heart.png"
+ "images/trash.png"
+)
+
+qt6_add_resources(systray "systray"
+ PREFIX
+ "/"
+ FILES
+ ${systray_resource_files}
+)
+
install(TARGETS systray
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt
index 51c4c9e351..0a85f02b21 100644
--- a/examples/widgets/dialogs/classwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt
@@ -9,18 +9,41 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/classwizard")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(classwizard
- classwizard.cpp classwizard.h classwizard.qrc
+ classwizard.cpp classwizard.h
main.cpp
)
target_link_libraries(classwizard PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(classwizard_resource_files
+ "images/background.png"
+ "images/banner.png"
+ "images/logo1.png"
+ "images/logo2.png"
+ "images/logo3.png"
+ "images/watermark1.png"
+ "images/watermark2.png"
+)
+
+qt6_add_resources(classwizard "classwizard"
+ PREFIX
+ "/"
+ FILES
+ ${classwizard_resource_files}
+)
+
install(TARGETS classwizard
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt
index 108858868c..dfac53a3f6 100644
--- a/examples/widgets/dialogs/extension/CMakeLists.txt
+++ b/examples/widgets/dialogs/extension/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/extension")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(extension
@@ -18,6 +20,8 @@ add_qt_gui_executable(extension
main.cpp
)
target_link_libraries(extension PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt
index 27e2265e70..42681ca424 100644
--- a/examples/widgets/dialogs/findfiles/CMakeLists.txt
+++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/findfiles")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(findfiles
@@ -18,6 +20,8 @@ add_qt_gui_executable(findfiles
window.cpp window.h
)
target_link_libraries(findfiles PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index 9684cd8171..20b4b7d799 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -9,20 +9,38 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/licensewizard")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport)
add_qt_gui_executable(licensewizard
- licensewizard.cpp licensewizard.h licensewizard.qrc
+ licensewizard.cpp licensewizard.h
main.cpp
)
target_link_libraries(licensewizard PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::PrintSupport
Qt::Widgets
)
+
+# Resources:
+set(licensewizard_resource_files
+ "images/logo.png"
+ "images/watermark.png"
+)
+
+qt6_add_resources(licensewizard "licensewizard"
+ PREFIX
+ "/"
+ FILES
+ ${licensewizard_resource_files}
+)
+
install(TARGETS licensewizard
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
index 2e1a84a4f0..ed4c11b041 100644
--- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
+++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/standarddialogs")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(standarddialogs
@@ -18,6 +20,8 @@ add_qt_gui_executable(standarddialogs
main.cpp
)
target_link_libraries(standarddialogs PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
index 980f3cb222..0df1238e56 100644
--- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt
+++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/tabdialog")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(tabdialog
@@ -18,6 +20,8 @@ add_qt_gui_executable(tabdialog
tabdialog.cpp tabdialog.h
)
target_link_libraries(tabdialog PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
index 1c194017a4..759483ab8f 100644
--- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/dialogs/trivialwizard")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(trivialwizard
trivialwizard.cpp
)
target_link_libraries(trivialwizard PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
index 5126b41d27..5695657792 100644
--- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
@@ -9,19 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draggableicons")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(draggableicons
- draggableicons.qrc
dragwidget.cpp dragwidget.h
main.cpp
)
target_link_libraries(draggableicons PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(draggableicons_resource_files
+ "images/boat.png"
+ "images/car.png"
+ "images/house.png"
+)
+
+qt6_add_resources(draggableicons "draggableicons"
+ PREFIX
+ "/"
+ FILES
+ ${draggableicons_resource_files}
+)
+
install(TARGETS draggableicons
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
index c542a7b585..d3dfc125b2 100644
--- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
@@ -9,19 +9,35 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draggabletext")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(draggabletext
- draggabletext.qrc
dragwidget.cpp dragwidget.h
main.cpp
)
target_link_libraries(draggabletext PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(draggabletext_resource_files
+ "words.txt"
+)
+
+qt6_add_resources(draggabletext "draggabletext"
+ PREFIX
+ "/dictionary"
+ FILES
+ ${draggabletext_resource_files}
+)
+
install(TARGETS draggabletext
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/draganddrop/dropsite/CMakeLists.txt b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
index 591edfac3d..7d6ce02b4b 100644
--- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt
+++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/dropsite")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(dropsite
@@ -19,6 +21,8 @@ add_qt_gui_executable(dropsite
main.cpp
)
target_link_libraries(dropsite PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
index 84c097f326..31441ab7cb 100644
--- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
+++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/fridgemagnets")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(fridgemagnets
draglabel.cpp draglabel.h
dragwidget.cpp dragwidget.h
- fridgemagnets.qrc
main.cpp
)
target_link_libraries(fridgemagnets PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(fridgemagnets_resource_files
+ "words.txt"
+)
+
+qt6_add_resources(fridgemagnets "fridgemagnets"
+ PREFIX
+ "/dictionary"
+ FILES
+ ${fridgemagnets_resource_files}
+)
+
install(TARGETS fridgemagnets
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt b/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..148f386115
--- /dev/null
+++ b/examples/widgets/draganddrop/puzzle/.prev_CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from puzzle.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/puzzle")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(puzzle
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pieceslist.cpp pieceslist.h
+ puzzlewidget.cpp puzzlewidget.h
+)
+target_link_libraries(puzzle PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(puzzle "puzzle"
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
+install(TARGETS puzzle
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
index 99db9b4e0d..b181efd090 100644
--- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt
+++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/draganddrop/draganddrop_puzzle") # special case
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(draganddrop_puzzle # special case: renamed puzzle
main.cpp
mainwindow.cpp mainwindow.h
pieceslist.cpp pieceslist.h
- puzzle.qrc
puzzlewidget.cpp puzzlewidget.h
)
-target_link_libraries(draganddrop_puzzle PUBLIC # special case: renamed puzzle
+target_link_libraries(draganddrop_puzzle PUBLIC # special case
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(draganddrop_puzzle "puzzle" # special case
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
install(TARGETS draganddrop_puzzle # special case: renamed puzzle
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/effects/blurpicker/CMakeLists.txt b/examples/widgets/effects/blurpicker/CMakeLists.txt
index 030de7fe93..3f9fa69797 100644
--- a/examples/widgets/effects/blurpicker/CMakeLists.txt
+++ b/examples/widgets/effects/blurpicker/CMakeLists.txt
@@ -9,19 +9,44 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/effects/blurpicker")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(blurpicker
blureffect.cpp blureffect.h
- blurpicker.cpp blurpicker.h blurpicker.qrc
+ blurpicker.cpp blurpicker.h
main.cpp
)
target_link_libraries(blurpicker PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(blurpicker_resource_files
+ "images/accessories-calculator.png"
+ "images/accessories-text-editor.png"
+ "images/background.jpg"
+ "images/help-browser.png"
+ "images/internet-group-chat.png"
+ "images/internet-mail.png"
+ "images/internet-web-browser.png"
+ "images/office-calendar.png"
+ "images/system-users.png"
+)
+
+qt6_add_resources(blurpicker "blurpicker"
+ PREFIX
+ "/"
+ FILES
+ ${blurpicker_resource_files}
+)
+
install(TARGETS blurpicker
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/effects/fademessage/CMakeLists.txt b/examples/widgets/effects/fademessage/CMakeLists.txt
index d38ebd2d62..b84985a886 100644
--- a/examples/widgets/effects/fademessage/CMakeLists.txt
+++ b/examples/widgets/effects/fademessage/CMakeLists.txt
@@ -9,18 +9,35 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/effects/fademessage")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(fademessage
- fademessage.cpp fademessage.h fademessage.qrc
+ fademessage.cpp fademessage.h
main.cpp
)
target_link_libraries(fademessage PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(fademessage_resource_files
+ "background.jpg"
+)
+
+qt6_add_resources(fademessage "fademessage"
+ PREFIX
+ "/"
+ FILES
+ ${fademessage_resource_files}
+)
+
install(TARGETS fademessage
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/gestures/imagegestures/CMakeLists.txt b/examples/widgets/gestures/imagegestures/CMakeLists.txt
index 62e4854d33..9676089ff9 100644
--- a/examples/widgets/gestures/imagegestures/CMakeLists.txt
+++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/gestures/imagegestures")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(imagegestures
@@ -19,6 +21,8 @@ add_qt_gui_executable(imagegestures
mainwidget.cpp mainwidget.h
)
target_link_libraries(imagegestures PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
index 021628a7ff..c04890d613 100644
--- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/anchorlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(anchorlayout
main.cpp
)
target_link_libraries(anchorlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
index 527e33b826..18c35e6a3e 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/basicgraphicslayouts")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basicgraphicslayouts
- basicgraphicslayouts.qrc
layoutitem.cpp layoutitem.h
main.cpp
window.cpp window.h
)
target_link_libraries(basicgraphicslayouts PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(basicgraphicslayouts_resource_files
+ "images/block.png"
+)
+
+qt6_add_resources(basicgraphicslayouts "basicgraphicslayouts"
+ PREFIX
+ "/"
+ FILES
+ ${basicgraphicslayouts_resource_files}
+)
+
install(TARGETS basicgraphicslayouts
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt b/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..b82c3eced8
--- /dev/null
+++ b/examples/widgets/graphicsview/chip/.prev_CMakeLists.txt
@@ -0,0 +1,58 @@
+# Generated from chip.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(chip LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/chip")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(chip
+ chip.cpp chip.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ view.cpp view.h
+)
+target_link_libraries(chip PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(images_resource_files
+ "fileprint.png"
+ "qt4logo.png"
+ "rotateleft.png"
+ "rotateright.png"
+ "zoomin.png"
+ "zoomout.png"
+)
+
+qt6_add_resources(chip "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(chip PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS chip
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index 302a8a56ca..41af2553ee 100644
--- a/examples/widgets/graphicsview/chip/CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/CMakeLists.txt
@@ -9,27 +9,48 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/chip")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS OpenGL) # special case
find_package(Qt6 COMPONENTS PrintSupport) # special case
add_qt_gui_executable(chip
chip.cpp chip.h
- images.qrc
main.cpp
mainwindow.cpp mainwindow.h
view.cpp view.h
)
target_link_libraries(chip PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
-if (TARGET Qt::OpenGL)
- target_link_libraries(chip PUBLIC Qt::OpenGL)
-endif()
-if (TARGET Qt::PrintSupport)
- target_link_libraries(chip PUBLIC Qt::PrintSupport)
+
+
+# Resources:
+set(images_resource_files
+ "fileprint.png"
+ "qt4logo.png"
+ "rotateleft.png"
+ "rotateright.png"
+ "zoomin.png"
+ "zoomout.png"
+)
+
+qt6_add_resources(chip "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(chip PUBLIC
+ Qt::PrintSupport
+ )
endif()
install(TARGETS chip
diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
index aeda9367a3..c2b0479e76 100644
--- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
+++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
@@ -9,19 +9,35 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/collidingmice")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(collidingmice
main.cpp
- mice.qrc
mouse.cpp mouse.h
)
target_link_libraries(collidingmice PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(mice_resource_files
+ "images/cheese.jpg"
+)
+
+qt6_add_resources(collidingmice "mice"
+ PREFIX
+ "/"
+ FILES
+ ${mice_resource_files}
+)
+
install(TARGETS collidingmice
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
index 5c7de9c7cd..26afe90016 100644
--- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
+++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
@@ -9,22 +9,53 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/diagramscene")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(diagramscene
arrow.cpp arrow.h
diagramitem.cpp diagramitem.h
- diagramscene.cpp diagramscene.h diagramscene.qrc
+ diagramscene.cpp diagramscene.h
diagramtextitem.cpp diagramtextitem.h
main.cpp
mainwindow.cpp mainwindow.h
)
target_link_libraries(diagramscene PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(diagramscene_resource_files
+ "images/background1.png"
+ "images/background2.png"
+ "images/background3.png"
+ "images/background4.png"
+ "images/bold.png"
+ "images/bringtofront.png"
+ "images/delete.png"
+ "images/floodfill.png"
+ "images/italic.png"
+ "images/linecolor.png"
+ "images/linepointer.png"
+ "images/pointer.png"
+ "images/sendtoback.png"
+ "images/textpointer.png"
+ "images/underline.png"
+)
+
+qt6_add_resources(diagramscene "diagramscene"
+ PREFIX
+ "/"
+ FILES
+ ${diagramscene_resource_files}
+)
+
install(TARGETS diagramscene
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
index ef367d461f..db6c34065e 100644
--- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
+++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
@@ -9,19 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/dragdroprobot")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(dragdroprobot
coloritem.cpp coloritem.h
main.cpp
- robot.cpp robot.h robot.qrc
+ robot.cpp robot.h
)
target_link_libraries(dragdroprobot PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(robot_resource_files
+ "images/head.png"
+)
+
+qt6_add_resources(dragdroprobot "robot"
+ PREFIX
+ "/"
+ FILES
+ ${robot_resource_files}
+)
+
install(TARGETS dragdroprobot
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
index a5d367e2d2..5dc52c9755 100644
--- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/elasticnodes")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(elasticnodes
@@ -20,6 +22,8 @@ add_qt_gui_executable(elasticnodes
node.cpp node.h
)
target_link_libraries(elasticnodes PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
index 9e3059176b..0b9df4b4d6 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
+++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/embeddeddialogs")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(embeddeddialogs
customproxy.cpp customproxy.h
embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui
- embeddeddialogs.qrc
main.cpp
)
target_link_libraries(embeddeddialogs PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(embeddeddialogs_resource_files
+ "No-Ones-Laughing-3.jpg"
+)
+
+qt6_add_resources(embeddeddialogs "embeddeddialogs"
+ PREFIX
+ "/"
+ FILES
+ ${embeddeddialogs_resource_files}
+)
+
install(TARGETS embeddeddialogs
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..ce24a9fcb2
--- /dev/null
+++ b/examples/widgets/graphicsview/flowlayout/.prev_CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from flowlayout.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(flowlayout LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/flowlayout")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(flowlayout
+ flowlayout.cpp flowlayout.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(flowlayout PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS flowlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
index 45851ca107..50f41f7782 100644
--- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/graphicsview_flowlayout") # special case
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(graphicsview_flowlayout # special case: renamed flowlayout
@@ -18,7 +20,9 @@ add_qt_gui_executable(graphicsview_flowlayout # special case: renamed flowlayout
main.cpp
window.cpp window.h
)
-target_link_libraries(graphicsview_flowlayout PUBLIC # special case: renamed flowlayout
+target_link_libraries(graphicsview_flowlayout PUBLIC # special case
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
index 9c4282391e..748e1e27f3 100644
--- a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
@@ -1,45 +1,63 @@
# Generated from padnavigator.pro.
-#####################################################################
-## padnavigator Binary:
-#####################################################################
-
-add_qt_executable(padnavigator
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/padnavigator"
- SOURCES
- flippablepad.cpp flippablepad.h
- form.ui
- main.cpp
- padnavigator.cpp padnavigator.h
- roundrectitem.cpp roundrectitem.h
- splashitem.cpp splashitem.h
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+cmake_minimum_required(VERSION 3.14)
+project(padnavigator LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/padnavigator")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_executable(padnavigator
+ flippablepad.cpp flippablepad.h
+ form.ui
+ main.cpp
+ padnavigator.cpp padnavigator.h
+ roundrectitem.cpp roundrectitem.h
+ splashitem.cpp splashitem.h
+)
+target_link_libraries(padnavigator PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
)
+
# Resources:
-add_qt_resource(padnavigator "padnavigator" FILES
- images/artsfftscope.png
- images/blue_angle_swirl.jpg
- images/kontact_contacts.png
- images/kontact_journal.png
- images/kontact_mail.png
- images/kontact_notes.png
- images/kopeteavailable.png
- images/metacontact_online.png
- images/minitools.png)
-
-
-#### Keys ignored in scope 1:.:.:padnavigator.pro:<TRUE>:
-# CONFIG = "console"
-
-## Scopes:
-#####################################################################
-
-extend_target(padnavigator CONDITION TARGET Qt::OpenGL
- PUBLIC_LIBRARIES
+set(padnavigator_resource_files
+ "images/artsfftscope.png"
+ "images/blue_angle_swirl.jpg"
+ "images/kontact_contacts.png"
+ "images/kontact_journal.png"
+ "images/kontact_mail.png"
+ "images/kontact_notes.png"
+ "images/kopeteavailable.png"
+ "images/metacontact_online.png"
+ "images/minitools.png"
+)
+
+qt6_add_resources(padnavigator "padnavigator"
+ PREFIX
+ "/"
+ FILES
+ ${padnavigator_resource_files}
+)
+
+if(TARGET Qt::OpenGL)
+ target_link_libraries(padnavigator PUBLIC
Qt::OpenGL
+ )
+endif()
+
+install(TARGETS padnavigator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
index 7fc6ec1459..7231066b72 100644
--- a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/padnavigator")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS OpenGL) # special case
@@ -18,18 +20,42 @@ add_executable(padnavigator
flippablepad.cpp flippablepad.h
form.ui
main.cpp
- padnavigator.cpp padnavigator.h padnavigator.qrc
+ padnavigator.cpp padnavigator.h
roundrectitem.cpp roundrectitem.h
splashitem.cpp splashitem.h
)
target_link_libraries(padnavigator PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
-# special case begin
-if (TARGET Qt::OpenGL)
- target_link_libraries(padnavigator PUBLIC Qt::OpenGL)
+
+
+# Resources:
+set(padnavigator_resource_files
+ "images/artsfftscope.png"
+ "images/blue_angle_swirl.jpg"
+ "images/kontact_contacts.png"
+ "images/kontact_journal.png"
+ "images/kontact_mail.png"
+ "images/kontact_notes.png"
+ "images/kopeteavailable.png"
+ "images/metacontact_online.png"
+ "images/minitools.png"
+)
+
+qt6_add_resources(padnavigator "padnavigator"
+ PREFIX
+ "/"
+ FILES
+ ${padnavigator_resource_files}
+)
+
+if(TARGET Qt::OpenGL)
+ target_link_libraries(padnavigator PUBLIC
+ Qt::OpenGL
+ )
endif()
-# special case end
install(TARGETS padnavigator
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
index 56e3199cc9..c7ea760ede 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/simpleanchorlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(simpleanchorlayout
main.cpp
)
target_link_libraries(simpleanchorlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index a9745c54e1..d6ca46ab22 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -9,18 +9,39 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/graphicsview/weatheranchorlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(weatheranchorlayout
main.cpp
- weatheranchorlayout.qrc
)
target_link_libraries(weatheranchorlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(weatheranchorlayout_resource_files
+ "images/5days.jpg"
+ "images/details.jpg"
+ "images/place.jpg"
+ "images/tabbar.jpg"
+ "images/title.jpg"
+ "images/weather-few-clouds.png"
+)
+
+qt6_add_resources(weatheranchorlayout "weatheranchorlayout"
+ PREFIX
+ "/"
+ FILES
+ ${weatheranchorlayout_resource_files}
+)
+
install(TARGETS weatheranchorlayout
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt
index eeb4ad23d7..5c14da9ac5 100644
--- a/examples/widgets/itemviews/addressbook/CMakeLists.txt
+++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/addressbook")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(addressbook
@@ -22,6 +24,8 @@ add_qt_gui_executable(addressbook
tablemodel.cpp tablemodel.h
)
target_link_libraries(addressbook PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
index ee084edab6..90862ac0b0 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/basicsortfiltermodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basicsortfiltermodel
@@ -18,6 +20,8 @@ add_qt_gui_executable(basicsortfiltermodel
window.cpp window.h
)
target_link_libraries(basicsortfiltermodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt
index 89cac1f515..5788215de6 100644
--- a/examples/widgets/itemviews/chart/CMakeLists.txt
+++ b/examples/widgets/itemviews/chart/CMakeLists.txt
@@ -9,20 +9,42 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/chart")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(chart
- chart.qrc
main.cpp
mainwindow.cpp mainwindow.h
pieview.cpp pieview.h
)
target_link_libraries(chart PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(chart_resource_files
+ "qtdata.cht"
+)
+
+qt6_add_resources(chart "chart"
+ PREFIX
+ "/Charts"
+ FILES
+ ${chart_resource_files}
+)
+
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(chart PUBLIC
+ m
+ )
+endif()
+
install(TARGETS chart
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
index b665171ddb..3ec96a2fc4 100644
--- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
+++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/coloreditorfactory")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(coloreditorfactory
@@ -19,6 +21,8 @@ add_qt_gui_executable(coloreditorfactory
window.cpp window.h
)
target_link_libraries(coloreditorfactory PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
index af806ceb64..c8a0bc1438 100644
--- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/combowidgetmapper")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(combowidgetmapper
@@ -18,6 +20,8 @@ add_qt_gui_executable(combowidgetmapper
window.cpp window.h
)
target_link_libraries(combowidgetmapper PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
index c5110ba8b3..859b88a397 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/customsortfiltermodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(customsortfiltermodel
- customsortfiltermodel.qrc
filterwidget.cpp filterwidget.h
main.cpp
mysortfilterproxymodel.cpp mysortfilterproxymodel.h
window.cpp window.h
)
target_link_libraries(customsortfiltermodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(customsortfiltermodel_resource_files
+ "images/find.png"
+)
+
+qt6_add_resources(customsortfiltermodel "customsortfiltermodel"
+ PREFIX
+ "/"
+ FILES
+ ${customsortfiltermodel_resource_files}
+)
+
install(TARGETS customsortfiltermodel
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt
index 3875436371..6cb902c092 100644
--- a/examples/widgets/itemviews/dirview/CMakeLists.txt
+++ b/examples/widgets/itemviews/dirview/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/dirview")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(dirview
main.cpp
)
target_link_libraries(dirview PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
index c9f46d9e6a..faae8e1a80 100644
--- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/editabletreemodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(editabletreemodel
- editabletreemodel.qrc
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
treeitem.cpp treeitem.h
treemodel.cpp treemodel.h
)
target_link_libraries(editabletreemodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(editabletreemodel_resource_files
+ "default.txt"
+)
+
+qt6_add_resources(editabletreemodel "editabletreemodel"
+ PREFIX
+ "/"
+ FILES
+ ${editabletreemodel_resource_files}
+)
+
install(TARGETS editabletreemodel
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
index dded651b57..fea985d049 100644
--- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/fetchmore")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(fetchmore
@@ -19,6 +21,8 @@ add_qt_gui_executable(fetchmore
window.cpp window.h
)
target_link_libraries(fetchmore PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
index 5f9cd9d77c..c0c4ef6146 100644
--- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt
+++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/flattreeview")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flattreeview
main.cpp
)
target_link_libraries(flattreeview PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
index 8e2db43944..dab2e0a153 100644
--- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
+++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
@@ -9,19 +9,35 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/frozencolumn")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(frozencolumn
freezetablewidget.cpp freezetablewidget.h
- grades.qrc
main.cpp
)
target_link_libraries(frozencolumn PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(grades_resource_files
+ "grades.txt"
+)
+
+qt6_add_resources(frozencolumn "grades"
+ PREFIX
+ "/"
+ FILES
+ ${grades_resource_files}
+)
+
install(TARGETS frozencolumn
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt
index d37ee8fe18..c27018ffa4 100644
--- a/examples/widgets/itemviews/interview/CMakeLists.txt
+++ b/examples/widgets/itemviews/interview/CMakeLists.txt
@@ -9,19 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/interview")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(interview
- interview.qrc
main.cpp
model.cpp model.h
)
target_link_libraries(interview PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(interview_resource_files
+ "images/folder.png"
+ "images/interview.png"
+ "images/services.png"
+)
+
+qt6_add_resources(interview "interview"
+ PREFIX
+ "/"
+ FILES
+ ${interview_resource_files}
+)
+
install(TARGETS interview
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1c8ccc6f81
--- /dev/null
+++ b/examples/widgets/itemviews/pixelator/.prev_CMakeLists.txt
@@ -0,0 +1,53 @@
+# Generated from pixelator.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pixelator LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(pixelator
+ imagemodel.cpp imagemodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pixeldelegate.cpp pixeldelegate.h
+)
+target_link_libraries(pixelator PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(images_resource_files
+ "images/qt.png"
+)
+
+qt6_add_resources(pixelator "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(pixelator PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS pixelator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt
index dbb888a1b2..aba494c31a 100644
--- a/examples/widgets/itemviews/pixelator/CMakeLists.txt
+++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt
@@ -9,22 +9,39 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/pixelator")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
add_qt_gui_executable(pixelator
imagemodel.cpp imagemodel.h
- images.qrc
main.cpp
mainwindow.cpp mainwindow.h
pixeldelegate.cpp pixeldelegate.h
)
target_link_libraries(pixelator PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
-if (TARGET Qt::PrintSupport)
+
+
+# Resources:
+set(images_resource_files
+ "images/qt.png"
+)
+
+qt6_add_resources(pixelator "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
target_link_libraries(pixelator PUBLIC
Qt::PrintSupport
)
diff --git a/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..17765e9d47
--- /dev/null
+++ b/examples/widgets/itemviews/puzzle/.prev_CMakeLists.txt
@@ -0,0 +1,47 @@
+# Generated from puzzle.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(puzzle
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ piecesmodel.cpp piecesmodel.h
+ puzzlewidget.cpp puzzlewidget.h
+)
+target_link_libraries(puzzle PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(puzzle "puzzle"
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
+install(TARGETS puzzle
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt
index ed0b4f3f7c..53494d37f1 100644
--- a/examples/widgets/itemviews/puzzle/CMakeLists.txt
+++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/puzzle")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(itemviews_puzzle # special case: renamed puzzle
main.cpp
mainwindow.cpp mainwindow.h
piecesmodel.cpp piecesmodel.h
- puzzle.qrc
puzzlewidget.cpp puzzlewidget.h
)
-target_link_libraries(itemviews_puzzle PUBLIC # special case: renamed puzzle
+target_link_libraries(itemviews_puzzle PUBLIC # special case
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(puzzle_resource_files
+ "example.jpg"
+)
+
+qt6_add_resources(itemviews_puzzle "puzzle"
+ PREFIX
+ "/images"
+ FILES
+ ${puzzle_resource_files}
+)
+
install(TARGETS itemviews_puzzle # special case: renamed puzzle
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
index 610b7e2ff2..e22e3fe1ad 100644
--- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpledommodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Xml)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,6 +23,8 @@ add_qt_gui_executable(simpledommodel
mainwindow.cpp mainwindow.h
)
target_link_libraries(simpledommodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
Qt::Xml
)
diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
index 7a1cafc26e..8a6607e584 100644
--- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simpletreemodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(simpletreemodel
main.cpp
- simpletreemodel.qrc
treeitem.cpp treeitem.h
treemodel.cpp treemodel.h
)
target_link_libraries(simpletreemodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(simpletreemodel_resource_files
+ "default.txt"
+)
+
+qt6_add_resources(simpletreemodel "simpletreemodel"
+ PREFIX
+ "/"
+ FILES
+ ${simpletreemodel_resource_files}
+)
+
install(TARGETS simpletreemodel
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
index 367f24235b..163dc98e2c 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/simplewidgetmapper")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(simplewidgetmapper
@@ -18,6 +20,8 @@ add_qt_gui_executable(simplewidgetmapper
window.cpp window.h
)
target_link_libraries(simplewidgetmapper PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
index 0c08a1bbba..b73158cd5a 100644
--- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spinboxdelegate")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(spinboxdelegate
@@ -18,6 +20,8 @@ add_qt_gui_executable(spinboxdelegate
main.cpp
)
target_link_libraries(spinboxdelegate PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..acf5f187fe
--- /dev/null
+++ b/examples/widgets/itemviews/spreadsheet/.prev_CMakeLists.txt
@@ -0,0 +1,54 @@
+# Generated from spreadsheet.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(spreadsheet LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(spreadsheet
+ main.cpp
+ printview.cpp printview.h
+ spreadsheet.cpp spreadsheet.h
+ spreadsheetdelegate.cpp spreadsheetdelegate.h
+ spreadsheetitem.cpp spreadsheetitem.h
+)
+target_link_libraries(spreadsheet PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(spreadsheet_resource_files
+ "images/interview.png"
+)
+
+qt6_add_resources(spreadsheet "spreadsheet"
+ PREFIX
+ "/"
+ FILES
+ ${spreadsheet_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS spreadsheet
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
index 7916d07a4d..b1fc6ff01a 100644
--- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
+++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
@@ -9,19 +9,23 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/spreadsheet")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
add_qt_gui_executable(spreadsheet
main.cpp
printview.cpp printview.h
- spreadsheet.cpp spreadsheet.h spreadsheet.qrc
+ spreadsheet.cpp spreadsheet.h
spreadsheetdelegate.cpp spreadsheetdelegate.h
spreadsheetitem.cpp spreadsheetitem.h
)
target_link_libraries(spreadsheet PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -30,6 +34,25 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+
+# Resources:
+set(spreadsheet_resource_files
+ "images/interview.png"
+)
+
+qt6_add_resources(spreadsheet "spreadsheet"
+ PREFIX
+ "/"
+ FILES
+ ${spreadsheet_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS spreadsheet
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
index da3a4a07b4..5f6f660488 100644
--- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/itemviews/stardelegate")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(stardelegate
@@ -20,6 +22,8 @@ add_qt_gui_executable(stardelegate
starrating.cpp starrating.h
)
target_link_libraries(stardelegate PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
index 06c8afc932..99b4f13861 100644
--- a/examples/widgets/itemviews/storageview/CMakeLists.txt
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 210ad8d7ff..beb8a0ca90 100644
--- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/basiclayouts")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basiclayouts
@@ -18,6 +20,8 @@ add_qt_gui_executable(basiclayouts
main.cpp
)
target_link_libraries(basiclayouts PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt
index 0d1b2e772d..f4e51d2fab 100644
--- a/examples/widgets/layouts/borderlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/borderlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(borderlayout
@@ -19,6 +21,8 @@ add_qt_gui_executable(borderlayout
window.cpp window.h
)
target_link_libraries(borderlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
index 65fe32f181..c2bcd050d5 100644
--- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/dynamiclayouts")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(dynamiclayouts
@@ -18,6 +20,8 @@ add_qt_gui_executable(dynamiclayouts
main.cpp
)
target_link_libraries(dynamiclayouts PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt
index fff6fa004b..85104eb3eb 100644
--- a/examples/widgets/layouts/flowlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/layouts/flowlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(flowlayout
@@ -19,6 +21,8 @@ add_qt_gui_executable(flowlayout
window.cpp window.h
)
target_link_libraries(flowlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
index 7aece18580..158ddc3adf 100644
--- a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
+++ b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
@@ -9,15 +9,19 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mac/qmaccocoaviewcontainer")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(qmaccocoaviewcontainer
main.mm
)
target_link_libraries(qmaccocoaviewcontainer PUBLIC
- ${FWAppKit}
+ "-framework AppKit"
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
index f7d3ba6431..5ed3e0f4cc 100644
--- a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
+++ b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
@@ -9,15 +9,19 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mac/qmacnativewidget")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(qmacnativewidget
main.mm
)
target_link_libraries(qmacnativewidget PUBLIC
- ${FWAppKit}
+ "-framework AppKit"
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt
index a59270e824..d66c2ff38a 100644
--- a/examples/widgets/mainwindows/application/CMakeLists.txt
+++ b/examples/widgets/mainwindows/application/CMakeLists.txt
@@ -9,19 +9,40 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/application")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(application
- application.qrc
main.cpp
mainwindow.cpp mainwindow.h
)
target_link_libraries(application PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(application_resource_files
+ "images/copy.png"
+ "images/cut.png"
+ "images/new.png"
+ "images/open.png"
+ "images/paste.png"
+ "images/save.png"
+)
+
+qt6_add_resources(application "application"
+ PREFIX
+ "/"
+ FILES
+ ${application_resource_files}
+)
+
install(TARGETS application
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..7bd57f1439
--- /dev/null
+++ b/examples/widgets/mainwindows/dockwidgets/.prev_CMakeLists.txt
@@ -0,0 +1,54 @@
+# Generated from dockwidgets.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(dockwidgets LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/dockwidgets")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(dockwidgets
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(dockwidgets PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(dockwidgets_resource_files
+ "images/new.png"
+ "images/print.png"
+ "images/save.png"
+ "images/undo.png"
+)
+
+qt6_add_resources(dockwidgets "dockwidgets"
+ PREFIX
+ "/"
+ FILES
+ ${dockwidgets_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(dockwidgets PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS dockwidgets
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
index 5a58d3b7f7..b811094658 100644
--- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
@@ -9,17 +9,20 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/dockwidgets")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
add_qt_gui_executable(dockwidgets
- dockwidgets.qrc
main.cpp
mainwindow.cpp mainwindow.h
)
target_link_libraries(dockwidgets PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -28,6 +31,28 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+
+# Resources:
+set(dockwidgets_resource_files
+ "images/new.png"
+ "images/print.png"
+ "images/save.png"
+ "images/undo.png"
+)
+
+qt6_add_resources(dockwidgets "dockwidgets"
+ PREFIX
+ "/"
+ FILES
+ ${dockwidgets_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(dockwidgets PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS dockwidgets
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
index f4f8bdb4ca..3152fb0904 100644
--- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
@@ -9,20 +9,40 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/mainwindow")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mainwindow
colorswatch.cpp colorswatch.h
main.cpp
- mainwindow.cpp mainwindow.h mainwindow.qrc
+ mainwindow.cpp mainwindow.h
toolbar.cpp toolbar.h
)
target_link_libraries(mainwindow PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(mainwindow_resource_files
+ "qt.png"
+ "titlebarCenter.png"
+ "titlebarLeft.png"
+ "titlebarRight.png"
+)
+
+qt6_add_resources(mainwindow "mainwindow"
+ PREFIX
+ "/res"
+ FILES
+ ${mainwindow_resource_files}
+)
+
install(TARGETS mainwindow
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt
index ef5100b998..c75049285d 100644
--- a/examples/widgets/mainwindows/mdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt
@@ -9,20 +9,41 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/mdi")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mdi
main.cpp
mainwindow.cpp mainwindow.h
- mdi.qrc
mdichild.cpp mdichild.h
)
target_link_libraries(mdi PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(mdi_resource_files
+ "images/copy.png"
+ "images/cut.png"
+ "images/new.png"
+ "images/open.png"
+ "images/paste.png"
+ "images/save.png"
+)
+
+qt6_add_resources(mdi "mdi"
+ PREFIX
+ "/"
+ FILES
+ ${mdi_resource_files}
+)
+
install(TARGETS mdi
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt
index ee3123423b..0e76c3a447 100644
--- a/examples/widgets/mainwindows/menus/CMakeLists.txt
+++ b/examples/widgets/mainwindows/menus/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/menus")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(menus
@@ -18,6 +20,8 @@ add_qt_gui_executable(menus
mainwindow.cpp mainwindow.h
)
target_link_libraries(menus PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt
index 7e737d0eb1..f9d7d5ff3f 100644
--- a/examples/widgets/mainwindows/sdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt
@@ -9,19 +9,40 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/mainwindows/sdi")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(sdi
main.cpp
mainwindow.cpp mainwindow.h
- sdi.qrc
)
target_link_libraries(sdi PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(sdi_resource_files
+ "images/copy.png"
+ "images/cut.png"
+ "images/new.png"
+ "images/open.png"
+ "images/paste.png"
+ "images/save.png"
+)
+
+qt6_add_resources(sdi "sdi"
+ PREFIX
+ "/"
+ FILES
+ ${sdi_resource_files}
+)
+
install(TARGETS sdi
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/affine/.prev_CMakeLists.txt b/examples/widgets/painting/affine/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..948456d821
--- /dev/null
+++ b/examples/widgets/painting/affine/.prev_CMakeLists.txt
@@ -0,0 +1,215 @@
+# Generated from affine.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(affine LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(affine
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ main.cpp
+ xform.cpp xform.h
+)
+target_include_directories(affine PUBLIC
+ ../shared
+)
+
+target_link_libraries(affine PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(affine "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(affine_resource_files
+ "bg1.jpg"
+ "xform.cpp"
+ "xform.html"
+)
+
+qt6_add_resources(affine "affine"
+ PREFIX
+ "/res/affine"
+ FILES
+ ${affine_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(affine PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(affine PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS affine
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index f526cffb77..56e862d20f 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -9,24 +9,204 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/affine")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(affine
# special case: remove files from ../shared
- affine.qrc
main.cpp
xform.cpp xform.h
)
target_include_directories(affine PUBLIC
../shared
)
+
target_link_libraries(affine PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(affine "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(affine_resource_files
+ "bg1.jpg"
+ "xform.cpp"
+ "xform.html"
+)
+
+qt6_add_resources(affine "affine"
+ PREFIX
+ "/res/affine"
+ FILES
+ ${affine_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(affine PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(affine PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS affine
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt
index cee7e48052..b7d4f0a24a 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/basicdrawing")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(basicdrawing
- basicdrawing.qrc
main.cpp
renderarea.cpp renderarea.h
window.cpp window.h
)
target_link_libraries(basicdrawing PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(basicdrawing_resource_files
+ "images/brick.png"
+ "images/qt-logo.png"
+)
+
+qt6_add_resources(basicdrawing "basicdrawing"
+ PREFIX
+ "/"
+ FILES
+ ${basicdrawing_resource_files}
+)
+
install(TARGETS basicdrawing
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/composition/.prev_CMakeLists.txt b/examples/widgets/painting/composition/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c5b1d12e4a
--- /dev/null
+++ b/examples/widgets/painting/composition/.prev_CMakeLists.txt
@@ -0,0 +1,216 @@
+# Generated from composition.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(composition LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(composition
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ composition.cpp composition.h
+ main.cpp
+)
+target_include_directories(composition PUBLIC
+ ../shared
+)
+
+target_link_libraries(composition PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(composition "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(composition_resource_files
+ "composition.cpp"
+ "composition.html"
+ "flower.jpg"
+ "flower_alpha.jpg"
+)
+
+qt6_add_resources(composition "composition"
+ PREFIX
+ "/res/composition"
+ FILES
+ ${composition_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(composition PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(composition PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS composition
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index b971f32052..89e356b7ae 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -9,23 +9,205 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/composition")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(composition
# special case: remove files from ../shared
- composition.cpp composition.h composition.qrc
+ composition.cpp composition.h
main.cpp
)
target_include_directories(composition PUBLIC
../shared
)
+
target_link_libraries(composition PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(composition "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(composition_resource_files
+ "composition.cpp"
+ "composition.html"
+ "flower.jpg"
+ "flower_alpha.jpg"
+)
+
+qt6_add_resources(composition "composition"
+ PREFIX
+ "/res/composition"
+ FILES
+ ${composition_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(composition PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(composition PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS composition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt
index d01d7db607..44d907f12f 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/concentriccircles")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(concentriccircles
@@ -19,6 +21,8 @@ add_qt_gui_executable(concentriccircles
window.cpp window.h
)
target_link_libraries(concentriccircles PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/painting/deform/.prev_CMakeLists.txt b/examples/widgets/painting/deform/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..4a223487ab
--- /dev/null
+++ b/examples/widgets/painting/deform/.prev_CMakeLists.txt
@@ -0,0 +1,214 @@
+# Generated from deform.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(deform LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(deform
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ main.cpp
+ pathdeform.cpp pathdeform.h
+)
+target_include_directories(deform PUBLIC
+ ../shared
+)
+
+target_link_libraries(deform PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(deform "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(deform_resource_files
+ "pathdeform.cpp"
+ "pathdeform.html"
+)
+
+qt6_add_resources(deform "deform"
+ PREFIX
+ "/res/deform"
+ FILES
+ ${deform_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(deform PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(deform PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS deform
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index d3ce6bb06d..79c14d2196 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -9,24 +9,203 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/deform")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(deform
# special case: remove files from ../shared
- deform.qrc
main.cpp
pathdeform.cpp pathdeform.h
)
target_include_directories(deform PUBLIC
../shared
)
+
target_link_libraries(deform PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(deform "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(deform_resource_files
+ "pathdeform.cpp"
+ "pathdeform.html"
+)
+
+qt6_add_resources(deform "deform"
+ PREFIX
+ "/res/deform"
+ FILES
+ ${deform_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(deform PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(deform PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS deform
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt
index 701512198c..11ad8a3242 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/fontsampler")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(fontsampler
@@ -19,9 +21,17 @@ add_qt_gui_executable(fontsampler
mainwindowbase.ui
)
target_link_libraries(fontsampler PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(fontsampler PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS fontsampler
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/gradients/.prev_CMakeLists.txt b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f28694a96b
--- /dev/null
+++ b/examples/widgets/painting/gradients/.prev_CMakeLists.txt
@@ -0,0 +1,214 @@
+# Generated from gradients.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(gradients LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(gradients
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ gradients.cpp gradients.h
+ main.cpp
+)
+target_include_directories(gradients PUBLIC
+ ../shared
+)
+
+target_link_libraries(gradients PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(gradients "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(gradients_resource_files
+ "gradients.cpp"
+ "gradients.html"
+)
+
+qt6_add_resources(gradients "gradients"
+ PREFIX
+ "/res/gradients"
+ FILES
+ ${gradients_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(gradients PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(gradients PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
+install(TARGETS gradients
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index c0f1924e33..0b6c06e5b9 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -9,23 +9,203 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/gradients")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(gradients
# special case: remove files from ../shared
- gradients.cpp gradients.h gradients.qrc
+ gradients.cpp gradients.h
main.cpp
)
target_include_directories(gradients PUBLIC
../shared
)
+
target_link_libraries(gradients PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
painting_shared # special case
)
+
+# Resources:
+set_source_files_properties("../shared/images/button_normal_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_normal_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_normal_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_normal_stretch.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_left.png"
+)
+set_source_files_properties("../shared/images/button_pressed_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_cap_right.png"
+)
+set_source_files_properties("../shared/images/button_pressed_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/button_pressed_stretch.png"
+)
+set_source_files_properties("../shared/images/frame_bottom.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottom.png"
+)
+set_source_files_properties("../shared/images/frame_bottomleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomleft.png"
+)
+set_source_files_properties("../shared/images/frame_bottomright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_bottomright.png"
+)
+set_source_files_properties("../shared/images/frame_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_left.png"
+)
+set_source_files_properties("../shared/images/frame_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_right.png"
+)
+set_source_files_properties("../shared/images/frame_top.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_top.png"
+)
+set_source_files_properties("../shared/images/frame_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topleft.png"
+)
+set_source_files_properties("../shared/images/frame_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/frame_topright.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_left.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_right.png"
+)
+set_source_files_properties("../shared/images/groupframe_bottom_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_bottom_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_left_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_left_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_right_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_right_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_top_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_top_stretch.png"
+)
+set_source_files_properties("../shared/images/groupframe_topleft.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topleft.png"
+)
+set_source_files_properties("../shared/images/groupframe_topright.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/groupframe_topright.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot.png"
+)
+set_source_files_properties("../shared/images/line_dash_dot_dot.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dash_dot_dot.png"
+)
+set_source_files_properties("../shared/images/line_dashed.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dashed.png"
+)
+set_source_files_properties("../shared/images/line_dotted.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_dotted.png"
+)
+set_source_files_properties("../shared/images/line_solid.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/line_solid.png"
+)
+set_source_files_properties("../shared/images/radiobutton-on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton-on.png"
+)
+set_source_files_properties("../shared/images/radiobutton_off.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_off.png"
+)
+set_source_files_properties("../shared/images/radiobutton_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/radiobutton_on.png"
+)
+set_source_files_properties("../shared/images/slider_bar.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_bar.png"
+)
+set_source_files_properties("../shared/images/slider_thumb_on.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/slider_thumb_on.png"
+)
+set_source_files_properties("../shared/images/title_cap_left.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_left.png"
+)
+set_source_files_properties("../shared/images/title_cap_right.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_cap_right.png"
+)
+set_source_files_properties("../shared/images/title_stretch.png"
+ PROPERTIES QT_RESOURCE_ALIAS "images/title_stretch.png"
+)
+set(shared_resource_files
+ "images/button_normal_cap_left.png"
+ "images/button_normal_cap_right.png"
+ "images/button_normal_stretch.png"
+ "images/button_pressed_cap_left.png"
+ "images/button_pressed_cap_right.png"
+ "images/button_pressed_stretch.png"
+ "images/frame_bottom.png"
+ "images/frame_bottomleft.png"
+ "images/frame_bottomright.png"
+ "images/frame_left.png"
+ "images/frame_right.png"
+ "images/frame_top.png"
+ "images/frame_topleft.png"
+ "images/frame_topright.png"
+ "images/groupframe_bottom_left.png"
+ "images/groupframe_bottom_right.png"
+ "images/groupframe_bottom_stretch.png"
+ "images/groupframe_left_stretch.png"
+ "images/groupframe_right_stretch.png"
+ "images/groupframe_top_stretch.png"
+ "images/groupframe_topleft.png"
+ "images/groupframe_topright.png"
+ "images/line_dash_dot.png"
+ "images/line_dash_dot_dot.png"
+ "images/line_dashed.png"
+ "images/line_dotted.png"
+ "images/line_solid.png"
+ "images/radiobutton-on.png"
+ "images/radiobutton_off.png"
+ "images/radiobutton_on.png"
+ "images/slider_bar.png"
+ "images/slider_thumb_on.png"
+ "images/title_cap_left.png"
+ "images/title_cap_right.png"
+ "images/title_stretch.png"
+)
+
+qt6_add_resources(gradients "shared"
+ PREFIX
+ "/res"
+ BASE
+ "../shared"
+ FILES
+ ${shared_resource_files}
+)
+set(gradients_resource_files
+ "gradients.cpp"
+ "gradients.html"
+)
+
+qt6_add_resources(gradients "gradients"
+ PREFIX
+ "/res/gradients"
+ FILES
+ ${gradients_resource_files}
+)
+
+if(QT_FEATURE_opengl)
+ target_sources(gradients PUBLIC
+ ../shared/fbopaintdevice.cpp ../shared/fbopaintdevice.h
+ )
+
+ target_link_libraries(gradients PUBLIC
+ Qt::OpenGL
+ )
+endif()
+
install(TARGETS gradients
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt
index f6ff7eb2e5..1b3d06da8f 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -9,19 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/imagecomposition")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(imagecomposition
imagecomposer.cpp imagecomposer.h
- imagecomposition.qrc
main.cpp
)
target_link_libraries(imagecomposition PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(imagecomposition_resource_files
+ "images/butterfly.png"
+ "images/checker.png"
+)
+
+qt6_add_resources(imagecomposition "imagecomposition"
+ PREFIX
+ "/"
+ FILES
+ ${imagecomposition_resource_files}
+)
+
install(TARGETS imagecomposition
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt
index 0631f5ed01..7ae6f0a016 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/painterpaths")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(painterpaths
@@ -19,9 +21,17 @@ add_qt_gui_executable(painterpaths
window.cpp window.h
)
target_link_libraries(painterpaths PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+if(UNIX AND NOT APPLE AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS)
+ target_link_libraries(painterpaths PUBLIC
+ m
+ )
+endif()
+
install(TARGETS painterpaths
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/painting/shared/CMakeLists.txt b/examples/widgets/painting/shared/CMakeLists.txt
index 4b873962a6..4c7049e01d 100644
--- a/examples/widgets/painting/shared/CMakeLists.txt
+++ b/examples/widgets/painting/shared/CMakeLists.txt
@@ -12,9 +12,6 @@ target_sources(painting_shared PRIVATE
target_link_libraries(painting_shared PUBLIC Qt::Widgets)
target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
-qt6_add_resources(res_files shared.qrc)
-target_sources(painting_shared PRIVATE ${res_files})
-
## Scopes:
#####################################################################
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index af50385877..b5725967ea 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/painting/transformations")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(transformations
@@ -19,6 +21,8 @@ add_qt_gui_executable(transformations
window.cpp window.h
)
target_link_libraries(transformations PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt
index c09ebe5895..9cfc150a0e 100644
--- a/examples/widgets/richtext/calendar/CMakeLists.txt
+++ b/examples/widgets/richtext/calendar/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/calendar")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(calendar
@@ -18,6 +20,8 @@ add_qt_gui_executable(calendar
mainwindow.cpp mainwindow.h
)
target_link_libraries(calendar PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt
index 58dae9ee5d..fc92c60c30 100644
--- a/examples/widgets/richtext/orderform/CMakeLists.txt
+++ b/examples/widgets/richtext/orderform/CMakeLists.txt
@@ -9,10 +9,11 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/orderform")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
-find_package(Qt6 COMPONENTS PrintSupport)
add_qt_gui_executable(orderform
detailsdialog.cpp detailsdialog.h
@@ -20,10 +21,15 @@ add_qt_gui_executable(orderform
mainwindow.cpp mainwindow.h
)
target_link_libraries(orderform PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
-if (TARGET Qt::PrintSupport)
- target_link_libraries(orderform PUBLIC Qt::PrintSupport)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(orderform PUBLIC
+ Qt::PrintSupport
+ )
endif()
install(TARGETS orderform
diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
index fb06e038ec..ec98b1af4f 100644
--- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
+++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/syntaxhighlighter")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(syntaxhighlighter
@@ -19,6 +21,8 @@ add_qt_gui_executable(syntaxhighlighter
mainwindow.cpp mainwindow.h
)
target_link_libraries(syntaxhighlighter PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/richtext/textedit/.prev_CMakeLists.txt b/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..dcb2b628ef
--- /dev/null
+++ b/examples/widgets/richtext/textedit/.prev_CMakeLists.txt
@@ -0,0 +1,98 @@
+# Generated from textedit.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(textedit LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/textedit")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(textedit
+ main.cpp
+ textedit.cpp textedit.h
+)
+target_link_libraries(textedit PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+
+# Resources:
+set(textedit_resource_files
+ "example.html"
+ "images/logo32.png"
+ "images/mac/checkbox-checked.png"
+ "images/mac/checkbox.png"
+ "images/mac/editcopy.png"
+ "images/mac/editcut.png"
+ "images/mac/editpaste.png"
+ "images/mac/editredo.png"
+ "images/mac/editundo.png"
+ "images/mac/exportpdf.png"
+ "images/mac/filenew.png"
+ "images/mac/fileopen.png"
+ "images/mac/fileprint.png"
+ "images/mac/filesave.png"
+ "images/mac/format-indent-less.png"
+ "images/mac/format-indent-more.png"
+ "images/mac/textbold.png"
+ "images/mac/textcenter.png"
+ "images/mac/textitalic.png"
+ "images/mac/textjustify.png"
+ "images/mac/textleft.png"
+ "images/mac/textright.png"
+ "images/mac/textunder.png"
+ "images/mac/zoomin.png"
+ "images/mac/zoomout.png"
+ "images/win/checkbox-checked.png"
+ "images/win/checkbox.png"
+ "images/win/editcopy.png"
+ "images/win/editcut.png"
+ "images/win/editpaste.png"
+ "images/win/editredo.png"
+ "images/win/editundo.png"
+ "images/win/exportpdf.png"
+ "images/win/filenew.png"
+ "images/win/fileopen.png"
+ "images/win/fileprint.png"
+ "images/win/filesave.png"
+ "images/win/format-indent-less.png"
+ "images/win/format-indent-more.png"
+ "images/win/textbold.png"
+ "images/win/textcenter.png"
+ "images/win/textitalic.png"
+ "images/win/textjustify.png"
+ "images/win/textleft.png"
+ "images/win/textright.png"
+ "images/win/textunder.png"
+ "images/win/zoomin.png"
+ "images/win/zoomout.png"
+)
+
+qt6_add_resources(textedit "textedit"
+ PREFIX
+ "/"
+ FILES
+ ${textedit_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(textedit PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS textedit
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt
index 4e63898264..8aa4e016fe 100644
--- a/examples/widgets/richtext/textedit/CMakeLists.txt
+++ b/examples/widgets/richtext/textedit/CMakeLists.txt
@@ -9,16 +9,20 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/richtext/textedit")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
add_qt_gui_executable(textedit
main.cpp
- textedit.cpp textedit.h textedit.qrc
+ textedit.cpp textedit.h
)
target_link_libraries(textedit PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -27,6 +31,72 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+
+# Resources:
+set(textedit_resource_files
+ "example.html"
+ "images/logo32.png"
+ "images/mac/checkbox-checked.png"
+ "images/mac/checkbox.png"
+ "images/mac/editcopy.png"
+ "images/mac/editcut.png"
+ "images/mac/editpaste.png"
+ "images/mac/editredo.png"
+ "images/mac/editundo.png"
+ "images/mac/exportpdf.png"
+ "images/mac/filenew.png"
+ "images/mac/fileopen.png"
+ "images/mac/fileprint.png"
+ "images/mac/filesave.png"
+ "images/mac/format-indent-less.png"
+ "images/mac/format-indent-more.png"
+ "images/mac/textbold.png"
+ "images/mac/textcenter.png"
+ "images/mac/textitalic.png"
+ "images/mac/textjustify.png"
+ "images/mac/textleft.png"
+ "images/mac/textright.png"
+ "images/mac/textunder.png"
+ "images/mac/zoomin.png"
+ "images/mac/zoomout.png"
+ "images/win/checkbox-checked.png"
+ "images/win/checkbox.png"
+ "images/win/editcopy.png"
+ "images/win/editcut.png"
+ "images/win/editpaste.png"
+ "images/win/editredo.png"
+ "images/win/editundo.png"
+ "images/win/exportpdf.png"
+ "images/win/filenew.png"
+ "images/win/fileopen.png"
+ "images/win/fileprint.png"
+ "images/win/filesave.png"
+ "images/win/format-indent-less.png"
+ "images/win/format-indent-more.png"
+ "images/win/textbold.png"
+ "images/win/textcenter.png"
+ "images/win/textitalic.png"
+ "images/win/textjustify.png"
+ "images/win/textleft.png"
+ "images/win/textright.png"
+ "images/win/textunder.png"
+ "images/win/zoomin.png"
+ "images/win/zoomout.png"
+)
+
+qt6_add_resources(textedit "textedit"
+ PREFIX
+ "/"
+ FILES
+ ${textedit_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(textedit PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS textedit
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt
index 599d865b65..6e389956e9 100644
--- a/examples/widgets/scroller/graphicsview/CMakeLists.txt
+++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/scroller/graphicsview")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(graphicsview
main.cpp
)
target_link_libraries(graphicsview PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
index 244ee89f67..c011eb1e0f 100644
--- a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
+++ b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/eventtransitions")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(eventtransitions
main.cpp
)
target_link_libraries(eventtransitions PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/statemachine/factorial/CMakeLists.txt b/examples/widgets/statemachine/factorial/CMakeLists.txt
index 55dc15cd38..e4c5ddc92d 100644
--- a/examples/widgets/statemachine/factorial/CMakeLists.txt
+++ b/examples/widgets/statemachine/factorial/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 4104635b59..e194afb59e 100644
--- a/examples/widgets/statemachine/pingpong/CMakeLists.txt
+++ b/examples/widgets/statemachine/pingpong/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 25d69a8ce9..0142f60f63 100644
--- a/examples/widgets/statemachine/rogue/CMakeLists.txt
+++ b/examples/widgets/statemachine/rogue/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/rogue")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(rogue
@@ -19,6 +21,8 @@ add_qt_gui_executable(rogue
window.cpp window.h
)
target_link_libraries(rogue PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/statemachine/trafficlight/CMakeLists.txt b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
index c89fec5db1..4069f601ef 100644
--- a/examples/widgets/statemachine/trafficlight/CMakeLists.txt
+++ b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/trafficlight")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(trafficlight
main.cpp
)
target_link_libraries(trafficlight PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
index 8402fd2f12..05a8b87004 100644
--- a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
+++ b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/statemachine/twowaybutton")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(twowaybutton
main.cpp
)
target_link_libraries(twowaybutton PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tools/codecs/CMakeLists.txt b/examples/widgets/tools/codecs/CMakeLists.txt
index ed0a303835..7e2714fc4b 100644
--- a/examples/widgets/tools/codecs/CMakeLists.txt
+++ b/examples/widgets/tools/codecs/CMakeLists.txt
@@ -9,21 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/codecs")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(codecs
- codecs.qrc
encodingdialog.cpp encodingdialog.h
main.cpp
mainwindow.cpp mainwindow.h
previewform.cpp previewform.h
)
target_link_libraries(codecs PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(codecs_resource_files
+ "images/editcopy.png"
+)
+
+qt6_add_resources(codecs "codecs"
+ PREFIX
+ "/"
+ FILES
+ ${codecs_resource_files}
+)
+
install(TARGETS codecs
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt
index f5df74ffc8..b60d38cfdc 100644
--- a/examples/widgets/tools/completer/CMakeLists.txt
+++ b/examples/widgets/tools/completer/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/completer")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(completer
- completer.qrc
fsmodel.cpp fsmodel.h
main.cpp
mainwindow.cpp mainwindow.h
)
target_link_libraries(completer PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(completer_resource_files
+ "resources/countries.txt"
+ "resources/wordlist.txt"
+)
+
+qt6_add_resources(completer "completer"
+ PREFIX
+ "/"
+ FILES
+ ${completer_resource_files}
+)
+
install(TARGETS completer
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt
index 06b21fcf5b..a1b1deee12 100644
--- a/examples/widgets/tools/customcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/customcompleter/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/customcompleter")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(customcompleter
- customcompleter.qrc
main.cpp
mainwindow.cpp mainwindow.h
textedit.cpp textedit.h
)
target_link_libraries(customcompleter PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(customcompleter_resource_files
+ "resources/wordlist.txt"
+)
+
+qt6_add_resources(customcompleter "customcompleter"
+ PREFIX
+ "/"
+ FILES
+ ${customcompleter_resource_files}
+)
+
install(TARGETS customcompleter
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..cd116482d8
--- /dev/null
+++ b/examples/widgets/tools/echoplugin/echowindow/.prev_CMakeLists.txt
@@ -0,0 +1,33 @@
+# Generated from echowindow.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(echoplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(echoplugin
+ echointerface.h
+ echowindow.cpp echowindow.h
+ main.cpp
+)
+target_link_libraries(echoplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS echoplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 959dc7ad0a..5ca9e75073 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(echopluginwindow # special case: renamed target
@@ -18,7 +20,9 @@ add_qt_gui_executable(echopluginwindow # special case: renamed target
echowindow.cpp echowindow.h
main.cpp
)
-target_link_libraries(echopluginwindow PUBLIC # special case: renamed target
+target_link_libraries(echopluginwindow PUBLIC # special case
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tools/echoplugin/plugin/.prev_CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9f3a93b3bd
--- /dev/null
+++ b/examples/widgets/tools/echoplugin/plugin/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from plugin.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(echoplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(echoplugin MODULE
+ echoplugin.cpp echoplugin.h
+)
+target_include_directories(echoplugin PUBLIC
+ ../echowindow
+)
+
+target_link_libraries(echoplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS echoplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
index 78f5dcbe70..9f3a93b3bd 100644
--- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
@@ -1,10 +1,35 @@
-# special case begin
+# Generated from plugin.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(echoplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/echoplugin/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
add_library(echoplugin MODULE
echoplugin.cpp echoplugin.h
)
+target_include_directories(echoplugin PUBLIC
+ ../echowindow
+)
-target_include_directories(echoplugin PUBLIC ../echowindow)
-target_link_libraries(echoplugin PUBLIC Qt::Widgets)
+target_link_libraries(echoplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
-# special case end
+install(TARGETS echoplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt
index 24759b6d01..783829fe10 100644
--- a/examples/widgets/tools/i18n/CMakeLists.txt
+++ b/examples/widgets/tools/i18n/CMakeLists.txt
@@ -9,20 +9,49 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/i18n")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(i18n
- i18n.qrc
languagechooser.cpp languagechooser.h
main.cpp
mainwindow.cpp mainwindow.h
)
target_link_libraries(i18n PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(i18n_resource_files
+ "translations/i18n_ar.qm"
+ "translations/i18n_cs.qm"
+ "translations/i18n_de.qm"
+ "translations/i18n_el.qm"
+ "translations/i18n_en.qm"
+ "translations/i18n_eo.qm"
+ "translations/i18n_fr.qm"
+ "translations/i18n_it.qm"
+ "translations/i18n_jp.qm"
+ "translations/i18n_ko.qm"
+ "translations/i18n_no.qm"
+ "translations/i18n_ru.qm"
+ "translations/i18n_sv.qm"
+ "translations/i18n_zh.qm"
+)
+
+qt6_add_resources(i18n "i18n"
+ PREFIX
+ "/"
+ FILES
+ ${i18n_resource_files}
+)
+
install(TARGETS i18n
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..0a7a7155ad
--- /dev/null
+++ b/examples/widgets/tools/plugandpaint/app/.prev_CMakeLists.txt
@@ -0,0 +1,66 @@
+# Generated from app.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(plugandpaint LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(plugandpaint
+ interfaces.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ paintarea.cpp paintarea.h
+ plugindialog.cpp plugindialog.h
+)
+target_link_libraries(plugandpaint PUBLIC
+ # Remove: L../plugins
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+if(macx-xcode)
+ target_link_libraries(plugandpaint PUBLIC
+ (
+ )
+ pnp_basictools$
+ )
+endif()
+
+if(NOT macx-xcode)
+ target_link_libraries(plugandpaint PUBLIC
+ pnp_basictools
+ )
+endif()
+
+if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (APPLE))
+ target_link_libraries(plugandpaint PUBLIC
+ (LIBS, 0)
+ (LIBS, 1)
+ _debug
+ )
+endif()
+
+if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (WIN32))
+ target_link_libraries(plugandpaint PUBLIC
+ (LIBS, 0)
+ (LIBS, 1)
+ d
+ )
+endif()
+
+install(TARGETS plugandpaint
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index 8d7f931996..5548074446 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(plugandpaint
@@ -22,11 +24,43 @@ add_qt_gui_executable(plugandpaint
)
target_link_libraries(plugandpaint PUBLIC
# Remove: L../plugins
+ Qt::Core
+ Qt::Gui
Qt::Widgets
pnp_basictools # special case
)
target_link_libraries(plugandpaint PUBLIC pnp_basictools) # special case
+if(macx-xcode)
+ target_link_libraries(plugandpaint PUBLIC
+ (
+ )
+ pnp_basictools$
+ )
+endif()
+
+if(NOT macx-xcode)
+ target_link_libraries(plugandpaint PUBLIC
+ pnp_basictools
+ )
+endif()
+
+if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (APPLE))
+ target_link_libraries(plugandpaint PUBLIC
+ (LIBS, 0)
+ (LIBS, 1)
+ _debug
+ )
+endif()
+
+if(((NOT (macx-xcode)) AND (( NOT debug_and_release OR build_pass ) AND CONFIG(debug,debug OR release))) AND (WIN32))
+ target_link_libraries(plugandpaint PUBLIC
+ (LIBS, 0)
+ (LIBS, 1)
+ d
+ )
+endif()
+
install(TARGETS plugandpaint
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/.prev_CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..fefa30e2a4
--- /dev/null
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from basictools.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pnp_basictools LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(pnp_basictools MODULE
+ basictoolsplugin.cpp basictoolsplugin.h
+)
+target_include_directories(pnp_basictools PUBLIC
+ ../../app
+)
+
+target_link_libraries(pnp_basictools PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS pnp_basictools
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
index 64d239b054..fefa30e2a4 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
@@ -1,13 +1,35 @@
-# special case begin
+# Generated from basictools.pro.
-add_library(pnp_basictools MODULE STATIC
+cmake_minimum_required(VERSION 3.14)
+project(pnp_basictools LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(pnp_basictools MODULE
basictoolsplugin.cpp basictoolsplugin.h
)
-set_target_properties(pnp_basictools PROPERTIES
- LIBRARY_OUTPUT_DIRECTORY "../../plugins"
- RUNTIME_OUTPUT_DIRECTORY "../../plugins"
+target_include_directories(pnp_basictools PUBLIC
+ ../../app
+)
+
+target_link_libraries(pnp_basictools PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
)
-target_include_directories(pnp_basictools PUBLIC ../../app)
-target_link_libraries(pnp_basictools PUBLIC Qt::Widgets)
-# special case end
+install(TARGETS pnp_basictools
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/.prev_CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..2f689893bb
--- /dev/null
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/.prev_CMakeLists.txt
@@ -0,0 +1,35 @@
+# Generated from extrafilters.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(pnp_extrafilters LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(pnp_extrafilters MODULE
+ extrafiltersplugin.cpp extrafiltersplugin.h
+)
+target_include_directories(pnp_extrafilters PUBLIC
+ ../../app
+)
+
+target_link_libraries(pnp_extrafilters PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS pnp_extrafilters
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
index 31d6f5ef65..2f689893bb 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
@@ -1,9 +1,35 @@
-# special case begin
+# Generated from extrafilters.pro.
-add_library(pnp_extrafilters_plugin MODULE
+cmake_minimum_required(VERSION 3.14)
+project(pnp_extrafilters LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/plugandpaint/plugins")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(pnp_extrafilters MODULE
extrafiltersplugin.cpp extrafiltersplugin.h
)
-target_include_directories(pnp_extrafilters_plugin PRIVATE ../../app)
-target_link_libraries(pnp_extrafilters_plugin PRIVATE Qt::Widgets)
+target_include_directories(pnp_extrafilters PUBLIC
+ ../../app
+)
+
+target_link_libraries(pnp_extrafilters PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
-# special case end
+install(TARGETS pnp_extrafilters
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/regexp/CMakeLists.txt b/examples/widgets/tools/regexp/CMakeLists.txt
index 52fc49a084..7c0ca31c39 100644
--- a/examples/widgets/tools/regexp/CMakeLists.txt
+++ b/examples/widgets/tools/regexp/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/regexp")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(regexp
@@ -18,6 +20,8 @@ add_qt_gui_executable(regexp
regexpdialog.cpp regexpdialog.h
)
target_link_libraries(regexp PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt
index 6b18721801..be8fb60a44 100644
--- a/examples/widgets/tools/regularexpression/CMakeLists.txt
+++ b/examples/widgets/tools/regularexpression/CMakeLists.txt
@@ -9,19 +9,35 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/regularexpression")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(regularexpression
main.cpp
- regularexpression.qrc
regularexpressiondialog.cpp regularexpressiondialog.h
)
target_link_libraries(regularexpression PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(regularexpression_resource_files
+ "images/copy.png"
+)
+
+qt6_add_resources(regularexpression "regularexpression"
+ PREFIX
+ "/"
+ FILES
+ ${regularexpression_resource_files}
+)
+
install(TARGETS regularexpression
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt
index 28a842c493..3ded759084 100644
--- a/examples/widgets/tools/settingseditor/CMakeLists.txt
+++ b/examples/widgets/tools/settingseditor/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/settingseditor")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(settingseditor
@@ -21,6 +23,8 @@ add_qt_gui_executable(settingseditor
variantdelegate.cpp variantdelegate.h
)
target_link_libraries(settingseditor PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tools/styleplugin/plugin/.prev_CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..c1be706fde
--- /dev/null
+++ b/examples/widgets/tools/styleplugin/plugin/.prev_CMakeLists.txt
@@ -0,0 +1,32 @@
+# Generated from plugin.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(simplestyleplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/styleplugin/styles")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_library(simplestyleplugin MODULE
+ simplestyle.cpp simplestyle.h
+ simplestyleplugin.cpp simplestyleplugin.h
+)
+target_link_libraries(simplestyleplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS simplestyleplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
index 28c6ec07ab..c1be706fde 100644
--- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
@@ -1,9 +1,32 @@
-# special case begin
+# Generated from plugin.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(simplestyleplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/styleplugin/styles")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
add_library(simplestyleplugin MODULE
simplestyle.cpp simplestyle.h
simplestyleplugin.cpp simplestyleplugin.h
)
-target_link_libraries(simplestyleplugin PUBLIC Qt::Widgets)
+target_link_libraries(simplestyleplugin PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
-# special case end
+install(TARGETS simplestyleplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
index 381419a49c..06ae198b42 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/styleplugin")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(styleplugin
@@ -18,6 +20,8 @@ add_qt_gui_executable(styleplugin
stylewindow.cpp stylewindow.h
)
target_link_libraries(styleplugin PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index 367cddaaf3..71528b14b9 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -9,19 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/treemodelcompleter")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(treemodelcompleter
main.cpp
mainwindow.cpp mainwindow.h
- treemodelcompleter.cpp treemodelcompleter.h treemodelcompleter.qrc
+ treemodelcompleter.cpp treemodelcompleter.h
)
target_link_libraries(treemodelcompleter PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(treemodelcompleter_resource_files
+ "resources/treemodel.txt"
+)
+
+qt6_add_resources(treemodelcompleter "treemodelcompleter"
+ PREFIX
+ "/"
+ FILES
+ ${treemodelcompleter_resource_files}
+)
+
install(TARGETS treemodelcompleter
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt
index 94df672b96..34bcac326c 100644
--- a/examples/widgets/tools/undo/CMakeLists.txt
+++ b/examples/widgets/tools/undo/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/undo")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(undo
@@ -18,12 +20,41 @@ add_qt_gui_executable(undo
document.cpp document.h
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
- undo.qrc
)
target_link_libraries(undo PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(undo_resource_files
+ "icons/background.png"
+ "icons/blue.png"
+ "icons/circle.png"
+ "icons/exit.png"
+ "icons/fileclose.png"
+ "icons/filenew.png"
+ "icons/fileopen.png"
+ "icons/filesave.png"
+ "icons/green.png"
+ "icons/ok.png"
+ "icons/rectangle.png"
+ "icons/red.png"
+ "icons/redo.png"
+ "icons/remove.png"
+ "icons/triangle.png"
+ "icons/undo.png"
+)
+
+qt6_add_resources(undo "undo"
+ PREFIX
+ "/"
+ FILES
+ ${undo_resource_files}
+)
+
install(TARGETS undo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt
index 0ccf52e7ad..33b315d4e5 100644
--- a/examples/widgets/tools/undoframework/CMakeLists.txt
+++ b/examples/widgets/tools/undoframework/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tools/undoframework")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(undoframework
@@ -19,12 +21,26 @@ add_qt_gui_executable(undoframework
diagramscene.cpp diagramscene.h
main.cpp
mainwindow.cpp mainwindow.h
- undoframework.qrc
)
target_link_libraries(undoframework PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(undoframework_resource_files
+ "images/cross.png"
+)
+
+qt6_add_resources(undoframework "undoframework"
+ PREFIX
+ "/"
+ FILES
+ ${undoframework_resource_files}
+)
+
install(TARGETS undoframework
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt
index 638302a8ac..cad784f9ec 100644
--- a/examples/widgets/touch/dials/CMakeLists.txt
+++ b/examples/widgets/touch/dials/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/touch/dials")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(dials
@@ -18,6 +20,8 @@ add_qt_gui_executable(dials
main.cpp
)
target_link_libraries(dials PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt b/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..f66e866cab
--- /dev/null
+++ b/examples/widgets/touch/fingerpaint/.prev_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from fingerpaint.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(fingerpaint LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/touch/fingerpaint")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(fingerpaint
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ scribblearea.cpp scribblearea.h
+)
+target_link_libraries(fingerpaint PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(fingerpaint PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS fingerpaint
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt
index 25b5c706e6..cc2c8caacf 100644
--- a/examples/widgets/touch/fingerpaint/CMakeLists.txt
+++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/touch/fingerpaint")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
@@ -20,6 +22,8 @@ add_qt_gui_executable(fingerpaint
scribblearea.cpp scribblearea.h
)
target_link_libraries(fingerpaint PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -28,6 +32,12 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(fingerpaint PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS fingerpaint
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/touch/knobs/CMakeLists.txt b/examples/widgets/touch/knobs/CMakeLists.txt
index a1eacb4766..a3d44bf650 100644
--- a/examples/widgets/touch/knobs/CMakeLists.txt
+++ b/examples/widgets/touch/knobs/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/touch/knobs")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(knobs
@@ -18,6 +20,8 @@ add_qt_gui_executable(knobs
main.cpp
)
target_link_libraries(knobs PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt
index b14056ade5..08663b75af 100644
--- a/examples/widgets/touch/pinchzoom/CMakeLists.txt
+++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt
@@ -9,20 +9,36 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/touch/pinchzoom")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(pinchzoom
graphicsview.cpp graphicsview.h
main.cpp
- mice.qrc
mouse.cpp mouse.h
)
target_link_libraries(pinchzoom PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(mice_resource_files
+ "images/cheese.jpg"
+)
+
+qt6_add_resources(pinchzoom "mice"
+ PREFIX
+ "/"
+ FILES
+ ${mice_resource_files}
+)
+
install(TARGETS pinchzoom
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
index 74e9d98418..f07c38f508 100644
--- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part1")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part1
@@ -18,6 +20,8 @@ add_qt_gui_executable(part1
main.cpp
)
target_link_libraries(part1 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
index dd7c53170e..07fb93d02f 100644
--- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part2")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part2
@@ -18,6 +20,8 @@ add_qt_gui_executable(part2
main.cpp
)
target_link_libraries(part2 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
index f1923a9947..89d76cc9ee 100644
--- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part3")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part3
@@ -18,6 +20,8 @@ add_qt_gui_executable(part3
main.cpp
)
target_link_libraries(part3 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
index fd6ec7d4e7..325490517b 100644
--- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part4")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part4
@@ -18,6 +20,8 @@ add_qt_gui_executable(part4
main.cpp
)
target_link_libraries(part4 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
index 84f7bd607a..d2ac0f18d8 100644
--- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part5")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part5
@@ -19,6 +21,8 @@ add_qt_gui_executable(part5
main.cpp
)
target_link_libraries(part5 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
index 172a8157a8..a9375d8913 100644
--- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part6")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part6
@@ -19,6 +21,8 @@ add_qt_gui_executable(part6
main.cpp
)
target_link_libraries(part6 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
index f420ebeff7..16cc1391e5 100644
--- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/addressbook/part7")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part7
@@ -19,6 +21,8 @@ add_qt_gui_executable(part7
main.cpp
)
target_link_libraries(part7 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
index c47d130e3b..4cf9a49d1e 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part1")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part1
main.cpp
)
target_link_libraries(part1 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
index 024fc717d4..f5ab1d10d1 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part2")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part2
main.cpp
)
target_link_libraries(part2 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
index 886598c11f..c152c765e2 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part3")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part3
main.cpp
)
target_link_libraries(part3 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
index e4a532ca37..770d9590b7 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part4")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part4
main.cpp
)
target_link_libraries(part4 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
index 1b118f50e9..3369838e95 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/gettingStarted/gsQt/part5")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(part5
main.cpp
)
target_link_libraries(part5 PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
index 8c35a4027d..cc34842bcf 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/1_readonly")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_readonly
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_readonly
mymodel.cpp mymodel.h
)
target_link_libraries(mv_readonly PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
index 8a872c928f..7f8d68b6f8 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/2_formatting")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_formatting
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_formatting
mymodel.cpp mymodel.h
)
target_link_libraries(mv_formatting PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
index 04939138fa..aace87e2ab 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/3_changingmodel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_changingmodel
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_changingmodel
mymodel.cpp mymodel.h
)
target_link_libraries(mv_changingmodel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
index f4f9b7ae84..9d2f9cd7e8 100644
--- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/4_headers")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_headers
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_headers
mymodel.cpp mymodel.h
)
target_link_libraries(mv_headers PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
index 1f70f4a0bf..50af3c39a4 100644
--- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/5_edit")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_edit
@@ -19,6 +21,8 @@ add_qt_gui_executable(mv_edit
mymodel.cpp mymodel.h
)
target_link_libraries(mv_edit PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
index 9300b9e837..435ff71c0f 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/6_treeview")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_tree
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_tree
mainwindow.cpp mainwindow.h
)
target_link_libraries(mv_tree PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
index 0e397deadd..e0d591ab29 100644
--- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/modelview/7_selections")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mv_selections
@@ -18,6 +20,8 @@ add_qt_gui_executable(mv_selections
mainwindow.cpp mainwindow.h
)
target_link_libraries(mv_selections PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt b/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
index 6634c8c148..32df7ad615 100644
--- a/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/.prev_CMakeLists.txt
@@ -1,49 +1,66 @@
# Generated from notepad.pro.
-#####################################################################
-## notepad Binary:
-#####################################################################
-
-add_qt_executable(notepad
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/notepad"
- SOURCES
- main.cpp
- notepad.cpp notepad.h notepad.ui
- ENABLE_AUTOGEN_TOOLS
- uic
+cmake_minimum_required(VERSION 3.14)
+project(notepad LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/notepad")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+
+add_qt_gui_executable(notepad
+ main.cpp
+ notepad.cpp notepad.h notepad.ui
+)
+target_link_libraries(notepad PUBLIC
+ Qt::Core
+ Qt::Gui
)
+
# Resources:
-add_qt_resource(notepad "notepad" PREFIX "/" FILES
- images/bold.png
- images/copy.png
- images/create.png
- images/cut.png
- images/edit_redo.png
- images/edit_undo.png
- images/exit.png
- images/font.png
- images/info.png
- images/italic.png
- images/new.png
- images/open.png
- images/paste.png
- images/pencil.png
- images/print.png
- images/save.png
- images/save_as.png
- images/underline.png)
-
-
-#### Keys ignored in scope 1:.:.:notepad.pro:<TRUE>:
-# TEMPLATE = "app"
-
-## Scopes:
-#####################################################################
-
-extend_target(notepad CONDITION TARGET Qt::PrintSupport
- PUBLIC_LIBRARIES
+set(notepad_resource_files
+ "images/bold.png"
+ "images/copy.png"
+ "images/create.png"
+ "images/cut.png"
+ "images/edit_redo.png"
+ "images/edit_undo.png"
+ "images/exit.png"
+ "images/font.png"
+ "images/info.png"
+ "images/italic.png"
+ "images/new.png"
+ "images/open.png"
+ "images/paste.png"
+ "images/pencil.png"
+ "images/print.png"
+ "images/save.png"
+ "images/save_as.png"
+ "images/underline.png"
+)
+
+qt6_add_resources(notepad "notepad"
+ PREFIX
+ "/"
+ FILES
+ ${notepad_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(notepad PUBLIC
Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS notepad
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt
index 8a9b39871e..2a277efb26 100644
--- a/examples/widgets/tutorials/notepad/CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/CMakeLists.txt
@@ -3,31 +3,62 @@
cmake_minimum_required(VERSION 3.14)
project(notepad LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Widgets) # special case: add
-find_package(Qt6 COMPONENTS PrintSupport) # special case: add
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/notepad")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS PrintSupport) # special case: add
add_qt_gui_executable(notepad
main.cpp
- notepad.cpp notepad.h notepad.qrc notepad.ui
+ notepad.cpp notepad.h notepad.ui
)
-# special case begin
target_link_libraries(notepad PUBLIC
- Qt::Widgets
+ Qt::Core
+ Qt::Gui
+)
+
+
+# Resources:
+set(notepad_resource_files
+ "images/bold.png"
+ "images/copy.png"
+ "images/create.png"
+ "images/cut.png"
+ "images/edit_redo.png"
+ "images/edit_undo.png"
+ "images/exit.png"
+ "images/font.png"
+ "images/info.png"
+ "images/italic.png"
+ "images/new.png"
+ "images/open.png"
+ "images/paste.png"
+ "images/pencil.png"
+ "images/print.png"
+ "images/save.png"
+ "images/save_as.png"
+ "images/underline.png"
)
-if (TARGET Qt::PrintSupport)
+
+qt6_add_resources(notepad "notepad"
+ PREFIX
+ "/"
+ FILES
+ ${notepad_resource_files}
+)
+
+if(TARGET Qt::PrintSupport)
target_link_libraries(notepad PUBLIC
Qt::PrintSupport
)
endif()
-# special case end
install(TARGETS notepad
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
index cfbb5fe430..4119f69fd5 100644
--- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/childwidget")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(childwidget
main.cpp
)
target_link_libraries(childwidget PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
index 4bdde3b10c..75387bd9e5 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/nestedlayouts")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(nestedlayouts
main.cpp
)
target_link_libraries(nestedlayouts PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
index c9636c17b4..6d2bdb5ba5 100644
--- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/toplevel")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(toplevel
main.cpp
)
target_link_libraries(toplevel PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
index 6e247de6b6..07b50185f3 100644
--- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
@@ -9,14 +9,18 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/tutorials/widgets/windowlayout")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(windowlayout
main.cpp
)
target_link_libraries(windowlayout PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt
index 0c940d9bb5..8f7639df70 100644
--- a/examples/widgets/widgets/analogclock/CMakeLists.txt
+++ b/examples/widgets/widgets/analogclock/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/analogclock")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(analogclock
@@ -18,6 +20,8 @@ add_qt_gui_executable(analogclock
main.cpp
)
target_link_libraries(analogclock PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt
index 1f5b0a50ea..89ee6e9ccb 100644
--- a/examples/widgets/widgets/calculator/CMakeLists.txt
+++ b/examples/widgets/widgets/calculator/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/calculator")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(calculator
@@ -19,6 +21,8 @@ add_qt_gui_executable(calculator
main.cpp
)
target_link_libraries(calculator PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
index 7295b45dc5..00c1b8154a 100644
--- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt
+++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/calendarwidget")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(calendarwidget
@@ -18,6 +20,8 @@ add_qt_gui_executable(calendarwidget
window.cpp window.h
)
target_link_libraries(calendarwidget PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt
index f397213830..8ecaf5af20 100644
--- a/examples/widgets/widgets/charactermap/CMakeLists.txt
+++ b/examples/widgets/widgets/charactermap/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/charactermap")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(charactermap
@@ -19,6 +21,8 @@ add_qt_gui_executable(charactermap
mainwindow.cpp mainwindow.h
)
target_link_libraries(charactermap PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt
index 0d1f036d79..790b9bc103 100644
--- a/examples/widgets/widgets/codeeditor/CMakeLists.txt
+++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/codeeditor")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(codeeditor
@@ -18,6 +20,8 @@ add_qt_gui_executable(codeeditor
main.cpp
)
target_link_libraries(codeeditor PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt
index 50f7233004..904c53890d 100644
--- a/examples/widgets/widgets/digitalclock/CMakeLists.txt
+++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/digitalclock")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(digitalclock
@@ -18,6 +20,8 @@ add_qt_gui_executable(digitalclock
main.cpp
)
target_link_libraries(digitalclock PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
index d5ad7791fd..b9841c00f1 100644
--- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt
+++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
@@ -9,7 +9,7 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/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 74af580846..dbccf0b222 100644
--- a/examples/widgets/widgets/groupbox/CMakeLists.txt
+++ b/examples/widgets/widgets/groupbox/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/groupbox")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(groupbox
@@ -18,6 +20,8 @@ add_qt_gui_executable(groupbox
window.cpp window.h
)
target_link_libraries(groupbox PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/icons/.prev_CMakeLists.txt b/examples/widgets/widgets/icons/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..01cc94abdb
--- /dev/null
+++ b/examples/widgets/widgets/icons/.prev_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from icons.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(icons LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/icons")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(icons
+ iconpreviewarea.cpp iconpreviewarea.h
+ iconsizespinbox.cpp iconsizespinbox.h
+ imagedelegate.cpp imagedelegate.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_compile_definitions(icons PUBLIC
+ SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\"
+)
+
+target_link_libraries(icons PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+install(TARGETS icons
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt
index 607c430b8c..f154c534f9 100644
--- a/examples/widgets/widgets/icons/CMakeLists.txt
+++ b/examples/widgets/widgets/icons/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/icons")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(icons
@@ -21,11 +23,15 @@ add_qt_gui_executable(icons
mainwindow.cpp mainwindow.h
)
target_compile_definitions(icons PUBLIC
- SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}"
+ SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}" # special case
)
+
target_link_libraries(icons PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
install(TARGETS icons
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt b/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..d5911d117f
--- /dev/null
+++ b/examples/widgets/widgets/imageviewer/.prev_CMakeLists.txt
@@ -0,0 +1,38 @@
+# Generated from imageviewer.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(imageviewer LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/imageviewer")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(imageviewer
+ imageviewer.cpp imageviewer.h
+ main.cpp
+)
+target_link_libraries(imageviewer PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(imageviewer PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS imageviewer
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt
index 88f28a6dad..fefccbbd1b 100644
--- a/examples/widgets/widgets/imageviewer/CMakeLists.txt
+++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/imageviewer")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
@@ -19,6 +21,8 @@ add_qt_gui_executable(imageviewer
main.cpp
)
target_link_libraries(imageviewer PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -27,6 +31,12 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(imageviewer PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS imageviewer
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/lineedits/CMakeLists.txt b/examples/widgets/widgets/lineedits/CMakeLists.txt
index cd616c31e3..ca9393c323 100644
--- a/examples/widgets/widgets/lineedits/CMakeLists.txt
+++ b/examples/widgets/widgets/lineedits/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/lineedits")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(lineedits
@@ -18,6 +20,8 @@ add_qt_gui_executable(lineedits
window.cpp window.h
)
target_link_libraries(lineedits PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
index 103d3aa215..625e068cc0 100644
--- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt
+++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
@@ -9,9 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/mousebuttons")
find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(mousebuttons
@@ -20,6 +21,7 @@ add_qt_gui_executable(mousebuttons
)
target_link_libraries(mousebuttons PUBLIC
Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt
index 8a0d3f3d2f..140fff2cc8 100644
--- a/examples/widgets/widgets/movie/CMakeLists.txt
+++ b/examples/widgets/widgets/movie/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/movie")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(movie
@@ -18,6 +20,8 @@ add_qt_gui_executable(movie
movieplayer.cpp movieplayer.h
)
target_link_libraries(movie PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/scribble/.prev_CMakeLists.txt b/examples/widgets/widgets/scribble/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..dff1bccec7
--- /dev/null
+++ b/examples/widgets/widgets/scribble/.prev_CMakeLists.txt
@@ -0,0 +1,39 @@
+# Generated from scribble.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(scribble LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/scribble")
+
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
+find_package(Qt6 COMPONENTS Widgets)
+
+add_qt_gui_executable(scribble
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ scribblearea.cpp scribblearea.h
+)
+target_link_libraries(scribble PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
+)
+
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(scribble PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS scribble
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt
index 6032e9f58b..ca2f7b590e 100644
--- a/examples/widgets/widgets/scribble/CMakeLists.txt
+++ b/examples/widgets/widgets/scribble/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/scribble")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
find_package(Qt6 COMPONENTS PrintSupport) # special case
@@ -20,6 +22,8 @@ add_qt_gui_executable(scribble
scribblearea.cpp scribblearea.h
)
target_link_libraries(scribble PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
# special case begin
@@ -28,6 +32,12 @@ if (TARGET Qt::PrintSupport)
endif()
# special case end
+if(TARGET Qt::PrintSupport)
+ target_link_libraries(scribble PUBLIC
+ Qt::PrintSupport
+ )
+endif()
+
install(TARGETS scribble
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/shapedclock/CMakeLists.txt b/examples/widgets/widgets/shapedclock/CMakeLists.txt
index 3bc86df1d9..211c0cc432 100644
--- a/examples/widgets/widgets/shapedclock/CMakeLists.txt
+++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/shapedclock")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(shapedclock
@@ -18,6 +20,8 @@ add_qt_gui_executable(shapedclock
shapedclock.cpp shapedclock.h
)
target_link_libraries(shapedclock PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt
index b4f2cfd62b..a47ada2d48 100644
--- a/examples/widgets/widgets/sliders/CMakeLists.txt
+++ b/examples/widgets/widgets/sliders/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/sliders")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(sliders
@@ -19,6 +21,8 @@ add_qt_gui_executable(sliders
window.cpp window.h
)
target_link_libraries(sliders PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt
index e4d63153b9..050c4a8866 100644
--- a/examples/widgets/widgets/spinboxes/CMakeLists.txt
+++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/spinboxes")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(spinboxes
@@ -18,6 +20,8 @@ add_qt_gui_executable(spinboxes
window.cpp window.h
)
target_link_libraries(spinboxes PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt
index 00c0481ce7..fc48780487 100644
--- a/examples/widgets/widgets/styles/CMakeLists.txt
+++ b/examples/widgets/widgets/styles/CMakeLists.txt
@@ -9,20 +9,37 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/styles")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(styles
main.cpp
norwegianwoodstyle.cpp norwegianwoodstyle.h
- styles.qrc
widgetgallery.cpp widgetgallery.h
)
target_link_libraries(styles PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(styles_resource_files
+ "images/woodbackground.png"
+ "images/woodbutton.png"
+)
+
+qt6_add_resources(styles "styles"
+ PREFIX
+ "/"
+ FILES
+ ${styles_resource_files}
+)
+
install(TARGETS styles
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt
index 34b73c30f4..1cdf8ff8dd 100644
--- a/examples/widgets/widgets/stylesheet/CMakeLists.txt
+++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt
@@ -9,20 +9,70 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/stylesheet")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(stylesheet
main.cpp
mainwindow.cpp mainwindow.h mainwindow.ui
- stylesheet.qrc
stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui
)
target_link_libraries(stylesheet PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(stylesheet_resource_files
+ "images/checkbox_checked.png"
+ "images/checkbox_checked_hover.png"
+ "images/checkbox_checked_pressed.png"
+ "images/checkbox_unchecked.png"
+ "images/checkbox_unchecked_hover.png"
+ "images/checkbox_unchecked_pressed.png"
+ "images/down_arrow.png"
+ "images/down_arrow_disabled.png"
+ "images/frame.png"
+ "images/pagefold.png"
+ "images/pushbutton.png"
+ "images/pushbutton_hover.png"
+ "images/pushbutton_pressed.png"
+ "images/radiobutton_checked.png"
+ "images/radiobutton_checked_hover.png"
+ "images/radiobutton_checked_pressed.png"
+ "images/radiobutton_unchecked.png"
+ "images/radiobutton_unchecked_hover.png"
+ "images/radiobutton_unchecked_pressed.png"
+ "images/sizegrip.png"
+ "images/spindown.png"
+ "images/spindown_hover.png"
+ "images/spindown_off.png"
+ "images/spindown_pressed.png"
+ "images/spinup.png"
+ "images/spinup_hover.png"
+ "images/spinup_off.png"
+ "images/spinup_pressed.png"
+ "images/up_arrow.png"
+ "images/up_arrow_disabled.png"
+ "layouts/default.ui"
+ "layouts/pagefold.ui"
+ "qss/coffee.qss"
+ "qss/default.qss"
+ "qss/pagefold.qss"
+)
+
+qt6_add_resources(stylesheet "stylesheet"
+ PREFIX
+ "/"
+ FILES
+ ${stylesheet_resource_files}
+)
+
install(TARGETS stylesheet
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/tablet/CMakeLists.txt b/examples/widgets/widgets/tablet/CMakeLists.txt
index b94fa63d2d..3de5d16523 100644
--- a/examples/widgets/widgets/tablet/CMakeLists.txt
+++ b/examples/widgets/widgets/tablet/CMakeLists.txt
@@ -9,21 +9,40 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tablet")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(qttablet
- images.qrc
main.cpp
mainwindow.cpp mainwindow.h
tabletapplication.cpp tabletapplication.h
tabletcanvas.cpp tabletcanvas.h
)
target_link_libraries(qttablet PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(images_resource_files
+ "images/cursor-airbrush.png"
+ "images/cursor-eraser.png"
+ "images/cursor-felt-marker.png"
+ "images/cursor-pencil.png"
+)
+
+qt6_add_resources(qttablet "images"
+ PREFIX
+ "/"
+ FILES
+ ${images_resource_files}
+)
+
install(TARGETS qttablet
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/tetrix/CMakeLists.txt b/examples/widgets/widgets/tetrix/CMakeLists.txt
index 4a12ff602b..d36b82b90b 100644
--- a/examples/widgets/widgets/tetrix/CMakeLists.txt
+++ b/examples/widgets/widgets/tetrix/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tetrix")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(tetrix
@@ -20,6 +22,8 @@ add_qt_gui_executable(tetrix
tetrixwindow.cpp tetrixwindow.h
)
target_link_libraries(tetrix PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt
index 3e35b67ec1..9543bef5da 100644
--- a/examples/widgets/widgets/tooltips/CMakeLists.txt
+++ b/examples/widgets/widgets/tooltips/CMakeLists.txt
@@ -9,20 +9,38 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/tooltips")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(tooltips
main.cpp
shapeitem.cpp shapeitem.h
sortingbox.cpp sortingbox.h
- tooltips.qrc
)
target_link_libraries(tooltips PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(tooltips_resource_files
+ "images/circle.png"
+ "images/square.png"
+ "images/triangle.png"
+)
+
+qt6_add_resources(tooltips "tooltips"
+ PREFIX
+ "/"
+ FILES
+ ${tooltips_resource_files}
+)
+
install(TARGETS tooltips
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/validators/CMakeLists.txt b/examples/widgets/widgets/validators/CMakeLists.txt
index c4b66f0c6a..085eac4e66 100644
--- a/examples/widgets/widgets/validators/CMakeLists.txt
+++ b/examples/widgets/widgets/validators/CMakeLists.txt
@@ -9,21 +9,39 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/validators")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(validators
ledwidget.cpp ledwidget.h
localeselector.cpp localeselector.h
main.cpp
- validators.qrc validators.ui
+ validators.ui
validatorwidget.cpp validatorwidget.h
)
target_link_libraries(validators PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
+
+# Resources:
+set(validators_resource_files
+ "ledoff.png"
+ "ledon.png"
+)
+
+qt6_add_resources(validators "validators"
+ PREFIX
+ "/"
+ FILES
+ ${validators_resource_files}
+)
+
install(TARGETS validators
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/widgets/widgets/wiggly/CMakeLists.txt b/examples/widgets/widgets/wiggly/CMakeLists.txt
index e2e73665ec..3d00965a34 100644
--- a/examples/widgets/widgets/wiggly/CMakeLists.txt
+++ b/examples/widgets/widgets/wiggly/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/wiggly")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(wiggly
@@ -19,6 +21,8 @@ add_qt_gui_executable(wiggly
wigglywidget.cpp wigglywidget.h
)
target_link_libraries(wiggly PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt
index 7a1f14c90c..0c2cb2b95b 100644
--- a/examples/widgets/widgets/windowflags/CMakeLists.txt
+++ b/examples/widgets/widgets/windowflags/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/widgets/widgets/windowflags")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Widgets)
add_qt_gui_executable(windowflags
@@ -19,6 +21,8 @@ add_qt_gui_executable(windowflags
previewwindow.cpp previewwindow.h
)
target_link_libraries(windowflags PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
)
diff --git a/examples/xml/dombookmarks/CMakeLists.txt b/examples/xml/dombookmarks/CMakeLists.txt
index 7a9059393d..24d34443de 100644
--- a/examples/xml/dombookmarks/CMakeLists.txt
+++ b/examples/xml/dombookmarks/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/xml/dombookmarks")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Xml)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,9 +22,12 @@ add_qt_gui_executable(dombookmarks
xbeltree.cpp xbeltree.h
)
target_link_libraries(dombookmarks PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
Qt::Xml
)
+
install(TARGETS dombookmarks
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/xml/htmlinfo/.prev_CMakeLists.txt b/examples/xml/htmlinfo/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..77fa423eff
--- /dev/null
+++ b/examples/xml/htmlinfo/.prev_CMakeLists.txt
@@ -0,0 +1,44 @@
+# Generated from htmlinfo.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(htmlinfo LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/xml/htmlinfo")
+
+find_package(Qt6 COMPONENTS Core)
+
+add_executable(htmlinfo
+ main.cpp
+)
+target_link_libraries(htmlinfo PUBLIC
+ Qt::Core
+)
+
+
+# Resources:
+set(resources_resource_files
+ "apache_org.html"
+ "simpleexample.html"
+ "trolltech_com.html"
+ "w3c_org.html"
+ "youtube_com.html"
+)
+
+qt6_add_resources(htmlinfo "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
+install(TARGETS htmlinfo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/htmlinfo/CMakeLists.txt b/examples/xml/htmlinfo/CMakeLists.txt
index dde6e17fa0..77fa423eff 100644
--- a/examples/xml/htmlinfo/CMakeLists.txt
+++ b/examples/xml/htmlinfo/CMakeLists.txt
@@ -3,15 +3,15 @@
cmake_minimum_required(VERSION 3.14)
project(htmlinfo LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Core) # special case: add
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/xml/htmlinfo")
+
+find_package(Qt6 COMPONENTS Core)
add_executable(htmlinfo
main.cpp
@@ -19,6 +19,24 @@ add_executable(htmlinfo
target_link_libraries(htmlinfo PUBLIC
Qt::Core
)
+
+
+# Resources:
+set(resources_resource_files
+ "apache_org.html"
+ "simpleexample.html"
+ "trolltech_com.html"
+ "w3c_org.html"
+ "youtube_com.html"
+)
+
+qt6_add_resources(htmlinfo "resources"
+ PREFIX
+ "/"
+ FILES
+ ${resources_resource_files}
+)
+
install(TARGETS htmlinfo
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/xml/rsslisting/CMakeLists.txt b/examples/xml/rsslisting/CMakeLists.txt
index c2c699ac5a..96f79d2043 100644
--- a/examples/xml/rsslisting/CMakeLists.txt
+++ b/examples/xml/rsslisting/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/xml/rsslisting")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Network)
find_package(Qt6 COMPONENTS Xml)
find_package(Qt6 COMPONENTS Widgets)
@@ -20,10 +22,13 @@ add_qt_gui_executable(rsslisting
rsslisting.cpp rsslisting.h
)
target_link_libraries(rsslisting PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Network
Qt::Widgets
Qt::Xml
)
+
install(TARGETS rsslisting
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/xml/streambookmarks/CMakeLists.txt b/examples/xml/streambookmarks/CMakeLists.txt
index a7ec5dfac7..22ba383558 100644
--- a/examples/xml/streambookmarks/CMakeLists.txt
+++ b/examples/xml/streambookmarks/CMakeLists.txt
@@ -9,8 +9,10 @@ set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/xml/streambookmarks")
+find_package(Qt6 COMPONENTS Core)
+find_package(Qt6 COMPONENTS Gui)
find_package(Qt6 COMPONENTS Xml)
find_package(Qt6 COMPONENTS Widgets)
@@ -21,9 +23,12 @@ add_qt_gui_executable(streambookmarks
xbelwriter.cpp xbelwriter.h
)
target_link_libraries(streambookmarks PUBLIC
+ Qt::Core
+ Qt::Gui
Qt::Widgets
Qt::Xml
)
+
install(TARGETS streambookmarks
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/examples/xml/xmlstreamlint/.prev_CMakeLists.txt b/examples/xml/xmlstreamlint/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..bb5cad16da
--- /dev/null
+++ b/examples/xml/xmlstreamlint/.prev_CMakeLists.txt
@@ -0,0 +1,27 @@
+# Generated from xmlstreamlint.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(xmlstreamlint LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples/xml/xmlstreamlint")
+
+find_package(Qt6 COMPONENTS Core)
+
+add_executable(xmlstreamlint
+ main.cpp
+)
+target_link_libraries(xmlstreamlint PUBLIC
+ Qt::Core
+)
+
+install(TARGETS xmlstreamlint
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/xmlstreamlint/CMakeLists.txt b/examples/xml/xmlstreamlint/CMakeLists.txt
index d12b549996..b100943537 100644
--- a/examples/xml/xmlstreamlint/CMakeLists.txt
+++ b/examples/xml/xmlstreamlint/CMakeLists.txt
@@ -3,15 +3,15 @@
cmake_minimum_required(VERSION 3.14)
project(xmlstreamlint LANGUAGES CXX)
-find_package(Qt6 COMPONENTS Core Xml) # special case: add
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
-set(INSTALL_EXAMPLEDIR "examples")
+set(INSTALL_EXAMPLEDIR "examples/xml/xmlstreamlint")
+
+find_package(Qt6 COMPONENTS Core Xml) # special case
add_executable(xmlstreamlint
main.cpp
@@ -20,6 +20,7 @@ target_link_libraries(xmlstreamlint PUBLIC
Qt::Core
Qt::Xml # special case: add
)
+
install(TARGETS xmlstreamlint
RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
diff --git a/src/concurrent/CMakeLists.txt b/src/concurrent/CMakeLists.txt
index b908ef90a1..f46261f3b2 100644
--- a/src/concurrent/CMakeLists.txt
+++ b/src/concurrent/CMakeLists.txt
@@ -29,6 +29,8 @@ qt_add_module(Concurrent
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
)
diff --git a/src/corelib/CMakeLists.txt b/src/corelib/CMakeLists.txt
index ca53e47ac3..64c993fe9f 100644
--- a/src/corelib/CMakeLists.txt
+++ b/src/corelib/CMakeLists.txt
@@ -26,6 +26,10 @@ file(RELATIVE_PATH QT_INVERSE_CONFIG_INSTALL_DIR ${_clean_prefix} ${CMAKE_INSTAL
## Core Module:
#####################################################################
+# special case begin
+add_library(Core_qobject OBJECT)
+# special case end
+
qt_add_module(Core
GENERATE_METATYPES
QMAKE_MODULE_CONFIG moc resources
@@ -112,7 +116,7 @@ qt_add_module(Core
kernel/qmetatype.cpp kernel/qmetatype.h kernel/qmetatype_p.h
kernel/qmetatypeswitcher_p.h
kernel/qmimedata.cpp kernel/qmimedata.h
- # kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h # special case
+ # kernel/qobject.cpp kernel/qobject.h kernel/qobject_p.h # special case
kernel/qobject_impl.h
kernel/qobjectcleanuphandler.cpp kernel/qobjectcleanuphandler.h
kernel/qobjectdefs.h
@@ -260,6 +264,7 @@ qt_add_module(Core
QtHarfBuzz # special case
Threads::Threads # special case
WrapDoubleConversion::WrapDoubleConversion # special case
+ Core_qobject
PUBLIC_LIBRARIES # special case:
Qt::Platform # special case:
# special case begin
@@ -284,8 +289,8 @@ qt_generate_qconfig_cpp()
# Handle QObject: Automoc does not work for this as it would
# require to spill internals into users:
-add_library(Core_qobject OBJECT)
-qt_manual_moc(qobject_moc_files kernel/qobject.h global/qnamespace.h)
+set_target_properties(Core_qobject PROPERTIES AUTOMOC OFF)
+qt_manual_moc(qobject_moc_files OUTPUT_MOC_JSON_FILES core_qobject_metatypes_json_list kernel/qobject.h global/qnamespace.h)
set_source_files_properties(${qobject_moc_files} PROPERTIES HEADER_FILE_ONLY ON)
target_sources(Core_qobject PRIVATE
global/qnamespace.h
@@ -299,6 +304,16 @@ target_include_directories(Core_qobject PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/ker
target_link_libraries(Core_qobject PRIVATE Qt::Platform Qt::GlobalConfig)
target_link_libraries(Core PRIVATE Core_qobject)
+set(core_qobject_metatypes_json_args)
+if (NOT QT_WILL_INSTALL)
+ set(core_qobject_metatypes_json_args INSTALL_DIR "${QT_BUILD_DIR}/${INSTALL_LIBDIR}/metatypes")
+endif()
+
+qt6_generate_meta_types_json_file(Core_qobject
+ MANUAL_MOC_JSON_FILES ${core_qobject_metatypes_json_list}
+ ${core_qobject_metatypes_json_args}
+)
+
if(NOT BUILD_SHARED_LIBS)
install(
TARGETS Core_qobject
@@ -306,6 +321,15 @@ if(NOT BUILD_SHARED_LIBS)
)
endif()
+# Core_qobject is never exported so we need to duplicate the metatypes file
+# interface on Core
+get_target_property(core_qobject_metatypes_file_genex_build Core_qobject QT_MODULE_META_TYPES_FILE_GENEX_BUILD)
+get_target_property(core_qobject_metatypes_file_genex_install Core_qobject QT_MODULE_META_TYPES_FILE_GENEX_INSTALL)
+target_sources(Core INTERFACE
+ ${core_qobject_metatypes_file_genex_build}
+ ${core_qobject_metatypes_file_genex_install}
+)
+
set_property(TARGET Core APPEND PROPERTY
PUBLIC_HEADER "${CMAKE_CURRENT_BINARY_DIR}/global/qconfig.h")
set_property(TARGET Core APPEND PROPERTY
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake
index 446926cd73..2bc97c6d12 100644
--- a/src/corelib/Qt6CoreMacros.cmake
+++ b/src/corelib/Qt6CoreMacros.cmake
@@ -270,9 +270,16 @@ function(qt6_add_binary_resources target )
endforeach()
add_custom_command(OUTPUT ${rcc_destination}
+ DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
- DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
+ DEPENDS
+ ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
+ ${rc_depends}
+ ${out_depends}
+ ${infiles}
+ VERBATIM)
+
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
endfunction()
@@ -324,7 +331,8 @@ function(qt6_add_resources outfiles )
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
ARGS ${rcc_options} --name ${outfilename} --output ${outfile} ${infile}
MAIN_DEPENDENCY ${infile}
- DEPENDS ${_rc_depends} "${_out_depends}" VERBATIM)
+ DEPENDS ${_rc_depends} "${_out_depends}" ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
+ VERBATIM)
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOMOC ON)
set_source_files_properties(${outfile} PROPERTIES SKIP_AUTOUIC ON)
list(APPEND ${outfiles} ${outfile})
@@ -377,7 +385,8 @@ function(qt6_add_big_resources outfiles )
set_source_files_properties(${infile} PROPERTIES SKIP_AUTORCC ON)
add_custom_command(OUTPUT ${tmpoutfile}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc ${rcc_options} --name ${outfilename} --pass 1 --output ${tmpoutfile} ${infile}
- DEPENDS ${infile} ${_rc_depends} "${out_depends}" VERBATIM)
+ DEPENDS ${infile} ${_rc_depends} "${out_depends}" ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
+ VERBATIM)
add_custom_target(big_resources_${outfilename} ALL DEPENDS ${tmpoutfile})
add_library(rcc_object_${outfilename} OBJECT ${tmpoutfile})
set_target_properties(rcc_object_${outfilename} PROPERTIES AUTOMOC OFF)
@@ -388,7 +397,7 @@ function(qt6_add_big_resources outfiles )
add_custom_command(OUTPUT ${outfile}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
ARGS ${rcc_options} --name ${outfilename} --pass 2 --temp $<TARGET_OBJECTS:rcc_object_${outfilename}> --output ${outfile} ${infile}
- DEPENDS rcc_object_${outfilename}
+ DEPENDS rcc_object_${outfilename} ${QT_CMAKE_EXPORT_NAMESPACE}::rcc
VERBATIM)
list(APPEND ${outfiles} ${outfile})
endforeach()
@@ -586,110 +595,24 @@ if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
endfunction()
endif()
-# Generate metatypes dependency file. This function extracts the list of
-# metatypes files as well as the dependency file from the direct library
-# dependencies of a target via generator expressions.
-# Parameters:
-# dep_file: Location where to generate the dependency file for build time
-# dependencies.
-# dep_file_install: Location where to generate the dependency file which
-# is expected to be installed.
-function(qt6_generate_meta_types_dep_file target dep_file dep_file_install)
- # Due to generator expressions it is not possible to recursively evaluate
- # the LINK_LIBRARIES of target. Therefore we generate a dependency file for
- # every module with metatypes which can be evaluated at build time.
- # When generating this file we need to take into account that there are two
- # levels at which dependencies can be expressed: build and install.
- # Build dependencies refer to targets which are being built along side the
- # original target. These targets' install dependencies are not available
- # at this point in time. We set a special property on these targets that's
- # only available at build time.
- # Install dependencies refer to targets which are found via a find_package()
- # call.
- # Both install and build targets have the
- # INTERFACE_QT_META_TYPES_INSTALL_[DEP_FILE|FILE]. When building the target,
- # INTERFACE_QT_META_TYPES_INSTALL_... refer to the expected install
- # directory to be appended to CMAKE_INSTALL_PREFIX.
- # Only build target have the INTERFACE_QT_META_TYPES_[DEP_FILE|FILE] which
- # point to the files that have been produced during build time.
- # Finally, to make sure the targets actually have a metatypes files, we
- # check if they have the INTERFACE_QT_MODULE_HAS_META_TYPES property.
- #
- # Note: All properties start with INTERFACE_ since it is the only way to
- # set properties on interface targets that get generated in the
- # QtModuleConfig.in
- #
- get_target_property(link_dependencies ${target} LINK_LIBRARIES)
- set(prop_dep "INTERFACE_QT_META_TYPES_BUILD_DEP_FILE")
- set(prop_file "INTERFACE_QT_META_TYPES_BUILD_FILE")
- set(prop_file_install "INTERFACE_QT_META_TYPES_INSTALL_FILE")
- set(prop_dep_install "INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE")
- set(prop_is_local "INTERFACE_QT_MODULE_META_TYPES_FROM_BUILD")
- set(prop_has_metatypes "INTERFACE_QT_MODULE_HAS_META_TYPES")
-
- set(gen_exp "")
- set(gen_exp_install "")
- foreach(dep IN LISTS link_dependencies)
- # Skip over any flags starting with -, like -framework or -lboo.
- if("${dep}" MATCHES "^-")
- continue()
- endif()
- # replace LINK_ONLY with true, or we will get an error evaluating that
- # generator expression
- string(REPLACE "$<LINK_ONLY:" "$<1:" genex_target "$<GENEX_EVAL:${dep}>")
- string(REPLACE "$<TARGET_OBJECTS:" "$<1:" genex_target "${genex_target}")
- set(genex_check_is_local
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_is_local}>>"
- )
- set(genex_is_target "$<TARGET_EXISTS:$<IF:$<BOOL:${genex_target}>,${genex_target},-NOTFOUND>>")
- set(genex_has_metatypes
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_has_metatypes}>>"
- )
- set(genex_get_metatypes
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_file}>>"
- )
- set(genex_get_metatypes_dep
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_dep}>>"
- )
- set(genex_get_metatypes_install
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_file_install}>>"
- )
- set(genex_get_metatypes_install_dep
- "$<TARGET_GENEX_EVAL:${genex_target},$<TARGET_PROPERTY:${genex_target},${prop_dep_install}>>"
- )
- set(get_local_or_install
- "$<IF:$<BOOL:${genex_check_is_local}>,${genex_get_metatypes}=${genex_get_metatypes_dep},${genex_get_metatypes_install}=${genex_get_metatypes_install_dep}>"
- )
-
- list(APPEND gen_exp
- "$<$<AND:$<BOOL:${genex_target}>,$<BOOL:${genex_has_metatypes}>>:${get_local_or_install}>"
- )
- list(APPEND gen_exp_install
- "$<$<AND:$<BOOL:${genex_target}>,$<BOOL:${genex_get_metatypes_install}>>:${genex_get_metatypes_install}=${genex_get_metatypes_install_dep}>"
- )
- endforeach()
-
- file(GENERATE
- OUTPUT "${dep_file}"
- CONTENT "$<JOIN:$<GENEX_EVAL:${gen_exp}>,\n>"
- )
-
- file(GENERATE
- OUTPUT "${dep_file_install}"
- CONTENT "$<JOIN:$<GENEX_EVAL:${gen_exp_install}>,\n>"
- )
-endfunction()
-
-#
-# Generate Qt metatypes.json for a target
+# Generate Qt metatypes.json for a target. By default we check whether AUTOMOC
+# has been enabled and we extract the information from that target. Should you
+# not wish to use automoc you need to pass in all the generated json files via the
+# MANUAL_MOC_JSON_FILES parameter. The latter can be obtained by running moc with
+# the --output-json parameter.
# Params:
# INSTALL_DIR: Location where to install the metatypes file (Optional)
# COPY_OVER_INSTALL: When present will install the file via a post build step
# copy rather than using install
function(qt6_generate_meta_types_json_file target)
- cmake_parse_arguments(arg "COPY_OVER_INSTALL" "INSTALL_DIR" "" ${ARGN})
+ get_target_property(existing_meta_types_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE)
+ if (existing_meta_types_file)
+ return()
+ endif()
+
+ cmake_parse_arguments(arg "COPY_OVER_INSTALL" "INSTALL_DIR" "MANUAL_MOC_JSON_FILES" ${ARGN})
if (NOT QT_BUILDING_QT)
if (NOT arg_INSTALL_DIR)
@@ -707,56 +630,80 @@ function(qt6_generate_meta_types_json_file target)
endif()
endif()
- # Tell automoc to output json files
- set_property(TARGET "${target}" APPEND PROPERTY
- AUTOMOC_MOC_OPTIONS "--output-json"
- )
-
get_target_property(target_type ${target} TYPE)
- if (target_type STREQUAL "INTERFACE_LIBRARY" OR CMAKE_VERSION VERSION_LESS "3.16.0")
- # interface libraries not supported or cmake version is not high enough
- message(WARNING "Meta types generation requires CMake >= 3.16")
+ if (target_type STREQUAL "INTERFACE_LIBRARY")
+ message(FATAL_ERROR "Meta types generation does not work on interface libraries")
return()
endif()
- get_target_property(existing_meta_types_file ${target} INTERFACE_QT_META_TYPES_BUILD_FILE)
- if (existing_meta_types_file)
+ if (CMAKE_VERSION VERSION_LESS "3.16.0")
+ message(FATAL_ERROR "Meta types generation requires CMake >= 3.16")
return()
endif()
get_target_property(target_binary_dir ${target} BINARY_DIR)
+ set(type_list_file "${target_binary_dir}/meta_types/${target}_json_file_list.txt")
+ set(type_list_file_manual "${target_binary_dir}/meta_types/${target}_json_file_list_manual.txt")
+
+ get_target_property(uses_automoc ${target} AUTOMOC)
+ set(automoc_args)
+ set(automoc_dependencies)
+ #Handle automoc generated data
+ if (uses_automoc)
+ # Tell automoc to output json files)
+ set_property(TARGET "${target}" APPEND PROPERTY
+ AUTOMOC_MOC_OPTIONS "--output-json"
+ )
- if(CMAKE_BUILD_TYPE)
- set(cmake_autogen_cache_file
- "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache.txt")
- set(mutli_config_args
- --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include"
+ if(CMAKE_BUILD_TYPE)
+ set(cmake_autogen_cache_file
+ "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache.txt")
+ set(mutli_config_args
+ --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include"
+ )
+ else()
+ set(cmake_autogen_cache_file
+ "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache_$<CONFIG>.txt")
+ set(mutli_config_args
+ --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include_$<CONFIG>"
+ "--cmake-multi-config")
+ endif()
+
+ set(cmake_autogen_info_file
+ "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/AutogenInfo.json")
+
+ add_custom_target(${target}_automoc_json_extraction
+ DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::cmake_automoc_parser
+ BYPRODUCTS ${type_list_file}
+ COMMAND
+ ${QT_CMAKE_EXPORT_NAMESPACE}::cmake_automoc_parser
+ --cmake-autogen-cache-file "${cmake_autogen_cache_file}"
+ --cmake-autogen-info-file "${cmake_autogen_info_file}"
+ --output-file-path "${type_list_file}"
+ ${mutli_config_args}
+ COMMENT "Running Automoc file extraction"
+ COMMAND_EXPAND_LISTS
)
- else()
- set(cmake_autogen_cache_file
- "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/ParseCache_$<CONFIG>.txt")
- set(mutli_config_args
- --cmake-autogen-include-dir-path "${target_binary_dir}/${target}_autogen/include_$<CONFIG>"
- "--cmake-multi-config")
- endif()
-
- set(cmake_autogen_info_file
- "${target_binary_dir}/CMakeFiles/${target}_autogen.dir/AutogenInfo.json")
- set(type_list_file "${target_binary_dir}/meta_types/json_file_list.txt")
-
- add_custom_target(${target}_automoc_json_extraction
- BYPRODUCTS ${type_list_file}
- COMMAND
- ${QT_CMAKE_EXPORT_NAMESPACE}::cmake_automoc_parser
- --cmake-autogen-cache-file "${cmake_autogen_cache_file}"
- --cmake-autogen-info-file "${cmake_autogen_info_file}"
- --output-file-path "${type_list_file}"
- ${mutli_config_args}
- COMMENT "Running Automoc file extraction"
- COMMAND_EXPAND_LISTS
- )
+ add_dependencies(${target}_automoc_json_extraction ${target}_autogen)
+ set(automoc_args "@${type_list_file}")
+ set(automoc_dependencies "${type_list_file}")
+ endif()
+
+ set(manual_args)
+ set(manual_dependencies)
+ if(arg_MANUAL_MOC_JSON_FILES)
+ list(REMOVE_DUPLICATES arg_MANUAL_MOC_JSON_FILES)
+ file(GENERATE
+ OUTPUT ${type_list_file_manual}
+ CONTENT "$<JOIN:$<GENEX_EVAL:${arg_MANUAL_MOC_JSON_FILES}>,\n>"
+ )
+ list(APPEND manual_dependencies ${arg_MANUAL_MOC_JSON_FILES} ${type_list_file_manual})
+ set(manual_args "@${type_list_file_manual}")
+ endif()
- add_dependencies(${target}_automoc_json_extraction ${target}_autogen)
+ if (NOT manual_args AND NOT automoc_args)
+ message(FATAL_ERROR "Metatype generation requires either the use of AUTOMOC or a manual list of generated json files")
+ endif()
if (CMAKE_BUILD_TYPE)
string(TOLOWER ${target}_${CMAKE_BUILD_TYPE} target_lowercase)
@@ -766,54 +713,85 @@ function(qt6_generate_meta_types_json_file target)
set(metatypes_file_name "qt6${target_lowercase}_metatypes.json")
set(metatypes_file "${target_binary_dir}/meta_types/${metatypes_file_name}")
+ set(metatypes_file_gen "${target_binary_dir}/meta_types/${metatypes_file_name}.gen")
set(metatypes_dep_file_name "qt6${target_lowercase}_metatypes_dep.txt")
set(metatypes_dep_file "${target_binary_dir}/meta_types/${metatypes_dep_file_name}")
- add_custom_command(OUTPUT ${metatypes_file}
- DEPENDS ${type_list_file}
+ # Due to generated source file dependency rules being tied to the directory
+ # scope in which they are created it is not possible for other targets which
+ # are defined in a separate scope to see these rules. This leads to failures
+ # in locating the generated source files.
+ # To work around this we write a dummy file to disk to make sure targets
+ # which link against the current target do not produce the error. This dummy
+ # file is then replaced with the contents of the generated file during
+ # build.
+ if (NOT EXISTS ${metatypes_file})
+ file(MAKE_DIRECTORY "${target_binary_dir}/meta_types")
+ file(TOUCH ${metatypes_file})
+ endif()
+ add_custom_command(OUTPUT ${metatypes_file_gen} ${metatypes_file}
+ DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::moc ${automoc_dependencies} ${manual_dependencies}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc
- -o ${metatypes_file}
- --collect-json "@${type_list_file}"
+ -o ${metatypes_file_gen}
+ --collect-json ${automoc_args} ${manual_args}
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ ${metatypes_file_gen}
+ ${metatypes_file}
COMMENT "Runing automoc with --collect-json"
)
- target_sources(${target} PRIVATE ${metatypes_file})
+ # We still need to add this file as a source of Core, otherwise the file
+ # rule above is not triggered. INTERFACE_SOURCES do not properly register
+ # as dependencies to build the current target.
+ target_sources(${target} PRIVATE ${metatypes_file_gen})
+ set(metatypes_file_genex_build)
+ set(metatypes_file_genex_install)
+ if (arg_COPY_OVER_INSTALL)
+ set(metatypes_file_genex_build
+ "$<BUILD_INTERFACE:$<$<BOOL:$<TARGET_PROPERTY:QT_CONSUMES_METATYPES>>:${arg_INSTALL_DIR}/${metatypes_file_name}>>"
+ )
+ else()
+ set(metatypes_file_genex_build
+ "$<BUILD_INTERFACE:$<$<BOOL:$<TARGET_PROPERTY:QT_CONSUMES_METATYPES>>:${metatypes_file}>>"
+ )
+ set(metatypes_file_genex_install
+ "$<INSTALL_INTERFACE:$<$<BOOL:$<TARGET_PROPERTY:QT_CONSUMES_METATYPES>>:$<INSTALL_PREFIX>/${arg_INSTALL_DIR}/${metatypes_file_name}>>"
+ )
+ endif()
set_source_files_properties(${metatypes_file} PROPERTIES HEADER_FILE_ONLY TRUE)
- # Set the required properties. See documentation of
- # qt6_generate_meta_types_dep_file()
set_target_properties(${target} PROPERTIES
INTERFACE_QT_MODULE_HAS_META_TYPES YES
INTERFACE_QT_MODULE_META_TYPES_FROM_BUILD YES
INTERFACE_QT_META_TYPES_BUILD_FILE ${metatypes_file}
- INTERFACE_QT_META_TYPES_BUILD_DEP_FILE ${metatypes_dep_file}
- INTERFACE_QT_META_TYPES_INSTALL_FILE "${arg_INSTALL_DIR}/${metatypes_file_name}"
- INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "${arg_INSTALL_DIR}/${metatypes_dep_file_name}"
+ QT_MODULE_META_TYPES_FILE_GENEX_BUILD "${metatypes_file_genex_build}"
+ QT_MODULE_META_TYPES_FILE_GENEX_INSTALL "${metatypes_file_genex_install}"
)
-
- qt6_generate_meta_types_dep_file(${target}
- "${metatypes_dep_file}"
- "${metatypes_dep_file}.install"
- )
+ target_sources(${target} INTERFACE ${metatypes_file_genex_build} ${metatypes_file_genex_install})
if (arg_COPY_OVER_INSTALL)
- add_custom_command(TARGET ${target} POST_BUILD
+ get_target_property(target_type ${target} TYPE)
+ set(command_args
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${metatypes_file}"
"${arg_INSTALL_DIR}/${metatypes_file_name}"
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- "${metatypes_dep_file}.install"
- "${arg_INSTALL_DIR}/${metatypes_dep_file_name}"
- )
+ )
+ if (target_type STREQUAL "OBJECT_LIBRARY")
+ add_custom_target(${target}_metatypes_copy
+ DEPENDS "${metatypes_file}"
+ ${command_args}
+ )
+ add_dependencies(${target} ${target}_metatypes_copy)
+ else()
+ add_custom_command(TARGET ${target} POST_BUILD
+ ${command_args}
+ )
+ endif()
else()
install(FILES "${metatypes_file}"
DESTINATION "${arg_INSTALL_DIR}"
)
- install(FILES "${metatypes_dep_file}.install"
- DESTINATION "${arg_INSTALL_DIR}"
- RENAME "${metatypes_dep_file_name}"
- )
endif()
endfunction()
diff --git a/src/dbus/.prev_CMakeLists.txt b/src/dbus/.prev_CMakeLists.txt
index 45e1e11a25..1136ebe19b 100644
--- a/src/dbus/.prev_CMakeLists.txt
+++ b/src/dbus/.prev_CMakeLists.txt
@@ -46,6 +46,8 @@ qt_add_module(DBus
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
)
#### Keys ignored in scope 1:.:.:dbus.pro:<TRUE>:
diff --git a/src/dbus/CMakeLists.txt b/src/dbus/CMakeLists.txt
index d6b6d95798..ea1d7abaa1 100644
--- a/src/dbus/CMakeLists.txt
+++ b/src/dbus/CMakeLists.txt
@@ -46,6 +46,8 @@ qt_add_module(DBus
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
)
set_source_files_properties(qdbusmarshaller.cpp
diff --git a/src/dbus/Qt6DBusMacros.cmake b/src/dbus/Qt6DBusMacros.cmake
index 85de817a0b..d7bba30148 100644
--- a/src/dbus/Qt6DBusMacros.cmake
+++ b/src/dbus/Qt6DBusMacros.cmake
@@ -59,7 +59,9 @@ function(qt6_add_dbus_interface _sources _interface _basename)
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp ${_params} -p ${_basename} ${_infile}
- DEPENDS ${_infile} VERBATIM)
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
+ )
set_source_files_properties("${_impl}" "${_header}" PROPERTIES SKIP_AUTOMOC TRUE)
@@ -134,7 +136,8 @@ function(qt6_generate_dbus_interface _header) # _customName OPTIONS -some -optio
add_custom_command(OUTPUT ${_target}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml ${_DBUS_INTERFACE_OPTIONS} ${_in_file} -o ${_target}
- DEPENDS ${_in_file} VERBATIM
+ DEPENDS ${_in_file} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
endfunction()
@@ -168,12 +171,14 @@ function(qt6_add_dbus_adaptor _sources _xml_file _include _parentClass) # _optio
if(_optionalClassName)
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile} VERBATIM
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
else()
add_custom_command(OUTPUT "${_impl}" "${_header}"
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
- DEPENDS ${_infile} VERBATIM
+ DEPENDS ${_infile} ${QT_CMAKE_EXPORT_NAMESPACE}::qdbuscpp2xml
+ VERBATIM
)
endif()
diff --git a/src/gui/.prev_CMakeLists.txt b/src/gui/.prev_CMakeLists.txt
index 14f17d832e..3a218eb3a6 100644
--- a/src/gui/.prev_CMakeLists.txt
+++ b/src/gui/.prev_CMakeLists.txt
@@ -218,6 +218,8 @@ qt_add_module(Gui
ZLIB::ZLIB
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
PRECOMPILED_HEADER
"kernel/qt_gui_pch.h"
)
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
index c5d7c73a49..c93b43fdf2 100644
--- a/src/gui/CMakeLists.txt
+++ b/src/gui/CMakeLists.txt
@@ -262,6 +262,8 @@ qt_add_module(Gui
ZLIB::ZLIB
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
NO_PCH_SOURCES # special case
"painting/qdrawhelper.cpp" # special case
PRECOMPILED_HEADER
diff --git a/src/network/.prev_CMakeLists.txt b/src/network/.prev_CMakeLists.txt
index a26fb735db..107ef7178f 100644
--- a/src/network/.prev_CMakeLists.txt
+++ b/src/network/.prev_CMakeLists.txt
@@ -62,6 +62,8 @@ qt_add_module(Network
ZLIB::ZLIB
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
)
diff --git a/src/network/CMakeLists.txt b/src/network/CMakeLists.txt
index 7ebe37c064..7bd04d5c9f 100644
--- a/src/network/CMakeLists.txt
+++ b/src/network/CMakeLists.txt
@@ -75,6 +75,8 @@ qt_add_module(Network
ZLIB::ZLIB
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
)
diff --git a/src/opengl/.prev_CMakeLists.txt b/src/opengl/.prev_CMakeLists.txt
index fdd0ff7beb..eb125273bc 100644
--- a/src/opengl/.prev_CMakeLists.txt
+++ b/src/opengl/.prev_CMakeLists.txt
@@ -32,6 +32,9 @@ qt_add_module(OpenGL
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
)
## Scopes:
@@ -44,6 +47,8 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_widgets
Qt::WidgetsPrivate
PUBLIC_LIBRARIES
Qt::Widgets
+ PRIVATE_MODULE_INTERFACE
+ Qt::WidgetsPrivate
)
qt_extend_target(OpenGL CONDITION NOT QT_FEATURE_opengles2
diff --git a/src/opengl/CMakeLists.txt b/src/opengl/CMakeLists.txt
index fdd0ff7beb..eb125273bc 100644
--- a/src/opengl/CMakeLists.txt
+++ b/src/opengl/CMakeLists.txt
@@ -32,6 +32,9 @@ qt_add_module(OpenGL
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
)
## Scopes:
@@ -44,6 +47,8 @@ qt_extend_target(OpenGL CONDITION QT_FEATURE_widgets
Qt::WidgetsPrivate
PUBLIC_LIBRARIES
Qt::Widgets
+ PRIVATE_MODULE_INTERFACE
+ Qt::WidgetsPrivate
)
qt_extend_target(OpenGL CONDITION NOT QT_FEATURE_opengles2
diff --git a/src/platformsupport/accessibility/CMakeLists.txt b/src/platformsupport/accessibility/CMakeLists.txt
index 35c1758b86..4757b123af 100644
--- a/src/platformsupport/accessibility/CMakeLists.txt
+++ b/src/platformsupport/accessibility/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(AccessibilitySupport
qaccessiblebridgeutils.cpp qaccessiblebridgeutils_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:accessibility.pro:<TRUE>:
diff --git a/src/platformsupport/clipboard/CMakeLists.txt b/src/platformsupport/clipboard/CMakeLists.txt
index e6eb577973..52022903aa 100644
--- a/src/platformsupport/clipboard/CMakeLists.txt
+++ b/src/platformsupport/clipboard/CMakeLists.txt
@@ -11,11 +11,9 @@ qt_add_module(ClipboardSupport
qmacmime.mm qmacmime_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::CorePrivate
PUBLIC_LIBRARIES
${FWImageIO}
- Qt::Core
+ Qt::CorePrivate
Qt::Gui
)
diff --git a/src/platformsupport/devicediscovery/CMakeLists.txt b/src/platformsupport/devicediscovery/CMakeLists.txt
index 47ce31a66a..8ecabb4a1b 100644
--- a/src/platformsupport/devicediscovery/CMakeLists.txt
+++ b/src/platformsupport/devicediscovery/CMakeLists.txt
@@ -11,10 +11,8 @@ qt_add_module(DeviceDiscoverySupport
qdevicediscovery_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::CorePrivate
PUBLIC_LIBRARIES
- Qt::Core
+ Qt::CorePrivate
)
#### Keys ignored in scope 1:.:.:devicediscovery.pro:<TRUE>:
diff --git a/src/platformsupport/edid/CMakeLists.txt b/src/platformsupport/edid/CMakeLists.txt
index e27aa34335..aaea30448e 100644
--- a/src/platformsupport/edid/CMakeLists.txt
+++ b/src/platformsupport/edid/CMakeLists.txt
@@ -11,10 +11,8 @@ qt_add_module(EdidSupport
qedidparser.cpp qedidparser_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::CorePrivate
PUBLIC_LIBRARIES
- Qt::Core
+ Qt::CorePrivate
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/eglconvenience/.prev_CMakeLists.txt b/src/platformsupport/eglconvenience/.prev_CMakeLists.txt
index 2d31b07cea..f8efacd7cb 100644
--- a/src/platformsupport/eglconvenience/.prev_CMakeLists.txt
+++ b/src/platformsupport/eglconvenience/.prev_CMakeLists.txt
@@ -13,12 +13,9 @@ qt_add_module(EglSupport
qt_egl_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/eglconvenience/CMakeLists.txt b/src/platformsupport/eglconvenience/CMakeLists.txt
index 0c56acd711..b18a1470ec 100644
--- a/src/platformsupport/eglconvenience/CMakeLists.txt
+++ b/src/platformsupport/eglconvenience/CMakeLists.txt
@@ -15,13 +15,10 @@ qt_add_module(EglSupport
qt_egl_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
EGL::EGL # special case
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt b/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt
index 3a02b06bdd..2e25d6cfd6 100644
--- a/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt
+++ b/src/platformsupport/eventdispatchers/.prev_CMakeLists.txt
@@ -9,12 +9,9 @@ qt_add_module(EventDispatcherSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/eventdispatchers/CMakeLists.txt b/src/platformsupport/eventdispatchers/CMakeLists.txt
index 74ffbe5cbb..72b873423b 100644
--- a/src/platformsupport/eventdispatchers/CMakeLists.txt
+++ b/src/platformsupport/eventdispatchers/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(EventDispatcherSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/fbconvenience/CMakeLists.txt b/src/platformsupport/fbconvenience/CMakeLists.txt
index 458c169e76..804b2c15ec 100644
--- a/src/platformsupport/fbconvenience/CMakeLists.txt
+++ b/src/platformsupport/fbconvenience/CMakeLists.txt
@@ -15,12 +15,9 @@ qt_add_module(FbSupport
qfbwindow.cpp qfbwindow_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/fontdatabases/.prev_CMakeLists.txt b/src/platformsupport/fontdatabases/.prev_CMakeLists.txt
index f6ee30269d..ae7d22260c 100644
--- a/src/platformsupport/fontdatabases/.prev_CMakeLists.txt
+++ b/src/platformsupport/fontdatabases/.prev_CMakeLists.txt
@@ -9,12 +9,9 @@ qt_add_module(FontDatabaseSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
@@ -73,13 +70,12 @@ qt_extend_target(FontDatabaseSupport CONDITION WIN32 AND NOT WINRT
windows/qwindowsfontengine.cpp windows/qwindowsfontengine_p.h
windows/qwindowsnativeimage.cpp windows/qwindowsnativeimage_p.h
LIBRARIES
- Qt::GuiPrivate
advapi32
gdi32
ole32
user32
PUBLIC_LIBRARIES
- Qt::Gui
+ Qt::GuiPrivate
)
qt_extend_target(FontDatabaseSupport CONDITION QT_FEATURE_freetype AND WIN32 AND NOT WINRT
@@ -122,9 +118,8 @@ qt_extend_target(FontDatabaseSupport CONDITION WINRT
DEFINES
__WRL_NO_DEFAULT_LIB__
LIBRARIES
- Qt::GuiPrivate
dwrite_1
ws2_32
PUBLIC_LIBRARIES
- Qt::Gui
+ Qt::GuiPrivate
)
diff --git a/src/platformsupport/fontdatabases/CMakeLists.txt b/src/platformsupport/fontdatabases/CMakeLists.txt
index 271cdde5d4..dd836c1e6d 100644
--- a/src/platformsupport/fontdatabases/CMakeLists.txt
+++ b/src/platformsupport/fontdatabases/CMakeLists.txt
@@ -12,12 +12,9 @@ qt_add_module(FontDatabaseSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
@@ -76,13 +73,12 @@ qt_extend_target(FontDatabaseSupport CONDITION WIN32 AND NOT WINRT
windows/qwindowsfontengine.cpp windows/qwindowsfontengine_p.h
windows/qwindowsnativeimage.cpp windows/qwindowsnativeimage_p.h
LIBRARIES
- Qt::GuiPrivate
advapi32
gdi32
ole32
user32
PUBLIC_LIBRARIES
- Qt::Gui
+ Qt::GuiPrivate
)
qt_extend_target(FontDatabaseSupport CONDITION QT_FEATURE_freetype AND WIN32 AND NOT WINRT
@@ -125,9 +121,8 @@ qt_extend_target(FontDatabaseSupport CONDITION WINRT
DEFINES
__WRL_NO_DEFAULT_LIB__
LIBRARIES
- Qt::GuiPrivate
dwrite_1
ws2_32
PUBLIC_LIBRARIES
- Qt::Gui
+ Qt::GuiPrivate
)
diff --git a/src/platformsupport/glxconvenience/.prev_CMakeLists.txt b/src/platformsupport/glxconvenience/.prev_CMakeLists.txt
index 4e5e7378d4..f9a2fed5b2 100644
--- a/src/platformsupport/glxconvenience/.prev_CMakeLists.txt
+++ b/src/platformsupport/glxconvenience/.prev_CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(GlxSupport
qglxconvenience.cpp qglxconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
X11::XCB
)
diff --git a/src/platformsupport/glxconvenience/CMakeLists.txt b/src/platformsupport/glxconvenience/CMakeLists.txt
index 9d687f22a1..00bc78d429 100644
--- a/src/platformsupport/glxconvenience/CMakeLists.txt
+++ b/src/platformsupport/glxconvenience/CMakeLists.txt
@@ -13,13 +13,10 @@ qt_add_module(GlxSupport
qglxconvenience.cpp qglxconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
X11::X11 # special case
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:glxconvenience.pro:<TRUE>:
diff --git a/src/platformsupport/graphics/CMakeLists.txt b/src/platformsupport/graphics/CMakeLists.txt
index cbb9e0937b..e9f0245dbe 100644
--- a/src/platformsupport/graphics/CMakeLists.txt
+++ b/src/platformsupport/graphics/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(GraphicsSupport
qrasterbackingstore.cpp qrasterbackingstore_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:graphics.pro:<TRUE>:
diff --git a/src/platformsupport/input/.prev_CMakeLists.txt b/src/platformsupport/input/.prev_CMakeLists.txt
index 15ce6207f2..f8c05e9f97 100644
--- a/src/platformsupport/input/.prev_CMakeLists.txt
+++ b/src/platformsupport/input/.prev_CMakeLists.txt
@@ -9,14 +9,10 @@ qt_add_module(InputSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DeviceDiscoverySupportPrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::DeviceDiscoverySupport
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
@@ -83,10 +79,9 @@ qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput
qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput AND QT_FEATURE_xkbcommon
LIBRARIES
- Qt::XkbCommonSupportPrivate
XKB::XKB
PUBLIC_LIBRARIES
- Qt::XkbCommonSupport
+ Qt::XkbCommonSupportPrivate
)
qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev OR QT_FEATURE_libinput
diff --git a/src/platformsupport/input/CMakeLists.txt b/src/platformsupport/input/CMakeLists.txt
index d19363b6a3..7ab93df062 100644
--- a/src/platformsupport/input/CMakeLists.txt
+++ b/src/platformsupport/input/CMakeLists.txt
@@ -14,14 +14,10 @@ qt_add_module(InputSupport
INTERNAL_MODULE
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DeviceDiscoverySupportPrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::DeviceDiscoverySupport
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
@@ -88,10 +84,9 @@ qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput
qt_extend_target(InputSupport CONDITION QT_FEATURE_libinput AND QT_FEATURE_xkbcommon
LIBRARIES
- Qt::XkbCommonSupportPrivate
XKB::XKB
PUBLIC_LIBRARIES
- Qt::XkbCommonSupport
+ Qt::XkbCommonSupportPrivate
)
qt_extend_target(InputSupport CONDITION QT_FEATURE_evdev OR QT_FEATURE_libinput
diff --git a/src/platformsupport/input/xkbcommon/CMakeLists.txt b/src/platformsupport/input/xkbcommon/CMakeLists.txt
index 18d07932d4..86d132d912 100644
--- a/src/platformsupport/input/xkbcommon/CMakeLists.txt
+++ b/src/platformsupport/input/xkbcommon/CMakeLists.txt
@@ -12,12 +12,9 @@ qt_add_module(XkbCommonSupport
qxkbcommon_3rdparty.cpp
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
XKB::XKB
PRECOMPILED_HEADER
"../../../corelib/global/qt_pch.h"
diff --git a/src/platformsupport/kmsconvenience/.prev_CMakeLists.txt b/src/platformsupport/kmsconvenience/.prev_CMakeLists.txt
index 500288db57..5b0fd00566 100644
--- a/src/platformsupport/kmsconvenience/.prev_CMakeLists.txt
+++ b/src/platformsupport/kmsconvenience/.prev_CMakeLists.txt
@@ -11,13 +11,10 @@ qt_add_module(KmsSupport
qkmsdevice.cpp qkmsdevice_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
Libdrm::Libdrm
- Qt::Core
- Qt::Gui
+ Qt::CorePrivate
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:kmsconvenience.pro:<TRUE>:
diff --git a/src/platformsupport/kmsconvenience/CMakeLists.txt b/src/platformsupport/kmsconvenience/CMakeLists.txt
index 08e89f5f07..8001ee27de 100644
--- a/src/platformsupport/kmsconvenience/CMakeLists.txt
+++ b/src/platformsupport/kmsconvenience/CMakeLists.txt
@@ -13,13 +13,10 @@ qt_add_module(KmsSupport
qkmsdevice.cpp qkmsdevice_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
Libdrm::Libdrm
- Qt::Core
- Qt::Gui
+ Qt::CorePrivate
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:kmsconvenience.pro:<TRUE>:
diff --git a/src/platformsupport/linuxaccessibility/.prev_CMakeLists.txt b/src/platformsupport/linuxaccessibility/.prev_CMakeLists.txt
index 6c9b8621ab..38d3d2831f 100644
--- a/src/platformsupport/linuxaccessibility/.prev_CMakeLists.txt
+++ b/src/platformsupport/linuxaccessibility/.prev_CMakeLists.txt
@@ -27,16 +27,12 @@ qt_add_module(LinuxAccessibilitySupport
"-i" "struct_marshallers_p.h"
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::AccessibilitySupportPrivate
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
PkgConfig::ATSPI2_nolink
- Qt::AccessibilitySupport
- Qt::Core
+ Qt::AccessibilitySupportPrivate
+ Qt::CorePrivate
Qt::DBus
- Qt::Gui
+ Qt::GuiPrivate
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/linuxaccessibility/CMakeLists.txt b/src/platformsupport/linuxaccessibility/CMakeLists.txt
index 4ee93f4ca7..35bfdabf5f 100644
--- a/src/platformsupport/linuxaccessibility/CMakeLists.txt
+++ b/src/platformsupport/linuxaccessibility/CMakeLists.txt
@@ -29,16 +29,12 @@ qt_add_module(LinuxAccessibilitySupport
"-i" "struct_marshallers_p.h"
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
- Qt::AccessibilitySupportPrivate
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
PkgConfig::ATSPI2_nolink
- Qt::AccessibilitySupport
- Qt::Core
+ Qt::AccessibilitySupportPrivate
+ Qt::CorePrivate
Qt::DBus
- Qt::Gui
+ Qt::GuiPrivate
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/platformcompositor/CMakeLists.txt b/src/platformsupport/platformcompositor/CMakeLists.txt
index b8b59a2723..8acba0503f 100644
--- a/src/platformsupport/platformcompositor/CMakeLists.txt
+++ b/src/platformsupport/platformcompositor/CMakeLists.txt
@@ -12,12 +12,9 @@ qt_add_module(PlatformCompositorSupport
qopenglcompositorbackingstore.cpp qopenglcompositorbackingstore_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:platformcompositor.pro:<TRUE>:
diff --git a/src/platformsupport/services/CMakeLists.txt b/src/platformsupport/services/CMakeLists.txt
index 4744455489..602dd40305 100644
--- a/src/platformsupport/services/CMakeLists.txt
+++ b/src/platformsupport/services/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(ServiceSupport
genericunix/qgenericunixservices.cpp genericunix/qgenericunixservices_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/themes/CMakeLists.txt b/src/platformsupport/themes/CMakeLists.txt
index 1c575a8bf1..a7be78d0e0 100644
--- a/src/platformsupport/themes/CMakeLists.txt
+++ b/src/platformsupport/themes/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_module(ThemeSupport
qabstractfileiconengine.cpp qabstractfileiconengine_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:themes.pro:<TRUE>:
diff --git a/src/platformsupport/vkconvenience/.prev_CMakeLists.txt b/src/platformsupport/vkconvenience/.prev_CMakeLists.txt
index b283b6df4d..6f17cfa306 100644
--- a/src/platformsupport/vkconvenience/.prev_CMakeLists.txt
+++ b/src/platformsupport/vkconvenience/.prev_CMakeLists.txt
@@ -12,12 +12,9 @@ qt_add_module(VulkanSupport
qvkconvenience.cpp qvkconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/vkconvenience/CMakeLists.txt b/src/platformsupport/vkconvenience/CMakeLists.txt
index 521fa098ea..6ec2574375 100644
--- a/src/platformsupport/vkconvenience/CMakeLists.txt
+++ b/src/platformsupport/vkconvenience/CMakeLists.txt
@@ -14,12 +14,9 @@ qt_add_module(VulkanSupport
qvkconvenience.cpp qvkconvenience_p.h
DEFINES
QT_NO_CAST_FROM_ASCII
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
PRECOMPILED_HEADER
"../../corelib/global/qt_pch.h"
)
diff --git a/src/platformsupport/windowsuiautomation/CMakeLists.txt b/src/platformsupport/windowsuiautomation/CMakeLists.txt
index f4c29b8c3e..c610b97fd6 100644
--- a/src/platformsupport/windowsuiautomation/CMakeLists.txt
+++ b/src/platformsupport/windowsuiautomation/CMakeLists.txt
@@ -19,12 +19,9 @@ qt_add_module(WindowsUIAutomationSupport
uiapropertyids_p.h
uiaserverinterfaces_p.h
uiatypes_p.h
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
)
#### Keys ignored in scope 1:.:.:windowsuiautomation.pro:<TRUE>:
diff --git a/src/plugins/bearer/android/src/CMakeLists.txt b/src/plugins/bearer/android/src/CMakeLists.txt
index d3471f4e63..5be89e316b 100644
--- a/src/plugins/bearer/android/src/CMakeLists.txt
+++ b/src/plugins/bearer/android/src/CMakeLists.txt
@@ -13,10 +13,7 @@ qt_add_plugin(QAndroidBearerEnginePlugin
wrappers/androidconnectivitymanager.cpp wrappers/androidconnectivitymanager.h
INCLUDE_DIRECTORIES
wrappers
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::NetworkPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Network
)
diff --git a/src/plugins/bearer/connman/CMakeLists.txt b/src/plugins/bearer/connman/CMakeLists.txt
index 6e5f34f6a4..745f48b6e0 100644
--- a/src/plugins/bearer/connman/CMakeLists.txt
+++ b/src/plugins/bearer/connman/CMakeLists.txt
@@ -11,14 +11,11 @@ qt_add_plugin(QConnmanEnginePlugin
main.cpp
qconnmanengine.cpp qconnmanengine.h
qconnmanservice_linux.cpp qconnmanservice_linux_p.h
- LIBRARIES
- Qt::LinuxOfonoSupportPrivate
- Qt::NetworkPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::DBus
- Qt::LinuxOfonoSupport
- Qt::Network
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
)
#### Keys ignored in scope 1:.:.:connman.pro:<TRUE>:
diff --git a/src/plugins/bearer/corewlan/CMakeLists.txt b/src/plugins/bearer/corewlan/CMakeLists.txt
index eda3b85499..31e70cc938 100644
--- a/src/plugins/bearer/corewlan/CMakeLists.txt
+++ b/src/plugins/bearer/corewlan/CMakeLists.txt
@@ -10,14 +10,11 @@ qt_add_plugin(QCoreWlanEnginePlugin
SOURCES
main.cpp
qcorewlanengine.h qcorewlanengine.mm
- LIBRARIES
- Qt::CorePrivate
- Qt::NetworkPrivate
PUBLIC_LIBRARIES
${FWFoundation}
${FWSystemConfiguration}
- Qt::Core
- Qt::Network
+ Qt::CorePrivate
+ Qt::NetworkPrivate
)
#### Keys ignored in scope 1:.:.:corewlan.pro:<TRUE>:
diff --git a/src/plugins/bearer/generic/CMakeLists.txt b/src/plugins/bearer/generic/CMakeLists.txt
index 0717b83dd3..6d65346b57 100644
--- a/src/plugins/bearer/generic/CMakeLists.txt
+++ b/src/plugins/bearer/generic/CMakeLists.txt
@@ -11,12 +11,9 @@ qt_add_plugin(QGenericEnginePlugin
../platformdefs_win.h
main.cpp
qgenericengine.cpp qgenericengine.h
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::NetworkPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Network
)
#### Keys ignored in scope 1:.:.:generic.pro:<TRUE>:
diff --git a/src/plugins/bearer/networkmanager/CMakeLists.txt b/src/plugins/bearer/networkmanager/CMakeLists.txt
index 9c9721cca7..8f26a4c86d 100644
--- a/src/plugins/bearer/networkmanager/CMakeLists.txt
+++ b/src/plugins/bearer/networkmanager/CMakeLists.txt
@@ -11,14 +11,11 @@ qt_add_plugin(QNetworkManagerEnginePlugin
main.cpp
qnetworkmanagerengine.cpp qnetworkmanagerengine.h
qnetworkmanagerservice.cpp qnetworkmanagerservice.h
- LIBRARIES
- Qt::LinuxOfonoSupportPrivate
- Qt::NetworkPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::DBus
- Qt::LinuxOfonoSupport
- Qt::Network
+ Qt::LinuxOfonoSupportPrivate
+ Qt::NetworkPrivate
)
#### Keys ignored in scope 1:.:.:networkmanager.pro:<TRUE>:
diff --git a/src/plugins/generic/evdevkeyboard/CMakeLists.txt b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
index 735d01de40..86f5c36124 100644
--- a/src/plugins/generic/evdevkeyboard/CMakeLists.txt
+++ b/src/plugins/generic/evdevkeyboard/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QEvdevKeyboardPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:evdevkeyboard.pro:<TRUE>:
diff --git a/src/plugins/generic/evdevmouse/CMakeLists.txt b/src/plugins/generic/evdevmouse/CMakeLists.txt
index 328d815cdf..2ed6c1b6d4 100644
--- a/src/plugins/generic/evdevmouse/CMakeLists.txt
+++ b/src/plugins/generic/evdevmouse/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QEvdevMousePlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:evdevmouse.pro:<TRUE>:
diff --git a/src/plugins/generic/evdevtablet/CMakeLists.txt b/src/plugins/generic/evdevtablet/CMakeLists.txt
index e7d6fbb527..93dd10a0e1 100644
--- a/src/plugins/generic/evdevtablet/CMakeLists.txt
+++ b/src/plugins/generic/evdevtablet/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QEvdevTabletPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:evdevtablet.pro:<TRUE>:
diff --git a/src/plugins/generic/evdevtouch/CMakeLists.txt b/src/plugins/generic/evdevtouch/CMakeLists.txt
index b6c2131f33..e4a4d40c2a 100644
--- a/src/plugins/generic/evdevtouch/CMakeLists.txt
+++ b/src/plugins/generic/evdevtouch/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QEvdevTouchScreenPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:evdevtouch.pro:<TRUE>:
diff --git a/src/plugins/generic/libinput/CMakeLists.txt b/src/plugins/generic/libinput/CMakeLists.txt
index 30fa36aa85..b772623307 100644
--- a/src/plugins/generic/libinput/CMakeLists.txt
+++ b/src/plugins/generic/libinput/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QLibInputPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:libinput.pro:<TRUE>:
diff --git a/src/plugins/generic/tslib/.prev_CMakeLists.txt b/src/plugins/generic/tslib/.prev_CMakeLists.txt
index 83ca4f264b..3e82a077c3 100644
--- a/src/plugins/generic/tslib/.prev_CMakeLists.txt
+++ b/src/plugins/generic/tslib/.prev_CMakeLists.txt
@@ -9,15 +9,13 @@ qt_add_plugin(QTsLibPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
PkgConfig::Tslib
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:tslib.pro:<TRUE>:
diff --git a/src/plugins/generic/tslib/CMakeLists.txt b/src/plugins/generic/tslib/CMakeLists.txt
index 54afe0cbe7..964e322a55 100644
--- a/src/plugins/generic/tslib/CMakeLists.txt
+++ b/src/plugins/generic/tslib/CMakeLists.txt
@@ -11,15 +11,13 @@ qt_add_plugin(QTsLibPlugin
TYPE generic
SOURCES
main.cpp
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
PkgConfig::Tslib
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::InputSupport
+ Qt::GuiPrivate
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 1:.:.:tslib.pro:<TRUE>:
diff --git a/src/plugins/generic/tuiotouch/CMakeLists.txt b/src/plugins/generic/tuiotouch/CMakeLists.txt
index d17b6dae3a..82db49d4c3 100644
--- a/src/plugins/generic/tuiotouch/CMakeLists.txt
+++ b/src/plugins/generic/tuiotouch/CMakeLists.txt
@@ -16,12 +16,11 @@ qt_add_plugin(QTuioTouchPlugin
qtuiotoken_p.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
Qt::Network
)
diff --git a/src/plugins/imageformats/ico/CMakeLists.txt b/src/plugins/imageformats/ico/CMakeLists.txt
index 6151d6fd07..1174848d5e 100644
--- a/src/plugins/imageformats/ico/CMakeLists.txt
+++ b/src/plugins/imageformats/ico/CMakeLists.txt
@@ -10,10 +10,9 @@ qt_add_plugin(QICOPlugin
SOURCES
main.cpp main.h
qicohandler.cpp qicohandler.h
- LIBRARIES
- Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
)
diff --git a/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt b/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt
index 8a470e3e01..25b5861122 100644
--- a/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt
+++ b/src/plugins/imageformats/jpeg/.prev_CMakeLists.txt
@@ -10,13 +10,12 @@ qt_add_plugin(QJpegPlugin
SOURCES
main.cpp main.h
qjpeghandler.cpp qjpeghandler_p.h
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
JPEG::JPEG
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
diff --git a/src/plugins/imageformats/jpeg/CMakeLists.txt b/src/plugins/imageformats/jpeg/CMakeLists.txt
index 18ebf12d65..6aaa6538ec 100644
--- a/src/plugins/imageformats/jpeg/CMakeLists.txt
+++ b/src/plugins/imageformats/jpeg/CMakeLists.txt
@@ -12,13 +12,12 @@ qt_add_plugin(QJpegPlugin
SOURCES
main.cpp main.h
qjpeghandler.cpp qjpeghandler_p.h
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
JPEG::JPEG
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:jpeg.pro:<TRUE>:
diff --git a/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt b/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt
index f553093fc5..ff09314303 100644
--- a/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt
+++ b/src/plugins/platforminputcontexts/compose/.prev_CMakeLists.txt
@@ -11,12 +11,12 @@ qt_add_plugin(QComposePlatformInputContextPlugin
qcomposeplatforminputcontext.cpp qcomposeplatforminputcontext.h
qcomposeplatforminputcontextmain.cpp
LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
XKB::XKB
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:compose.pro:<TRUE>:
diff --git a/src/plugins/platforminputcontexts/compose/CMakeLists.txt b/src/plugins/platforminputcontexts/compose/CMakeLists.txt
index 21e33432f6..fe4e3b8b80 100644
--- a/src/plugins/platforminputcontexts/compose/CMakeLists.txt
+++ b/src/plugins/platforminputcontexts/compose/CMakeLists.txt
@@ -13,12 +13,12 @@ qt_add_plugin(QComposePlatformInputContextPlugin
qcomposeplatforminputcontext.cpp qcomposeplatforminputcontext.h
qcomposeplatforminputcontextmain.cpp
LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
XKB::XKB
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:compose.pro:<TRUE>:
diff --git a/src/plugins/platforminputcontexts/ibus/CMakeLists.txt b/src/plugins/platforminputcontexts/ibus/CMakeLists.txt
index a7e3156c9d..1017407342 100644
--- a/src/plugins/platforminputcontexts/ibus/CMakeLists.txt
+++ b/src/plugins/platforminputcontexts/ibus/CMakeLists.txt
@@ -14,14 +14,12 @@ qt_add_plugin(QIbusPlatformInputContextPlugin
qibusproxy.cpp qibusproxy.h
qibusproxyportal.cpp qibusproxyportal.h
qibustypes.cpp qibustypes.h
- LIBRARIES
- Qt::GuiPrivate
- Qt::XkbCommonSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::DBus
Qt::Gui
- Qt::XkbCommonSupport
+ Qt::GuiPrivate
+ Qt::XkbCommonSupportPrivate
)
#### Keys ignored in scope 1:.:.:ibus.pro:<TRUE>:
diff --git a/src/plugins/platforms/android/.prev_CMakeLists.txt b/src/plugins/platforms/android/.prev_CMakeLists.txt
index 047abff880..4cb966004e 100644
--- a/src/plugins/platforms/android/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/android/.prev_CMakeLists.txt
@@ -42,20 +42,15 @@ qt_add_plugin(QAndroidIntegrationPlugin
INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${QT_SOURCE_TREE}/src/3rdparty/android
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::AccessibilitySupportPrivate
+ Qt::Core
Qt::CorePrivate
Qt::EglSupportPrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
- Qt::Core
- Qt::EglSupport
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
android
jnigraphics
)
@@ -70,10 +65,8 @@ qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qandroidplatformvulkaninstance.cpp qandroidplatformvulkaninstance.h
qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_android_style_assets
diff --git a/src/plugins/platforms/android/CMakeLists.txt b/src/plugins/platforms/android/CMakeLists.txt
index d66fb239d7..970c0de870 100644
--- a/src/plugins/platforms/android/CMakeLists.txt
+++ b/src/plugins/platforms/android/CMakeLists.txt
@@ -43,20 +43,15 @@ qt_add_plugin(QAndroidIntegrationPlugin
INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
${QT_SOURCE_TREE}/src/3rdparty/android
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::AccessibilitySupportPrivate
+ Qt::Core
Qt::CorePrivate
Qt::EglSupportPrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
- Qt::Core
- Qt::EglSupport
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
android
jnigraphics
# special case begin
@@ -79,10 +74,8 @@ qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qandroidplatformvulkaninstance.cpp qandroidplatformvulkaninstance.h
qandroidplatformvulkanwindow.cpp qandroidplatformvulkanwindow.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(QAndroidIntegrationPlugin CONDITION QT_FEATURE_android_style_assets
diff --git a/src/plugins/platforms/cocoa/.prev_CMakeLists.txt b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
index d557a510d7..27cace4eb9 100644
--- a/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/cocoa/.prev_CMakeLists.txt
@@ -41,13 +41,6 @@ qt_add_plugin(QCocoaIntegrationPlugin
qnsview.h qnsview.mm
qnswindow.h qnswindow.mm
qnswindowdelegate.h qnswindowdelegate.mm
- LIBRARIES
- Qt::ClipboardSupportPrivate
- Qt::CorePrivate
- Qt::FontDatabaseSupportPrivate
- Qt::GraphicsSupportPrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
PUBLIC_LIBRARIES
${FWAppKit}
${FWCarbon}
@@ -58,12 +51,14 @@ qt_add_plugin(QCocoaIntegrationPlugin
${FWMetal}
${FWQuartzCore}
Cups::Cups
- Qt::ClipboardSupport
+ Qt::ClipboardSupportPrivate
Qt::Core
- Qt::FontDatabaseSupport
- Qt::GraphicsSupport
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
)
# Resources:
@@ -95,20 +90,16 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qcocoavulkaninstance.h qcocoavulkaninstance.mm
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_accessibility
SOURCES
qcocoaaccessibility.h qcocoaaccessibility.mm
qcocoaaccessibilityelement.h qcocoaaccessibilityelement.mm
- LIBRARIES
- Qt::AccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
+ Qt::AccessibilitySupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
@@ -119,10 +110,8 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
SOURCES
qpaintengine_mac.mm qpaintengine_mac_p.h
- LIBRARIES
- Qt::WidgetsPrivate
PUBLIC_LIBRARIES
- Qt::Widgets
+ Qt::WidgetsPrivate
)
#### Keys ignored in scope 7:.:.:cocoa.pro:TARGET Qt::Widgets:
@@ -133,10 +122,8 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND T
qcocoaprintdevice.h qcocoaprintdevice.mm
qcocoaprintersupport.h qcocoaprintersupport.mm
qprintengine_mac.mm qprintengine_mac_p.h
- LIBRARIES
- Qt::PrintSupportPrivate
PUBLIC_LIBRARIES
- Qt::PrintSupport
+ Qt::PrintSupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
diff --git a/src/plugins/platforms/cocoa/CMakeLists.txt b/src/plugins/platforms/cocoa/CMakeLists.txt
index 7ed2a8ffdb..27b646d293 100644
--- a/src/plugins/platforms/cocoa/CMakeLists.txt
+++ b/src/plugins/platforms/cocoa/CMakeLists.txt
@@ -45,13 +45,6 @@ qt_add_plugin(QCocoaIntegrationPlugin
qnsview.h qnsview.mm
qnswindow.h qnswindow.mm
qnswindowdelegate.h qnswindowdelegate.mm
- LIBRARIES
- Qt::ClipboardSupportPrivate
- Qt::CorePrivate
- Qt::FontDatabaseSupportPrivate
- Qt::GraphicsSupportPrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
PUBLIC_LIBRARIES
${FWAppKit}
${FWCarbon}
@@ -62,12 +55,14 @@ qt_add_plugin(QCocoaIntegrationPlugin
${FWMetal}
${FWQuartzCore}
Cups::Cups
- Qt::ClipboardSupport
+ Qt::ClipboardSupportPrivate
Qt::Core
- Qt::FontDatabaseSupport
- Qt::GraphicsSupport
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
)
# Resources:
@@ -99,20 +94,16 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_opengl
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qcocoavulkaninstance.h qcocoavulkaninstance.mm
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_accessibility
SOURCES
qcocoaaccessibility.h qcocoaaccessibility.mm
qcocoaaccessibilityelement.h qcocoaaccessibilityelement.mm
- LIBRARIES
- Qt::AccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
+ Qt::AccessibilitySupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
@@ -123,10 +114,8 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_sessionmanager
qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::Widgets
SOURCES
qpaintengine_mac.mm qpaintengine_mac_p.h
- LIBRARIES
- Qt::WidgetsPrivate
PUBLIC_LIBRARIES
- Qt::Widgets
+ Qt::WidgetsPrivate
)
#### Keys ignored in scope 7:.:.:cocoa.pro:TARGET Qt::Widgets:
@@ -137,10 +126,8 @@ qt_extend_target(QCocoaIntegrationPlugin CONDITION TARGET Qt::PrintSupport AND T
qcocoaprintdevice.h qcocoaprintdevice.mm
qcocoaprintersupport.h qcocoaprintersupport.mm
qprintengine_mac.mm qprintengine_mac_p.h
- LIBRARIES
- Qt::PrintSupportPrivate
PUBLIC_LIBRARIES
- Qt::PrintSupport
+ Qt::PrintSupportPrivate
)
qt_extend_target(QCocoaIntegrationPlugin CONDITION QT_FEATURE_colordialog AND TARGET Qt::Widgets
diff --git a/src/plugins/platforms/directfb/.prev_CMakeLists.txt b/src/plugins/platforms/directfb/.prev_CMakeLists.txt
index b16e7cb9bd..33beaa3da4 100644
--- a/src/plugins/platforms/directfb/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/directfb/.prev_CMakeLists.txt
@@ -18,19 +18,15 @@ qt_add_plugin(QDirectFbIntegrationPlugin
qdirectfbintegration.cpp qdirectfbintegration.h
qdirectfbscreen.cpp qdirectfbscreen.h
qdirectfbwindow.cpp qdirectfbwindow.h
- LIBRARIES
+ PUBLIC_LIBRARIES
+ PkgConfig::DirectFB
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::ServiceSupportPrivate
- PUBLIC_LIBRARIES
- PkgConfig::DirectFB
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
)
#### Keys ignored in scope 1:.:.:directfb.pro:<TRUE>:
@@ -44,10 +40,8 @@ qt_extend_target(QDirectFbIntegrationPlugin CONDITION QT_CONFIG___contains___dir
qdirectfb_egl.cpp qdirectfb_egl.h
DEFINES
DIRECTFB_GL_EGL
- LIBRARIES
- Qt::EglSupportPrivate
PUBLIC_LIBRARIES
- Qt::EglSupport
+ Qt::EglSupportPrivate
)
qt_extend_target(QDirectFbIntegrationPlugin CONDITION NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
diff --git a/src/plugins/platforms/directfb/CMakeLists.txt b/src/plugins/platforms/directfb/CMakeLists.txt
index b696943257..c723ca75f4 100644
--- a/src/plugins/platforms/directfb/CMakeLists.txt
+++ b/src/plugins/platforms/directfb/CMakeLists.txt
@@ -22,19 +22,15 @@ qt_add_plugin(QDirectFbIntegrationPlugin
qdirectfbintegration.cpp qdirectfbintegration.h
qdirectfbscreen.cpp qdirectfbscreen.h
qdirectfbwindow.cpp qdirectfbwindow.h
- LIBRARIES
+ PUBLIC_LIBRARIES
+ PkgConfig::DirectFB
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::ServiceSupportPrivate
- PUBLIC_LIBRARIES
- PkgConfig::DirectFB
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
)
#### Keys ignored in scope 1:.:.:directfb.pro:<TRUE>:
@@ -48,10 +44,8 @@ qt_extend_target(QDirectFbIntegrationPlugin CONDITION QT_CONFIG___contains___dir
qdirectfb_egl.cpp qdirectfb_egl.h
DEFINES
DIRECTFB_GL_EGL
- LIBRARIES
- Qt::EglSupportPrivate
PUBLIC_LIBRARIES
- Qt::EglSupport
+ Qt::EglSupportPrivate
)
qt_extend_target(QDirectFbIntegrationPlugin CONDITION NOT DIRECTFB_PLATFORM_HOOKS_SOURCES_ISEMPTY
diff --git a/src/plugins/platforms/eglfs/.prev_CMakeLists.txt b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt
index 6f3309ea3c..4fed525392 100644
--- a/src/plugins/platforms/eglfs/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/.prev_CMakeLists.txt
@@ -19,7 +19,7 @@ qt_add_module(EglFSDeviceIntegration
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
api
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DeviceDiscoverySupportPrivate
Qt::EglSupportPrivate
@@ -29,16 +29,6 @@ qt_add_module(EglFSDeviceIntegration
Qt::GuiPrivate
Qt::ServiceSupportPrivate
Qt::ThemeSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::DeviceDiscoverySupport
- Qt::EglSupport
- Qt::EventDispatcherSupport
- Qt::FbSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
- Qt::ThemeSupport
)
#### Keys ignored in scope 2:.:.:eglfsdeviceintegration.pro:<TRUE>:
@@ -48,17 +38,21 @@ qt_add_module(EglFSDeviceIntegration
#####################################################################
qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
+ SOURCES
+ api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
+ api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
PUBLIC_LIBRARIES
- Qt::PlatformCompositorSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(EglFSDeviceIntegration CONDITION NOT EGLFS_PLATFORM_HOOKS_SOURCES_ISEMPTY
@@ -92,30 +86,28 @@ qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
api/qeglfscursor.cpp api/qeglfscursor_p.h
)
#####################################################################
-## qeglfs Plugin:
+## QEglFSIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(qeglfs
+qt_add_plugin(QEglFSIntegrationPlugin
+ OUTPUT_NAME qeglfs
TYPE platforms
- CLASS_NAME QEglFSIntegrationPlugin
SOURCES
qeglfsmain.cpp
DEFINES
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
api
- LIBRARIES
- Qt::EglFSDeviceIntegrationPrivate
PUBLIC_LIBRARIES
- Qt::EglFSDeviceIntegration
+ Qt::EglFSDeviceIntegrationPrivate
)
-#### Keys ignored in scope 11:.:.:eglfs-plugin.pro:<TRUE>:
+#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:<TRUE>:
# OTHER_FILES = "$$PWD/eglfs.json"
## Scopes:
#####################################################################
-#### Keys ignored in scope 12:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 14:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
add_subdirectory(deviceintegration)
diff --git a/src/plugins/platforms/eglfs/CMakeLists.txt b/src/plugins/platforms/eglfs/CMakeLists.txt
index 01949586bc..03de79d6f0 100644
--- a/src/plugins/platforms/eglfs/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/CMakeLists.txt
@@ -20,7 +20,7 @@ qt_add_module(EglFSDeviceIntegration
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
api
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DeviceDiscoverySupportPrivate
Qt::EglSupportPrivate
@@ -40,17 +40,21 @@ qt_add_module(EglFSDeviceIntegration
#####################################################################
qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
qt_extend_target(EglFSDeviceIntegration CONDITION TARGET Qt::PlatformCompositorSupportPrivate
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::PlatformCompositorSupportPrivate
+)
+
+qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_vulkan
+ SOURCES
+ api/vulkan/qeglfsvulkaninstance.cpp api/vulkan/qeglfsvulkaninstance_p.h
+ api/vulkan/qeglfsvulkanwindow.cpp api/vulkan/qeglfsvulkanwindow_p.h
PUBLIC_LIBRARIES
- Qt::PlatformCompositorSupport
+ Qt::VulkanSupportPrivate
)
# special case:
@@ -78,12 +82,12 @@ qt_extend_target(EglFSDeviceIntegration CONDITION QT_FEATURE_opengl
api/qeglfscursor.cpp api/qeglfscursor_p.h
)
#####################################################################
-## qeglfs Plugin:
+## QEglFSIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(qeglfs
+qt_add_plugin(QEglFSIntegrationPlugin
+ OUTPUT_NAME qeglfs
TYPE platforms
- CLASS_NAME QEglFSIntegrationPlugin
DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES eglfs # special case
SOURCES
qeglfsmain.cpp
@@ -91,18 +95,18 @@ qt_add_plugin(qeglfs
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
api
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate # special case
Qt::EglFSDeviceIntegrationPrivate
EGL::EGL # special case
)
-#### Keys ignored in scope 11:.:.:eglfs-plugin.pro:<TRUE>:
+#### Keys ignored in scope 13:.:.:eglfs-plugin.pro:<TRUE>:
# OTHER_FILES = "$$PWD/eglfs.json"
## Scopes:
#####################################################################
-#### Keys ignored in scope 12:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
+#### Keys ignored in scope 14:.:.:eglfs-plugin.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
# PLUGIN_EXTENDS = "-"
add_subdirectory(deviceintegration)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt
index fa6623ee50..a62b8bbb2b 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_emu/CMakeLists.txt
@@ -15,14 +15,12 @@ qt_add_plugin(QEglFSEmulatorIntegrationPlugin
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
../../api
- LIBRARIES
- Qt::CorePrivate
- Qt::EglFSDeviceIntegrationPrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
Qt::Core
- Qt::EglFSDeviceIntegration
+ Qt::CorePrivate
+ Qt::EglFSDeviceIntegrationPrivate
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:eglfs_emu.pro:<TRUE>:
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt
index d2a2b9699d..55a1d71c07 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/CMakeLists.txt
@@ -19,21 +19,16 @@ qt_add_plugin(QEglFSKmsGbmIntegrationPlugin
INCLUDE_DIRECTORIES
../../api
../eglfs_kms_support
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
Qt::CorePrivate
Qt::EdidSupportPrivate
Qt::EglFSDeviceIntegrationPrivate
Qt::EglFsKmsSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::KmsSupportPrivate
- PUBLIC_LIBRARIES
- Libdrm::Libdrm
- Qt::Core
- Qt::EdidSupport
- Qt::EglFSDeviceIntegration
- Qt::EglFsKmsSupport
- Qt::Gui
- Qt::KmsSupport
gbm::gbm
)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt
index 63335ced92..a0b405c90c 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/CMakeLists.txt
@@ -17,21 +17,16 @@ qt_add_plugin(QEglFSKmsEglDeviceIntegrationPlugin
INCLUDE_DIRECTORIES
../../api
../eglfs_kms_support
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
Qt::CorePrivate
Qt::EdidSupportPrivate
Qt::EglFSDeviceIntegrationPrivate
Qt::EglFsKmsSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::KmsSupportPrivate
- PUBLIC_LIBRARIES
- Libdrm::Libdrm
- Qt::Core
- Qt::EdidSupport
- Qt::EglFSDeviceIntegration
- Qt::EglFsKmsSupport
- Qt::Gui
- Qt::KmsSupport
)
#### Keys ignored in scope 1:.:.:eglfs_kms_egldevice.pro:<TRUE>:
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt
index 51b3327345..abaad3930d 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/CMakeLists.txt
@@ -17,17 +17,13 @@ qt_add_module(EglFsKmsSupport
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
../../api
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Libdrm::Libdrm
+ Qt::Core
Qt::CorePrivate
Qt::EdidSupportPrivate
Qt::EglFSDeviceIntegrationPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::KmsSupportPrivate
- PUBLIC_LIBRARIES
- Libdrm::Libdrm
- Qt::Core
- Qt::EdidSupport
- Qt::EglFSDeviceIntegration
- Qt::Gui
- Qt::KmsSupport
)
diff --git a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
index cad49366c8..29dcd0dab7 100644
--- a/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
+++ b/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/CMakeLists.txt
@@ -14,14 +14,12 @@ qt_add_plugin(QEglFSX11IntegrationPlugin
QT_EGL_NO_X11
INCLUDE_DIRECTORIES
../../api
- LIBRARIES
- Qt::CorePrivate
- Qt::EglFSDeviceIntegrationPrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
Qt::Core
- Qt::EglFSDeviceIntegration
+ Qt::CorePrivate
+ Qt::EglFSDeviceIntegrationPrivate
Qt::Gui
+ Qt::GuiPrivate
X11::XCB
XCB::XCB
)
diff --git a/src/plugins/platforms/ios/CMakeLists.txt b/src/plugins/platforms/ios/CMakeLists.txt
index 4c9cac2bee..d8912866b0 100644
--- a/src/plugins/platforms/ios/CMakeLists.txt
+++ b/src/plugins/platforms/ios/CMakeLists.txt
@@ -1,12 +1,12 @@
# Generated from ios.pro.
#####################################################################
-## qios Plugin:
+## QIOSIntegrationPlugin Plugin:
#####################################################################
-add_qt_plugin(qios
+add_qt_plugin(QIOSIntegrationPlugin
+ OUTPUT_NAME qios
TYPE platforms
- CLASS_NAME QIOSIntegrationPlugin
SOURCES
plugin.mm
qiosapplicationdelegate.h qiosapplicationdelegate.mm
@@ -26,37 +26,25 @@ add_qt_plugin(qios
qioswindow.h qioswindow.mm
quiaccessibilityelement.h quiaccessibilityelement.mm
quiview.h quiview.mm
- LIBRARIES
- Qt::ClipboardSupportPrivate
- Qt::CorePrivate
- Qt::FontDatabaseSupportPrivate
- Qt::GraphicsSupportPrivate
- Qt::GuiPrivate
PUBLIC_LIBRARIES
${FWAudioToolbox}
${FWFoundation}
${FWQuartzCore}
${FWUIKit}
- Qt::ClipboardSupport
- Qt::Core
- Qt::FontDatabaseSupport
- Qt::GraphicsSupport
- Qt::Gui
+ Qt::ClipboardSupportPrivate
+ Qt::CorePrivate
+ Qt::FontDatabaseSupportPrivate
+ Qt::GraphicsSupportPrivate
+ Qt::GuiPrivate
)
#### Keys ignored in scope 2:.:.:kernel.pro:<TRUE>:
# OTHER_FILES = "quiview_textinput.mm" "quiview_accessibility.mm"
-# PLUGIN_CLASS_NAME = "QIOSIntegrationPlugin"
-# PLUGIN_TYPE = "platforms"
-# _LOADED = "qt_plugin"
## Scopes:
#####################################################################
-#### Keys ignored in scope 3:.:.:kernel.pro:QT_FEATURE_shared:
-# CONFIG = "static"
-
-extend_target(qios CONDITION NOT APPLE_TVOS
+extend_target(QIOSIntegrationPlugin CONDITION NOT APPLE_TVOS
SOURCES
qiosclipboard.h qiosclipboard.mm
qiosfiledialog.h qiosfiledialog.mm
diff --git a/src/plugins/platforms/ios/optional/CMakeLists.txt b/src/plugins/platforms/ios/optional/CMakeLists.txt
index a3807bee6c..3c84e61f26 100644
--- a/src/plugins/platforms/ios/optional/CMakeLists.txt
+++ b/src/plugins/platforms/ios/optional/CMakeLists.txt
@@ -1,6 +1,5 @@
# Generated from optional.pro.
-
if(APPLE_IOS)
add_subdirectory(nsphotolibrarysupport)
endif()
diff --git a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt
index 0f9128c6f7..0fbb0fdbd8 100644
--- a/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt
+++ b/src/plugins/platforms/ios/optional/nsphotolibrarysupport/CMakeLists.txt
@@ -12,14 +12,13 @@ add_qt_plugin(QIosOptionalPlugin_NSPhotoLibrary
qiosfileengineassetslibrary.h qiosfileengineassetslibrary.mm
qiosfileenginefactory.h
qiosimagepickercontroller.h qiosimagepickercontroller.mm
- LIBRARIES
- Qt::GuiPrivate
PUBLIC_LIBRARIES
${FWAssetsLibrary}
${FWFoundation}
${FWUIKit}
Qt::Core
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:nsphotolibrarysupport.pro:<TRUE>:
diff --git a/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt
index 0586e393ec..bcec98e1de 100644
--- a/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/linuxfb/.prev_CMakeLists.txt
@@ -13,20 +13,15 @@ qt_add_plugin(QLinuxFbIntegrationPlugin
qlinuxfbscreen.cpp qlinuxfbscreen.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FbSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::ServiceSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FbSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
)
#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:
@@ -36,19 +31,15 @@ qt_add_plugin(QLinuxFbIntegrationPlugin
#####################################################################
qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::KmsSupportPrivate
SOURCES
qlinuxfbdrmscreen.cpp qlinuxfbdrmscreen.h
- LIBRARIES
- Qt::KmsSupportPrivate
PUBLIC_LIBRARIES
- Qt::KmsSupport
+ Qt::KmsSupportPrivate
)
#### Keys ignored in scope 4:.:.:linuxfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/linuxfb/CMakeLists.txt b/src/plugins/platforms/linuxfb/CMakeLists.txt
index b54d4e2c6f..8747894100 100644
--- a/src/plugins/platforms/linuxfb/CMakeLists.txt
+++ b/src/plugins/platforms/linuxfb/CMakeLists.txt
@@ -14,20 +14,15 @@ qt_add_plugin(QLinuxFbIntegrationPlugin
qlinuxfbscreen.cpp qlinuxfbscreen.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FbSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::ServiceSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FbSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
)
#### Keys ignored in scope 1:.:.:linuxfb.pro:<TRUE>:
@@ -37,19 +32,15 @@ qt_add_plugin(QLinuxFbIntegrationPlugin
#####################################################################
qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
qt_extend_target(QLinuxFbIntegrationPlugin CONDITION TARGET Qt::KmsSupportPrivate
SOURCES
qlinuxfbdrmscreen.cpp qlinuxfbdrmscreen.h
- LIBRARIES
- Qt::KmsSupportPrivate
PUBLIC_LIBRARIES
- Qt::KmsSupport
+ Qt::KmsSupportPrivate
)
#### Keys ignored in scope 4:.:.:linuxfb.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/minimal/.prev_CMakeLists.txt b/src/plugins/platforms/minimal/.prev_CMakeLists.txt
index e8fb16fdb0..764c684932 100644
--- a/src/plugins/platforms/minimal/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/minimal/.prev_CMakeLists.txt
@@ -13,16 +13,13 @@ qt_add_plugin(QMinimalIntegrationPlugin
qminimalintegration.cpp qminimalintegration.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:minimal.pro:<TRUE>:
diff --git a/src/plugins/platforms/minimal/CMakeLists.txt b/src/plugins/platforms/minimal/CMakeLists.txt
index acc097c4c8..4f4638b640 100644
--- a/src/plugins/platforms/minimal/CMakeLists.txt
+++ b/src/plugins/platforms/minimal/CMakeLists.txt
@@ -14,16 +14,13 @@ qt_add_plugin(QMinimalIntegrationPlugin
qminimalintegration.cpp qminimalintegration.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:minimal.pro:<TRUE>:
diff --git a/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt b/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt
index 8f04c3fba0..7a08af79a9 100644
--- a/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/minimalegl/.prev_CMakeLists.txt
@@ -14,18 +14,14 @@ qt_add_plugin(QMinimalEglIntegrationPlugin
qminimaleglwindow.cpp qminimaleglwindow.h
DEFINES
QT_EGL_NO_X11
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EglSupportPrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EglSupport
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:minimalegl.pro:<TRUE>:
diff --git a/src/plugins/platforms/minimalegl/CMakeLists.txt b/src/plugins/platforms/minimalegl/CMakeLists.txt
index 79cc6bddc6..4c8856e35d 100644
--- a/src/plugins/platforms/minimalegl/CMakeLists.txt
+++ b/src/plugins/platforms/minimalegl/CMakeLists.txt
@@ -15,18 +15,14 @@ qt_add_plugin(QMinimalEglIntegrationPlugin
qminimaleglwindow.cpp qminimaleglwindow.h
DEFINES
QT_EGL_NO_X11
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EglSupportPrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EglSupport
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:minimalegl.pro:<TRUE>:
diff --git a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
index b3fca1bd47..62d36ec449 100644
--- a/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/offscreen/.prev_CMakeLists.txt
@@ -14,16 +14,13 @@ qt_add_plugin(QOffscreenIntegrationPlugin
qoffscreenwindow.cpp qoffscreenwindow.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:offscreen.pro:<TRUE>:
@@ -35,10 +32,8 @@ qt_add_plugin(QOffscreenIntegrationPlugin
qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
- LIBRARIES
- Qt::GlxSupportPrivate
PUBLIC_LIBRARIES
- Qt::GlxSupport
+ Qt::GlxSupportPrivate
)
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/offscreen/CMakeLists.txt b/src/plugins/platforms/offscreen/CMakeLists.txt
index 971f4c888d..63474c3760 100644
--- a/src/plugins/platforms/offscreen/CMakeLists.txt
+++ b/src/plugins/platforms/offscreen/CMakeLists.txt
@@ -15,16 +15,13 @@ qt_add_plugin(QOffscreenIntegrationPlugin
qoffscreenwindow.cpp qoffscreenwindow.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
Qt::Gui
+ Qt::GuiPrivate
)
#### Keys ignored in scope 1:.:.:offscreen.pro:<TRUE>:
@@ -36,10 +33,8 @@ qt_add_plugin(QOffscreenIntegrationPlugin
qt_extend_target(QOffscreenIntegrationPlugin CONDITION QT_FEATURE_opengl AND QT_FEATURE_xlib AND NOT QT_FEATURE_opengles2
SOURCES
qoffscreenintegration_x11.cpp qoffscreenintegration_x11.h
- LIBRARIES
- Qt::GlxSupportPrivate
PUBLIC_LIBRARIES
- Qt::GlxSupport
+ Qt::GlxSupportPrivate
)
#### Keys ignored in scope 3:.:.:offscreen.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/vnc/.prev_CMakeLists.txt b/src/plugins/platforms/vnc/.prev_CMakeLists.txt
index 28031bb7d1..a26cc0be2b 100644
--- a/src/plugins/platforms/vnc/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/vnc/.prev_CMakeLists.txt
@@ -15,23 +15,17 @@ qt_add_plugin(QVncIntegrationPlugin
qvncscreen.cpp qvncscreen.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FbSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
+ Qt::Network
Qt::ServiceSupportPrivate
Qt::ThemeSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FbSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::Network
- Qt::ServiceSupport
- Qt::ThemeSupport
)
#### Keys ignored in scope 1:.:.:vnc.pro:<TRUE>:
@@ -41,10 +35,8 @@ qt_add_plugin(QVncIntegrationPlugin
#####################################################################
qt_extend_target(QVncIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 3:.:.:vnc.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/vnc/CMakeLists.txt b/src/plugins/platforms/vnc/CMakeLists.txt
index 502cff06db..cb84355d81 100644
--- a/src/plugins/platforms/vnc/CMakeLists.txt
+++ b/src/plugins/platforms/vnc/CMakeLists.txt
@@ -16,23 +16,17 @@ qt_add_plugin(QVncIntegrationPlugin
qvncscreen.cpp qvncscreen.h
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EventDispatcherSupportPrivate
Qt::FbSupportPrivate
Qt::FontDatabaseSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
+ Qt::Network
Qt::ServiceSupportPrivate
Qt::ThemeSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EventDispatcherSupport
- Qt::FbSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::Network
- Qt::ServiceSupport
- Qt::ThemeSupport
)
#### Keys ignored in scope 1:.:.:vnc.pro:<TRUE>:
@@ -42,10 +36,8 @@ qt_add_plugin(QVncIntegrationPlugin
#####################################################################
qt_extend_target(QVncIntegrationPlugin CONDITION TARGET Qt::InputSupportPrivate
- LIBRARIES
- Qt::InputSupportPrivate
PUBLIC_LIBRARIES
- Qt::InputSupport
+ Qt::InputSupportPrivate
)
#### Keys ignored in scope 3:.:.:vnc.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
diff --git a/src/plugins/platforms/windows/.prev_CMakeLists.txt b/src/plugins/platforms/windows/.prev_CMakeLists.txt
index fcac46588d..462e83ac56 100644
--- a/src/plugins/platforms/windows/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/windows/.prev_CMakeLists.txt
@@ -41,11 +41,6 @@ qt_add_plugin(QWindowsIntegrationPlugin
INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
LIBRARIES
- Qt::CorePrivate
- Qt::EventDispatcherSupportPrivate
- Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
advapi32
d3d9
gdi32
@@ -55,10 +50,12 @@ qt_add_plugin(QWindowsIntegrationPlugin
winmm
PUBLIC_LIBRARIES
Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
dwmapi
imm32
oleaut32
@@ -109,19 +106,15 @@ qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility
uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h
uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h
uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h
- LIBRARIES
- Qt::AccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
+ Qt::AccessibilitySupportPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qwindowsvulkaninstance.cpp qwindowsvulkaninstance.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
#### Keys ignored in scope 4:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
@@ -219,10 +212,8 @@ if(QT_FEATURE_imageformat_png)
endif()
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND TARGET Qt::WindowsUIAutomationSupportPrivate
- LIBRARIES
- Qt::WindowsUIAutomationSupportPrivate
PUBLIC_LIBRARIES
- Qt::WindowsUIAutomationSupport
+ Qt::WindowsUIAutomationSupportPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND mingw
diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt
index 1c017ed2e5..0481246384 100644
--- a/src/plugins/platforms/windows/CMakeLists.txt
+++ b/src/plugins/platforms/windows/CMakeLists.txt
@@ -42,11 +42,6 @@ qt_add_plugin(QWindowsIntegrationPlugin
INCLUDE_DIRECTORIES
${CMAKE_CURRENT_SOURCE_DIR}
LIBRARIES
- Qt::CorePrivate
- Qt::EventDispatcherSupportPrivate
- Qt::FontDatabaseSupportPrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
advapi32
d3d9
gdi32
@@ -56,10 +51,12 @@ qt_add_plugin(QWindowsIntegrationPlugin
winmm
PUBLIC_LIBRARIES
Qt::Core
- Qt::EventDispatcherSupport
- Qt::FontDatabaseSupport
+ Qt::CorePrivate
+ Qt::EventDispatcherSupportPrivate
+ Qt::FontDatabaseSupportPrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
dwmapi
imm32
oleaut32
@@ -110,19 +107,15 @@ qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility
uiautomation/qwindowsuiautils.cpp uiautomation/qwindowsuiautils.h
uiautomation/qwindowsuiavalueprovider.cpp uiautomation/qwindowsuiavalueprovider.h
uiautomation/qwindowsuiawindowprovider.cpp uiautomation/qwindowsuiawindowprovider.h
- LIBRARIES
- Qt::AccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::AccessibilitySupport
+ Qt::AccessibilitySupportPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_vulkan
SOURCES
qwindowsvulkaninstance.cpp qwindowsvulkaninstance.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
#### Keys ignored in scope 4:.:.:windows.pro:NOT TARGET___equals____ss_QT_DEFAULT_QPA_PLUGIN:
@@ -220,10 +213,8 @@ if(QT_FEATURE_imageformat_png)
endif()
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND TARGET Qt::WindowsUIAutomationSupportPrivate
- LIBRARIES
- Qt::WindowsUIAutomationSupportPrivate
PUBLIC_LIBRARIES
- Qt::WindowsUIAutomationSupport
+ Qt::WindowsUIAutomationSupportPrivate
)
qt_extend_target(QWindowsIntegrationPlugin CONDITION QT_FEATURE_accessibility AND mingw
diff --git a/src/plugins/platforms/xcb/.prev_CMakeLists.txt b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
index c504bbc64d..e15d45aa63 100644
--- a/src/plugins/platforms/xcb/.prev_CMakeLists.txt
+++ b/src/plugins/platforms/xcb/.prev_CMakeLists.txt
@@ -38,7 +38,7 @@ qt_add_module(XcbQpa
QT_NO_FOREACH
INCLUDE_DIRECTORIES
gl_integrations
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::EdidSupportPrivate
Qt::FontDatabaseSupportPrivate
@@ -46,14 +46,6 @@ qt_add_module(XcbQpa
Qt::ServiceSupportPrivate
Qt::ThemeSupportPrivate
Qt::XkbCommonSupportPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EdidSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
- Qt::ThemeSupport
- Qt::XkbCommonSupport
XCB::ICCCM
XCB::IMAGE
XCB::KEYSYMS
@@ -75,20 +67,16 @@ qt_add_module(XcbQpa
#####################################################################
qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
- LIBRARIES
- Qt::LinuxAccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::LinuxAccessibilitySupport
+ Qt::LinuxAccessibilitySupportPrivate
)
qt_extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
SOURCES
qxcbvulkaninstance.cpp qxcbvulkaninstance.h
qxcbvulkanwindow.cpp qxcbvulkanwindow.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(XcbQpa CONDITION QT_FEATURE_glib
@@ -146,24 +134,20 @@ qt_extend_target(XcbQpa CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_xcb_nativ
WrapFreetype::WrapFreetype
)
#####################################################################
-## qxcb Plugin:
+## QXcbIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(qxcb
+qt_add_plugin(QXcbIntegrationPlugin
+ OUTPUT_NAME qxcb
TYPE platforms
- CLASS_NAME QXcbIntegrationPlugin
SOURCES
qxcbmain.cpp
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::XcbQpaPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::XcbQpa
)
#### Keys ignored in scope 19:.:.:xcb-plugin.pro:<TRUE>:
diff --git a/src/plugins/platforms/xcb/CMakeLists.txt b/src/plugins/platforms/xcb/CMakeLists.txt
index c74e33e31a..1bb8d7f53f 100644
--- a/src/plugins/platforms/xcb/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/CMakeLists.txt
@@ -60,7 +60,7 @@ qt_add_module(XcbQpa
QT_NO_FOREACH
INCLUDE_DIRECTORIES
gl_integrations
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::EdidSupportPrivate
Qt::FontDatabaseSupportPrivate
@@ -69,14 +69,6 @@ qt_add_module(XcbQpa
Qt::ThemeSupportPrivate
Qt::XkbCommonSupportPrivate
PkgConfig::XKB_COMMON_X11 # special case
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EdidSupport
- Qt::FontDatabaseSupport
- Qt::Gui
- Qt::ServiceSupport
- Qt::ThemeSupport
- Qt::XkbCommonSupport
XCB::ICCCM
XCB::IMAGE
XCB::KEYSYMS
@@ -98,20 +90,16 @@ qt_add_module(XcbQpa
#####################################################################
qt_extend_target(XcbQpa CONDITION TARGET Qt::LinuxAccessibilitySupportPrivate
- LIBRARIES
- Qt::LinuxAccessibilitySupportPrivate
PUBLIC_LIBRARIES
- Qt::LinuxAccessibilitySupport
+ Qt::LinuxAccessibilitySupportPrivate
)
qt_extend_target(XcbQpa CONDITION QT_FEATURE_vulkan
SOURCES
qxcbvulkaninstance.cpp qxcbvulkaninstance.h
qxcbvulkanwindow.cpp qxcbvulkanwindow.h
- LIBRARIES
- Qt::VulkanSupportPrivate
PUBLIC_LIBRARIES
- Qt::VulkanSupport
+ Qt::VulkanSupportPrivate
)
qt_extend_target(XcbQpa CONDITION QT_FEATURE_glib
@@ -185,25 +173,21 @@ endif()
# special case end
#####################################################################
-## qxcb Plugin:
+## QXcbIntegrationPlugin Plugin:
#####################################################################
-qt_add_plugin(qxcb
+qt_add_plugin(QXcbIntegrationPlugin
+ OUTPUT_NAME qxcb
TYPE platforms
- CLASS_NAME QXcbIntegrationPlugin
DEFAULT_IF ${QT_QPA_DEFAULT_PLATFORM} MATCHES xcb # special case
SOURCES
qxcbmain.cpp
DEFINES
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::GuiPrivate
Qt::XcbQpaPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::Gui
- Qt::XcbQpa
)
#### Keys ignored in scope 19:.:.:xcb-plugin.pro:<TRUE>:
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
index 14d91295aa..a78d01ec87 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_egl/CMakeLists.txt
@@ -18,14 +18,11 @@ qt_add_plugin(QXcbEglIntegrationPlugin
INCLUDE_DIRECTORIES
..
../..
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::EglSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::XcbQpaPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::EglSupport
- Qt::Gui
- Qt::XcbQpa
)
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
index 494392ad1a..b3361dbd99 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/CMakeLists.txt
@@ -18,16 +18,13 @@ qt_add_plugin(QXcbGlxIntegrationPlugin
INCLUDE_DIRECTORIES
..
../..
- LIBRARIES
+ PUBLIC_LIBRARIES
+ Qt::Core
Qt::CorePrivate
Qt::GlxSupportPrivate
+ Qt::Gui
Qt::GuiPrivate
Qt::XcbQpaPrivate
- PUBLIC_LIBRARIES
- Qt::Core
- Qt::GlxSupport
- Qt::Gui
- Qt::XcbQpa
)
## Scopes:
diff --git a/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt b/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt
index d5cfb31507..0784de2ca8 100644
--- a/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt
+++ b/src/plugins/platformthemes/gtk3/.prev_CMakeLists.txt
@@ -14,15 +14,13 @@ qt_add_plugin(QGtk3ThemePlugin
qgtk3theme.cpp qgtk3theme.h
DEFINES
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
PUBLIC_LIBRARIES
PkgConfig::GTK3
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
)
#### Keys ignored in scope 1:.:.:gtk3.pro:<TRUE>:
diff --git a/src/plugins/platformthemes/gtk3/CMakeLists.txt b/src/plugins/platformthemes/gtk3/CMakeLists.txt
index 9b1ed2242e..4e56e4a6b3 100644
--- a/src/plugins/platformthemes/gtk3/CMakeLists.txt
+++ b/src/plugins/platformthemes/gtk3/CMakeLists.txt
@@ -17,16 +17,15 @@ qt_add_plugin(QGtk3ThemePlugin
qgtk3theme.cpp qgtk3theme.h
DEFINES
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_6
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
+ LIBRARIES # special case
X11::X11 # special case
PUBLIC_LIBRARIES
PkgConfig::GTK3
Qt::Core
+ Qt::CorePrivate
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
)
#### Keys ignored in scope 1:.:.:gtk3.pro:<TRUE>:
diff --git a/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt b/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt
index f41e041729..a9062f695f 100644
--- a/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt
+++ b/src/plugins/platformthemes/xdgdesktopportal/CMakeLists.txt
@@ -11,15 +11,13 @@ qt_add_plugin(QXdgDesktopPortalThemePlugin
main.cpp
qxdgdesktopportalfiledialog.cpp qxdgdesktopportalfiledialog_p.h
qxdgdesktopportaltheme.cpp qxdgdesktopportaltheme.h
- LIBRARIES
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::ThemeSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::DBus
Qt::Gui
- Qt::ThemeSupport
+ Qt::GuiPrivate
+ Qt::ThemeSupportPrivate
)
#### Keys ignored in scope 1:.:.:xdgdesktopportal.pro:<TRUE>:
diff --git a/src/plugins/printsupport/cocoa/CMakeLists.txt b/src/plugins/printsupport/cocoa/CMakeLists.txt
index 3821150fdc..72660dc173 100644
--- a/src/plugins/printsupport/cocoa/CMakeLists.txt
+++ b/src/plugins/printsupport/cocoa/CMakeLists.txt
@@ -9,14 +9,12 @@ qt_add_plugin(QCocoaPrinterSupportPlugin
TYPE printsupport
SOURCES
main.cpp
- LIBRARIES
- Qt::GuiPrivate
- Qt::PrintSupportPrivate
PUBLIC_LIBRARIES
${FWAppKit}
Qt::Core
Qt::Gui
- Qt::PrintSupport
+ Qt::GuiPrivate
+ Qt::PrintSupportPrivate
)
#### Keys ignored in scope 1:.:.:cocoa.pro:<TRUE>:
diff --git a/src/plugins/printsupport/cups/.prev_CMakeLists.txt b/src/plugins/printsupport/cups/.prev_CMakeLists.txt
index 9967b8138e..c65ffb89c7 100644
--- a/src/plugins/printsupport/cups/.prev_CMakeLists.txt
+++ b/src/plugins/printsupport/cups/.prev_CMakeLists.txt
@@ -16,13 +16,13 @@ qt_add_plugin(QCupsPrinterSupportPlugin
../../../printsupport/kernel
LIBRARIES
Cups::Cups
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::PrintSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
Qt::PrintSupport
+ Qt::PrintSupportPrivate
)
#### Keys ignored in scope 1:.:.:cups.pro:<TRUE>:
diff --git a/src/plugins/printsupport/cups/CMakeLists.txt b/src/plugins/printsupport/cups/CMakeLists.txt
index deba344c54..5c920443ea 100644
--- a/src/plugins/printsupport/cups/CMakeLists.txt
+++ b/src/plugins/printsupport/cups/CMakeLists.txt
@@ -18,13 +18,13 @@ qt_add_plugin(QCupsPrinterSupportPlugin
../../../printsupport/kernel
LIBRARIES
Cups::Cups
- Qt::CorePrivate
- Qt::GuiPrivate
- Qt::PrintSupportPrivate
PUBLIC_LIBRARIES
Qt::Core
+ Qt::CorePrivate
Qt::Gui
+ Qt::GuiPrivate
Qt::PrintSupport
+ Qt::PrintSupportPrivate
)
#### Keys ignored in scope 1:.:.:cups.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/db2/CMakeLists.txt b/src/plugins/sqldrivers/db2/CMakeLists.txt
index a75d28e19d..637461e168 100644
--- a/src/plugins/sqldrivers/db2/CMakeLists.txt
+++ b/src/plugins/sqldrivers/db2/CMakeLists.txt
@@ -13,13 +13,11 @@ qt_add_plugin(QDB2DriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
DB2::DB2
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:db2.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/mysql/CMakeLists.txt b/src/plugins/sqldrivers/mysql/CMakeLists.txt
index 7a55786300..c99f322dfb 100644
--- a/src/plugins/sqldrivers/mysql/CMakeLists.txt
+++ b/src/plugins/sqldrivers/mysql/CMakeLists.txt
@@ -13,13 +13,11 @@ qt_add_plugin(QMYSQLDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
MySQL::MySQL
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:mysql.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/oci/CMakeLists.txt b/src/plugins/sqldrivers/oci/CMakeLists.txt
index d3c1d0c74c..713c9fc871 100644
--- a/src/plugins/sqldrivers/oci/CMakeLists.txt
+++ b/src/plugins/sqldrivers/oci/CMakeLists.txt
@@ -13,13 +13,11 @@ qt_add_plugin(QOCIDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
Oracle::OCI
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:oci.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt b/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt
index 2452d50989..692d1fc294 100644
--- a/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt
+++ b/src/plugins/sqldrivers/odbc/.prev_CMakeLists.txt
@@ -13,13 +13,11 @@ qt_add_plugin(QODBCDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
ODBC::ODBC
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:odbc.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/odbc/CMakeLists.txt b/src/plugins/sqldrivers/odbc/CMakeLists.txt
index 0e19306786..5c163181c5 100644
--- a/src/plugins/sqldrivers/odbc/CMakeLists.txt
+++ b/src/plugins/sqldrivers/odbc/CMakeLists.txt
@@ -14,13 +14,11 @@ qt_add_plugin(QODBCDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
ODBC::ODBC
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:odbc.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt b/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt
index 7df66eeb51..f3cec6d302 100644
--- a/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt
+++ b/src/plugins/sqldrivers/psql/.prev_CMakeLists.txt
@@ -13,13 +13,11 @@ qt_add_plugin(QPSQLDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
PostgreSQL::PostgreSQL
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:psql.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/psql/CMakeLists.txt b/src/plugins/sqldrivers/psql/CMakeLists.txt
index e4f794f523..03a2dc69c3 100644
--- a/src/plugins/sqldrivers/psql/CMakeLists.txt
+++ b/src/plugins/sqldrivers/psql/CMakeLists.txt
@@ -18,13 +18,11 @@ qt_add_plugin(QPSQLDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
PostgreSQL::PostgreSQL
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:psql.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt b/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt
index 6e17dfe302..d258c23821 100644
--- a/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt
+++ b/src/plugins/sqldrivers/sqlite/.prev_CMakeLists.txt
@@ -13,12 +13,10 @@ qt_add_plugin(QSQLiteDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
PUBLIC_LIBRARIES
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:sqlite.pro:<TRUE>:
diff --git a/src/plugins/sqldrivers/sqlite/CMakeLists.txt b/src/plugins/sqldrivers/sqlite/CMakeLists.txt
index 98c94a426a..d1453638b3 100644
--- a/src/plugins/sqldrivers/sqlite/CMakeLists.txt
+++ b/src/plugins/sqldrivers/sqlite/CMakeLists.txt
@@ -13,13 +13,12 @@ qt_add_plugin(QSQLiteDriverPlugin
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
- LIBRARIES
- Qt::CorePrivate
- Qt::SqlPrivate
+ LIBRARIES # special case
SQLite::SQLite3 # special case
PUBLIC_LIBRARIES
Qt::Core
- Qt::Sql
+ Qt::CorePrivate
+ Qt::SqlPrivate
)
#### Keys ignored in scope 1:.:.:sqlite.pro:<TRUE>:
diff --git a/src/plugins/styles/mac/CMakeLists.txt b/src/plugins/styles/mac/CMakeLists.txt
index 6b039c0ddc..140d4e4c93 100644
--- a/src/plugins/styles/mac/CMakeLists.txt
+++ b/src/plugins/styles/mac/CMakeLists.txt
@@ -13,11 +13,10 @@ qt_add_plugin(QMacStylePlugin
qmacstyle_mac_p_p.h
LIBRARIES
${FWAppKit}
- Qt::WidgetsPrivate
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
- Qt::Widgets
+ Qt::WidgetsPrivate
)
#### Keys ignored in scope 1:.:.:mac.pro:<TRUE>:
diff --git a/src/plugins/styles/windowsvista/CMakeLists.txt b/src/plugins/styles/windowsvista/CMakeLists.txt
index 4030344f06..008fa624fe 100644
--- a/src/plugins/styles/windowsvista/CMakeLists.txt
+++ b/src/plugins/styles/windowsvista/CMakeLists.txt
@@ -14,14 +14,13 @@ qt_add_plugin(QWindowsVistaStylePlugin
qwindowsxpstyle.cpp qwindowsxpstyle_p.h
qwindowsxpstyle_p_p.h
LIBRARIES
- Qt::WidgetsPrivate
gdi32
user32
uxtheme
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
- Qt::Widgets
+ Qt::WidgetsPrivate
)
#### Keys ignored in scope 1:.:.:windowsvista.pro:<TRUE>:
diff --git a/src/printsupport/CMakeLists.txt b/src/printsupport/CMakeLists.txt
index b2d653125f..c11b9d8b15 100644
--- a/src/printsupport/CMakeLists.txt
+++ b/src/printsupport/CMakeLists.txt
@@ -32,6 +32,10 @@ qt_add_module(PrintSupport
Qt::Core
Qt::Gui
Qt::Widgets
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::WidgetsPrivate
)
#### Keys ignored in scope 1:.:.:printsupport.pro:<TRUE>:
diff --git a/src/sql/CMakeLists.txt b/src/sql/CMakeLists.txt
index 49a1df0fdb..1bf3a3df2a 100644
--- a/src/sql/CMakeLists.txt
+++ b/src/sql/CMakeLists.txt
@@ -27,6 +27,8 @@ qt_add_module(Sql
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
PRECOMPILED_HEADER
"../corelib/global/qt_pch.h"
)
diff --git a/src/testlib/.prev_CMakeLists.txt b/src/testlib/.prev_CMakeLists.txt
index 5859ae18fa..29c73d597e 100644
--- a/src/testlib/.prev_CMakeLists.txt
+++ b/src/testlib/.prev_CMakeLists.txt
@@ -59,6 +59,8 @@ qt_add_module(Test
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
COMPILE_OPTIONS
--cs-exclude-file-abs-wildcard=${QT_SOURCE_TREE}/*
--cs-include-file-abs-wildcard=*/src/testlib/*
diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt
index 8d8b09beba..79138707e3 100644
--- a/src/testlib/CMakeLists.txt
+++ b/src/testlib/CMakeLists.txt
@@ -60,6 +60,8 @@ qt_add_module(Test
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
# special case begin
# remove COMPILE_OPTIONS, LINK_OPTIONS, COVERAGE_OPTIONS
# figure out how it should be handled.
diff --git a/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt b/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt
index 9d51b4eac9..58a8ea2b08 100644
--- a/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt
+++ b/src/tools/qdbuscpp2xml/.prev_CMakeLists.txt
@@ -23,7 +23,7 @@ qt_add_tool(qdbuscpp2xml
INCLUDE_DIRECTORIES
../moc
../moc/../../3rdparty/tinycbor/src
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
)
@@ -35,15 +35,11 @@ qt_add_tool(qdbuscpp2xml
#####################################################################
qt_extend_target(qdbuscpp2xml CONDITION force_bootstrap
- LIBRARIES
- bootstrap_dbusPrivate
PUBLIC_LIBRARIES
- bootstrap_dbus
+ bootstrap_dbusPrivate
)
qt_extend_target(qdbuscpp2xml CONDITION NOT force_bootstrap
- LIBRARIES
- Qt::DBusPrivate
PUBLIC_LIBRARIES
- Qt::DBus
+ Qt::DBusPrivate
)
diff --git a/src/tools/qdbuscpp2xml/CMakeLists.txt b/src/tools/qdbuscpp2xml/CMakeLists.txt
index 499e5fb6ae..46582793a1 100644
--- a/src/tools/qdbuscpp2xml/CMakeLists.txt
+++ b/src/tools/qdbuscpp2xml/CMakeLists.txt
@@ -24,7 +24,7 @@ qt_add_tool(qdbuscpp2xml
INCLUDE_DIRECTORIES
../moc
../moc/../../3rdparty/tinycbor/src
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DBusPrivate
# COMPILE_OPTIONS # special case
diff --git a/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt b/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt
index 202e751727..ce9438b207 100644
--- a/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt
+++ b/src/tools/qdbusxml2cpp/.prev_CMakeLists.txt
@@ -10,7 +10,7 @@ qt_add_tool(qdbusxml2cpp
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
)
@@ -22,15 +22,11 @@ qt_add_tool(qdbusxml2cpp
#####################################################################
qt_extend_target(qdbusxml2cpp CONDITION NOT force_bootstrap
- LIBRARIES
- Qt::DBusPrivate
PUBLIC_LIBRARIES
- Qt::DBus
+ Qt::DBusPrivate
)
qt_extend_target(qdbusxml2cpp CONDITION force_bootstrap
- LIBRARIES
- bootstrap_dbusPrivate
PUBLIC_LIBRARIES
- bootstrap_dbus
+ bootstrap_dbusPrivate
)
diff --git a/src/tools/qdbusxml2cpp/CMakeLists.txt b/src/tools/qdbusxml2cpp/CMakeLists.txt
index f97cbb1180..63700f0b6b 100644
--- a/src/tools/qdbusxml2cpp/CMakeLists.txt
+++ b/src/tools/qdbusxml2cpp/CMakeLists.txt
@@ -11,7 +11,7 @@ qt_add_tool(qdbusxml2cpp
DEFINES
QT_NO_CAST_FROM_ASCII
QT_NO_FOREACH
- LIBRARIES
+ PUBLIC_LIBRARIES
Qt::CorePrivate
Qt::DBusPrivate
# COMPILE_OPTIONS # special case
diff --git a/src/widgets/.prev_CMakeLists.txt b/src/widgets/.prev_CMakeLists.txt
index e8b01ff99c..db39f84104 100644
--- a/src/widgets/.prev_CMakeLists.txt
+++ b/src/widgets/.prev_CMakeLists.txt
@@ -60,6 +60,9 @@ qt_add_module(Widgets
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
PRECOMPILED_HEADER
"kernel/qt_widgets_pch.h"
)
diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt
index a7ba83bde8..e756b27bee 100644
--- a/src/widgets/CMakeLists.txt
+++ b/src/widgets/CMakeLists.txt
@@ -60,6 +60,9 @@ qt_add_module(Widgets
PUBLIC_LIBRARIES
Qt::Core
Qt::Gui
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
PRECOMPILED_HEADER
"kernel/qt_widgets_pch.h"
)
diff --git a/src/widgets/Qt6WidgetsMacros.cmake b/src/widgets/Qt6WidgetsMacros.cmake
index 5b0f2e700f..aa8133ba47 100644
--- a/src/widgets/Qt6WidgetsMacros.cmake
+++ b/src/widgets/Qt6WidgetsMacros.cmake
@@ -56,6 +56,7 @@ function(qt6_wrap_ui outfiles )
get_filename_component(infile ${it} ABSOLUTE)
set(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
add_custom_command(OUTPUT ${outfile}
+ DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::uic
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::uic
ARGS ${ui_options} -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile} VERBATIM)
diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt
index 52bca5c3c4..8b79b9df45 100644
--- a/src/xml/CMakeLists.txt
+++ b/src/xml/CMakeLists.txt
@@ -17,6 +17,8 @@ qt_add_module(Xml
Qt::CorePrivate
PUBLIC_LIBRARIES
Qt::Core
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
)
## Scopes:
diff --git a/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt b/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..1509c2e809
--- /dev/null
+++ b/tests/auto/network/ssl/qsslcertificate/.prev_CMakeLists.txt
@@ -0,0 +1,31 @@
+# Generated from qsslcertificate.pro.
+
+#####################################################################
+## tst_qsslcertificate Test:
+#####################################################################
+
+# Collect test data
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ more-certificates/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ verify-certs/*)
+list(APPEND test_data ${test_data_glob})
+file(GLOB_RECURSE test_data_glob
+ RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
+ pkcs12/*)
+list(APPEND test_data ${test_data_glob})
+
+add_qt_test(tst_qsslcertificate
+ SOURCES
+ tst_qsslcertificate.cpp
+ PUBLIC_LIBRARIES
+ Qt::Network
+ TESTDATA ${test_data}
+)
diff --git a/util/cmake/helper.py b/util/cmake/helper.py
index 091b619201..d427376088 100644
--- a/util/cmake/helper.py
+++ b/util/cmake/helper.py
@@ -536,6 +536,7 @@ _library_map = [
LibraryMapping("webp", "WrapWebP", "WrapWebP::WrapWebP"),
LibraryMapping("jasper", "WrapJasper", "WrapJasper::WrapJasper"),
LibraryMapping("sdl2", "WrapSDL2", "WrapSDL2::WrapSDL2"),
+ LibraryMapping("assimp", "WrapAssimp", "WrapAssimp::WrapAssimp", extra=["5"]),
]
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 04443b00b7..a93c506169 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -904,6 +904,8 @@ class Scope(object):
self._visited_keys = set() # type: Set[str]
self._total_condition = None # type: Optional[str]
self._parent_include_line_no = parent_include_line_no
+ self._is_public_module = False
+ self._has_private_module = False
def __repr__(self):
return (
@@ -935,6 +937,14 @@ class Scope(object):
def currentdir(self) -> str:
return self._currentdir
+ @property
+ def is_public_module(self) -> bool:
+ return self._is_public_module
+
+ @property
+ def has_private_module(self) -> bool:
+ return self._has_private_module
+
def can_merge_condition(self):
if self._condition == "else":
return False
@@ -1219,7 +1229,7 @@ class Scope(object):
def get(self, key: str, *, ignore_includes: bool = False, inherit: bool = False) -> List[str]:
is_same_path = self.currentdir == self.basedir
if not is_same_path:
- relative_path = os.path.relpath(self.currentdir, self.basedir)
+ relative_path = posixpath.relpath(self.currentdir, self.basedir)
if key == "QQC2_SOURCE_TREE":
qmake_conf_path = find_qmake_conf(os.path.abspath(self.currentdir))
@@ -1826,16 +1836,9 @@ def extract_cmake_libraries(
private_dependencies += [map_qt_library(q) for q in scope.expand(key)]
for key in ["QT"]:
- # Qt public libs: These may include FooPrivate in which case we get
- # a private dependency on FooPrivate as well as a public dependency on Foo
for lib in scope.expand(key):
mapped_lib = map_qt_library(lib)
-
- if mapped_lib.endswith("Private"):
- private_dependencies.append(mapped_lib)
- public_dependencies.append(mapped_lib[:-7])
- else:
- public_dependencies.append(mapped_lib)
+ public_dependencies.append(mapped_lib)
return (
_map_libraries_to_cmake(public_dependencies, known_libraries, is_example=is_example),
@@ -1972,8 +1975,41 @@ def write_library_section(
scope, known_libraries=known_libraries
)
- write_list(cm_fh, private_dependencies, "LIBRARIES", indent + 1)
- write_list(cm_fh, public_dependencies, "PUBLIC_LIBRARIES", indent + 1)
+ is_public_module = scope.is_public_module
+ current_scope = scope
+ while not is_public_module and current_scope.parent:
+ current_scope = current_scope.parent
+ is_public_module = current_scope.is_public_module
+
+ # When handling module dependencies, handle QT += foo-private magic.
+ # This implies:
+ # target_link_libraries(Module PUBLIC Qt::Foo)
+ # target_link_libraries(Module PRIVATE Qt::FooPrivate)
+ # target_link_libraries(ModulePrivate INTERFACE Qt::FooPrivate)
+ if is_public_module:
+ private_module_dep_pattern = re.compile(r"^(Qt::(.+))Private$")
+
+ public_module_public_deps = []
+ public_module_private_deps = private_dependencies
+ private_module_interface_deps = []
+
+ for dep in public_dependencies:
+ match = re.match(private_module_dep_pattern, dep)
+ if match:
+ if match[1] not in public_module_public_deps:
+ public_module_public_deps.append(match[1])
+ private_module_interface_deps.append(dep)
+ if dep not in public_module_private_deps:
+ public_module_private_deps.append(dep)
+ else:
+ if dep not in public_module_public_deps:
+ public_module_public_deps.append(dep)
+ write_list(cm_fh, public_module_private_deps, "LIBRARIES", indent + 1)
+ write_list(cm_fh, public_module_public_deps, "PUBLIC_LIBRARIES", indent + 1)
+ write_list(cm_fh, private_module_interface_deps, "PRIVATE_MODULE_INTERFACE", indent + 1)
+ else:
+ write_list(cm_fh, private_dependencies, "LIBRARIES", indent + 1)
+ write_list(cm_fh, public_dependencies, "PUBLIC_LIBRARIES", indent + 1)
def write_autogen_section(cm_fh: IO[str], scope: Scope, *, indent: int = 0):
@@ -2827,9 +2863,12 @@ def write_module(cm_fh: IO[str], scope: Scope, *, indent: int = 0) -> str:
# or when option(host_build) is used, as described in qt_module.prf.
is_static = "static" in scope.get("CONFIG") or "host_build" in scope.get("_OPTION")
+ is_public_module = True
+
if is_static:
extra.append("STATIC")
if "internal_module" in scope.get("CONFIG"):
+ is_public_module = False
extra.append("INTERNAL_MODULE")
if "no_module_headers" in scope.get("CONFIG"):
extra.append("NO_MODULE_HEADERS")
@@ -2837,6 +2876,8 @@ def write_module(cm_fh: IO[str], scope: Scope, *, indent: int = 0) -> str:
extra.append("NO_SYNC_QT")
if "no_private_module" in scope.get("CONFIG"):
extra.append("NO_PRIVATE_MODULE")
+ else:
+ scope._has_private_module = True
if "header_module" in scope.get("CONFIG"):
extra.append("HEADER_MODULE")
if "metatypes" in scope.get("CONFIG") or "qmltypes" in scope.get("CONFIG"):
@@ -2850,6 +2891,8 @@ def write_module(cm_fh: IO[str], scope: Scope, *, indent: int = 0) -> str:
if module_plugin_types:
extra.append(f"PLUGIN_TYPES {' '.join(module_plugin_types)}")
+ scope._is_public_module = is_public_module
+
target_name = module_name[2:]
write_main_part(
cm_fh,