summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtBaseGlobalTargets.cmake6
-rw-r--r--cmake/QtBuild.cmake2
-rw-r--r--cmake/QtConfig.cmake.in13
-rw-r--r--cmake/QtModuleConfig.cmake.in14
-rw-r--r--cmake/QtModuleToolsConfig.cmake.in12
-rw-r--r--cmake/QtPluginConfig.cmake.in12
-rw-r--r--examples/CMakeLists.txt67
-rw-r--r--examples/corelib/CMakeLists.txt5
-rw-r--r--examples/corelib/ipc/localfortuneclient/CMakeLists.txt37
-rw-r--r--examples/corelib/ipc/localfortuneserver/CMakeLists.txt37
-rw-r--r--examples/corelib/ipc/sharedmemory/CMakeLists.txt39
-rw-r--r--examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt40
-rw-r--r--examples/corelib/serialization/cbordump/CMakeLists.txt37
-rw-r--r--examples/corelib/serialization/convert/CMakeLists.txt51
-rw-r--r--examples/corelib/serialization/savegame/CMakeLists.txt43
-rw-r--r--examples/corelib/threads/mandelbrot/CMakeLists.txt40
-rw-r--r--examples/corelib/threads/queuedcustomtype/CMakeLists.txt38
-rw-r--r--examples/corelib/threads/semaphores/CMakeLists.txt34
-rw-r--r--examples/corelib/threads/waitconditions/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/contiguouscache/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/customtype/CMakeLists.txt34
-rw-r--r--examples/corelib/tools/customtypesending/CMakeLists.txt36
-rw-r--r--examples/dbus/chat/CMakeLists.txt59
-rw-r--r--examples/dbus/complexpingpong/CMakeLists.txt34
-rw-r--r--examples/dbus/listnames/CMakeLists.txt38
-rw-r--r--examples/dbus/pingpong/CMakeLists.txt54
-rw-r--r--examples/dbus/remotecontrolledcar/car/CMakeLists.txt49
-rw-r--r--examples/dbus/remotecontrolledcar/controller/CMakeLists.txt49
-rw-r--r--examples/embedded/digiflip/CMakeLists.txt34
-rw-r--r--examples/embedded/flickable/CMakeLists.txt34
-rw-r--r--examples/embedded/flightinfo/CMakeLists.txt44
-rw-r--r--examples/embedded/lightmaps/CMakeLists.txt44
-rw-r--r--examples/embedded/raycasting/CMakeLists.txt37
-rw-r--r--examples/embedded/styleexample/CMakeLists.txt47
-rw-r--r--examples/gui/analogclock/CMakeLists.txt43
-rw-r--r--examples/gui/openglwindow/CMakeLists.txt41
-rw-r--r--examples/gui/rasterwindow/CMakeLists.txt41
-rw-r--r--examples/network/bearermonitor/CMakeLists.txt55
-rw-r--r--examples/network/blockingfortuneclient/CMakeLists.txt40
-rw-r--r--examples/network/broadcastreceiver/CMakeLists.txt38
-rw-r--r--examples/network/broadcastsender/CMakeLists.txt38
-rw-r--r--examples/network/dnslookup/CMakeLists.txt41
-rw-r--r--examples/network/download/CMakeLists.txt36
-rw-r--r--examples/network/downloadmanager/CMakeLists.txt41
-rw-r--r--examples/network/fortuneclient/CMakeLists.txt38
-rw-r--r--examples/network/fortuneserver/CMakeLists.txt38
-rw-r--r--examples/network/googlesuggest/CMakeLists.txt40
-rw-r--r--examples/network/http/CMakeLists.txt42
-rw-r--r--examples/network/loopback/CMakeLists.txt38
-rw-r--r--examples/network/multicastreceiver/CMakeLists.txt38
-rw-r--r--examples/network/multicastsender/CMakeLists.txt38
-rw-r--r--examples/network/multistreamclient/CMakeLists.txt46
-rw-r--r--examples/network/multistreamserver/CMakeLists.txt47
-rw-r--r--examples/network/network-chat/CMakeLists.txt48
-rw-r--r--examples/network/securesocketclient/CMakeLists.txt48
-rw-r--r--examples/network/secureudpclient/CMakeLists.txt45
-rw-r--r--examples/network/secureudpserver/CMakeLists.txt45
-rw-r--r--examples/network/threadedfortuneserver/CMakeLists.txt42
-rw-r--r--examples/network/torrent/.prev_CMakeLists.txt73
-rw-r--r--examples/network/torrent/CMakeLists.txt76
-rw-r--r--examples/qpa/qrasterwindow/CMakeLists.txt33
-rw-r--r--examples/qpa/windows/CMakeLists.txt42
-rw-r--r--examples/qtconcurrent/imagescaling/CMakeLists.txt38
-rw-r--r--examples/qtconcurrent/map/.prev_CMakeLists.txt26
-rw-r--r--examples/qtconcurrent/map/CMakeLists.txt39
-rw-r--r--examples/qtconcurrent/progressdialog/CMakeLists.txt36
-rw-r--r--examples/qtconcurrent/runfunction/CMakeLists.txt37
-rw-r--r--examples/qtconcurrent/wordcount/CMakeLists.txt37
-rw-r--r--examples/qtestlib/tutorial1/CMakeLists.txt35
-rw-r--r--examples/qtestlib/tutorial2/CMakeLists.txt35
-rw-r--r--examples/qtestlib/tutorial3/CMakeLists.txt35
-rw-r--r--examples/qtestlib/tutorial4/CMakeLists.txt35
-rw-r--r--examples/qtestlib/tutorial5/CMakeLists.txt35
-rw-r--r--examples/sql/books/CMakeLists.txt54
-rw-r--r--examples/sql/cachedtable/CMakeLists.txt40
-rw-r--r--examples/sql/drilldown/CMakeLists.txt51
-rw-r--r--examples/sql/masterdetail/CMakeLists.txt52
-rw-r--r--examples/sql/querymodel/CMakeLists.txt42
-rw-r--r--examples/sql/relationaltablemodel/CMakeLists.txt38
-rw-r--r--examples/sql/sqlbrowser/CMakeLists.txt51
-rw-r--r--examples/sql/sqlwidgetmapper/CMakeLists.txt38
-rw-r--r--examples/sql/tablemodel/CMakeLists.txt38
-rw-r--r--examples/widgets/animation/animatedtiles/CMakeLists.txt43
-rw-r--r--examples/widgets/animation/easing/CMakeLists.txt45
-rw-r--r--examples/widgets/animation/moveblocks/CMakeLists.txt35
-rw-r--r--examples/widgets/animation/states/CMakeLists.txt42
-rw-r--r--examples/widgets/animation/stickman/CMakeLists.txt51
-rw-r--r--examples/widgets/animation/sub-attaq/CMakeLists.txt169
-rw-r--r--examples/widgets/desktop/screenshot/CMakeLists.txt35
-rw-r--r--examples/widgets/desktop/systray/CMakeLists.txt41
-rw-r--r--examples/widgets/dialogs/classwizard/CMakeLists.txt44
-rw-r--r--examples/widgets/dialogs/extension/CMakeLists.txt35
-rw-r--r--examples/widgets/dialogs/findfiles/CMakeLists.txt35
-rw-r--r--examples/widgets/dialogs/licensewizard/CMakeLists.txt42
-rw-r--r--examples/widgets/dialogs/standarddialogs/CMakeLists.txt35
-rw-r--r--examples/widgets/dialogs/tabdialog/CMakeLists.txt35
-rw-r--r--examples/widgets/dialogs/trivialwizard/CMakeLists.txt35
-rw-r--r--examples/widgets/draganddrop/draggableicons/CMakeLists.txt41
-rw-r--r--examples/widgets/draganddrop/draggabletext/CMakeLists.txt39
-rw-r--r--examples/widgets/draganddrop/dropsite/CMakeLists.txt37
-rw-r--r--examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt41
-rw-r--r--examples/widgets/draganddrop/puzzle/CMakeLists.txt44
-rw-r--r--examples/widgets/effects/blurpicker/CMakeLists.txt48
-rw-r--r--examples/widgets/effects/fademessage/CMakeLists.txt38
-rw-r--r--examples/widgets/gestures/imagegestures/CMakeLists.txt37
-rw-r--r--examples/widgets/graphicsview/anchorlayout/CMakeLists.txt35
-rw-r--r--examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt41
-rw-r--r--examples/widgets/graphicsview/boxes/CMakeLists.txt82
-rw-r--r--examples/widgets/graphicsview/chip/CMakeLists.txt64
-rw-r--r--examples/widgets/graphicsview/collidingmice/CMakeLists.txt39
-rw-r--r--examples/widgets/graphicsview/diagramscene/CMakeLists.txt60
-rw-r--r--examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt40
-rw-r--r--examples/widgets/graphicsview/elasticnodes/CMakeLists.txt39
-rw-r--r--examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt45
-rw-r--r--examples/widgets/graphicsview/flowlayout/CMakeLists.txt38
-rw-r--r--examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt45
-rw-r--r--examples/widgets/graphicsview/padnavigator/CMakeLists.txt64
-rw-r--r--examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt35
-rw-r--r--examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt42
-rw-r--r--examples/widgets/itemviews/addressbook/CMakeLists.txt43
-rw-r--r--examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/chart/CMakeLists.txt43
-rw-r--r--examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt37
-rw-r--r--examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt43
-rw-r--r--examples/widgets/itemviews/dirview/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/editabletreemodel/CMakeLists.txt45
-rw-r--r--examples/widgets/itemviews/fetchmore/CMakeLists.txt37
-rw-r--r--examples/widgets/itemviews/flattreeview/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/frozencolumn/CMakeLists.txt39
-rw-r--r--examples/widgets/itemviews/interview/CMakeLists.txt44
-rw-r--r--examples/widgets/itemviews/pixelator/CMakeLists.txt49
-rw-r--r--examples/widgets/itemviews/puzzle/CMakeLists.txt43
-rw-r--r--examples/widgets/itemviews/simpledommodel/CMakeLists.txt42
-rw-r--r--examples/widgets/itemviews/simpletreemodel/CMakeLists.txt41
-rw-r--r--examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt35
-rw-r--r--examples/widgets/itemviews/spreadsheet/CMakeLists.txt53
-rw-r--r--examples/widgets/itemviews/stardelegate/CMakeLists.txt39
-rw-r--r--examples/widgets/itemviews/storageview/CMakeLists.txt41
-rw-r--r--examples/widgets/layouts/basiclayouts/CMakeLists.txt35
-rw-r--r--examples/widgets/layouts/borderlayout/CMakeLists.txt37
-rw-r--r--examples/widgets/layouts/dynamiclayouts/CMakeLists.txt35
-rw-r--r--examples/widgets/layouts/flowlayout/CMakeLists.txt37
-rw-r--r--examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt36
-rw-r--r--examples/widgets/mac/qmacnativewidget/CMakeLists.txt36
-rw-r--r--examples/widgets/mainwindows/application/CMakeLists.txt44
-rw-r--r--examples/widgets/mainwindows/dockwidgets/CMakeLists.txt50
-rw-r--r--examples/widgets/mainwindows/mainwindow/CMakeLists.txt48
-rw-r--r--examples/widgets/mainwindows/mdi/CMakeLists.txt46
-rw-r--r--examples/widgets/mainwindows/menus/CMakeLists.txt35
-rw-r--r--examples/widgets/mainwindows/sdi/CMakeLists.txt44
-rw-r--r--examples/widgets/painting/affine/CMakeLists.txt46
-rw-r--r--examples/widgets/painting/basicdrawing/CMakeLists.txt42
-rw-r--r--examples/widgets/painting/composition/CMakeLists.txt45
-rw-r--r--examples/widgets/painting/concentriccircles/CMakeLists.txt37
-rw-r--r--examples/widgets/painting/deform/CMakeLists.txt44
-rw-r--r--examples/widgets/painting/fontsampler/CMakeLists.txt43
-rw-r--r--examples/widgets/painting/gradients/CMakeLists.txt43
-rw-r--r--examples/widgets/painting/imagecomposition/CMakeLists.txt40
-rw-r--r--examples/widgets/painting/painterpaths/CMakeLists.txt42
-rw-r--r--examples/widgets/painting/pathstroke/CMakeLists.txt45
-rw-r--r--examples/widgets/painting/shared/CMakeLists.txt53
-rw-r--r--examples/widgets/painting/transformations/CMakeLists.txt37
-rw-r--r--examples/widgets/richtext/calendar/CMakeLists.txt35
-rw-r--r--examples/widgets/richtext/orderform/CMakeLists.txt45
-rw-r--r--examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt37
-rw-r--r--examples/widgets/richtext/textedit/CMakeLists.txt100
-rw-r--r--examples/widgets/scroller/graphicsview/CMakeLists.txt34
-rw-r--r--examples/widgets/statemachine/eventtransitions/CMakeLists.txt35
-rw-r--r--examples/widgets/statemachine/factorial/CMakeLists.txt36
-rw-r--r--examples/widgets/statemachine/pingpong/CMakeLists.txt36
-rw-r--r--examples/widgets/statemachine/rogue/CMakeLists.txt37
-rw-r--r--examples/widgets/statemachine/trafficlight/CMakeLists.txt35
-rw-r--r--examples/widgets/statemachine/twowaybutton/CMakeLists.txt35
-rw-r--r--examples/widgets/tools/CMakeLists.txt4
-rw-r--r--examples/widgets/tools/codecs/CMakeLists.txt44
-rw-r--r--examples/widgets/tools/completer/CMakeLists.txt42
-rw-r--r--examples/widgets/tools/customcompleter/CMakeLists.txt41
-rw-r--r--examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt45
-rw-r--r--examples/widgets/tools/echoplugin/plugin/CMakeLists.txt26
-rw-r--r--examples/widgets/tools/i18n/CMakeLists.txt55
-rw-r--r--examples/widgets/tools/plugandpaint/app/CMakeLists.txt50
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt37
-rw-r--r--examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt30
-rw-r--r--examples/widgets/tools/regexp/CMakeLists.txt35
-rw-r--r--examples/widgets/tools/regularexpression/CMakeLists.txt39
-rw-r--r--examples/widgets/tools/settingseditor/CMakeLists.txt42
-rw-r--r--examples/widgets/tools/styleplugin/CMakeLists.txt15
-rw-r--r--examples/widgets/tools/styleplugin/plugin/CMakeLists.txt35
-rw-r--r--examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt42
-rw-r--r--examples/widgets/tools/treemodelcompleter/CMakeLists.txt40
-rw-r--r--examples/widgets/tools/undo/CMakeLists.txt62
-rw-r--r--examples/widgets/tools/undoframework/CMakeLists.txt45
-rw-r--r--examples/widgets/touch/dials/CMakeLists.txt37
-rw-r--r--examples/widgets/touch/fingerpaint/CMakeLists.txt47
-rw-r--r--examples/widgets/touch/knobs/CMakeLists.txt35
-rw-r--r--examples/widgets/touch/pinchzoom/CMakeLists.txt41
-rw-r--r--examples/widgets/tutorials/addressbook/part1/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/addressbook/part2/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/addressbook/part3/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/addressbook/part4/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/addressbook/part5/CMakeLists.txt38
-rw-r--r--examples/widgets/tutorials/addressbook/part6/CMakeLists.txt38
-rw-r--r--examples/widgets/tutorials/addressbook/part7/CMakeLists.txt38
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt38
-rw-r--r--examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt36
-rw-r--r--examples/widgets/tutorials/notepad/CMakeLists.txt68
-rw-r--r--examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt35
-rw-r--r--examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/analogclock/CMakeLists.txt36
-rw-r--r--examples/widgets/widgets/calculator/CMakeLists.txt37
-rw-r--r--examples/widgets/widgets/calendarwidget/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/charactermap/CMakeLists.txt37
-rw-r--r--examples/widgets/widgets/codeeditor/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/digitalclock/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/elidedlabel/CMakeLists.txt43
-rw-r--r--examples/widgets/widgets/groupbox/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/icons/CMakeLists.txt48
-rw-r--r--examples/widgets/widgets/imageviewer/CMakeLists.txt45
-rw-r--r--examples/widgets/widgets/lineedits/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/mousebuttons/CMakeLists.txt38
-rw-r--r--examples/widgets/widgets/movie/CMakeLists.txt36
-rw-r--r--examples/widgets/widgets/scribble/CMakeLists.txt47
-rw-r--r--examples/widgets/widgets/shapedclock/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/sliders/CMakeLists.txt37
-rw-r--r--examples/widgets/widgets/spinboxes/CMakeLists.txt35
-rw-r--r--examples/widgets/widgets/styles/CMakeLists.txt42
-rw-r--r--examples/widgets/widgets/stylesheet/CMakeLists.txt77
-rw-r--r--examples/widgets/widgets/tablet/CMakeLists.txt46
-rw-r--r--examples/widgets/widgets/tetrix/CMakeLists.txt39
-rw-r--r--examples/widgets/widgets/tooltips/CMakeLists.txt43
-rw-r--r--examples/widgets/widgets/validators/CMakeLists.txt47
-rw-r--r--examples/widgets/widgets/wiggly/CMakeLists.txt37
-rw-r--r--examples/widgets/widgets/windowflags/CMakeLists.txt37
-rw-r--r--examples/widgets/windowcontainer/CMakeLists.txt40
-rw-r--r--examples/xml/CMakeLists.txt14
-rw-r--r--examples/xml/dombookmarks/CMakeLists.txt29
-rw-r--r--examples/xml/htmlinfo/CMakeLists.txt25
-rw-r--r--examples/xml/rsslisting/CMakeLists.txt30
-rw-r--r--examples/xml/saxbookmarks/CMakeLists.txt30
-rw-r--r--examples/xml/streambookmarks/CMakeLists.txt30
-rw-r--r--examples/xml/xmlstreamlint/CMakeLists.txt26
-rw-r--r--src/corelib/Qt5CoreConfigExtras.cmake.in41
256 files changed, 6056 insertions, 4251 deletions
diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake
index 7eaa8d3cb0..bd2a8a7ba3 100644
--- a/cmake/QtBaseGlobalTargets.cmake
+++ b/cmake/QtBaseGlobalTargets.cmake
@@ -121,6 +121,12 @@ qt_copy_or_install(FILES
cmake/QtPluginDependencies.cmake.in
DESTINATION "${__GlobalConfig_install_dir}"
)
+if(QT_WILL_INSTALL)
+ # NOTE: QtFeature.cmake is included by the Qt module config files unconditionally
+ # In a prefix build, QtFeature.cmake is not copied to the build dir by default
+ # Thus do it explicitly in that case so we can use the module config files in the examples
+ file(COPY cmake/QtFeature.cmake DESTINATION "${__GlobalConfig_install_dir}")
+endif()
# TODO: Check whether this is the right place to install these
diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake
index 3b2079fbdf..664d176589 100644
--- a/cmake/QtBuild.cmake
+++ b/cmake/QtBuild.cmake
@@ -1232,7 +1232,7 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})")
DESTINATION "${config_install_dir}"
COMPONENT Devel
)
- qt_non_prefix_copy(COPY ${extra_cmake_files} DESTINATION "${config_install_dir}")
+ file(COPY ${extra_cmake_files} DESTINATION "${config_build_dir}")
set(exported_targets ${target} ${target_private})
set(export_name "${INSTALL_CMAKE_NAMESPACE}${target}Targets")
diff --git a/cmake/QtConfig.cmake.in b/cmake/QtConfig.cmake.in
index db9ac360b5..0ea33214eb 100644
--- a/cmake/QtConfig.cmake.in
+++ b/cmake/QtConfig.cmake.in
@@ -7,9 +7,16 @@ endif()
get_filename_component(_qt_cmake_dir "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
-include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Targets.cmake")
-
-include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@VersionlessTargets.cmake")
+if (NOT QT_NO_CREATE_TARGETS)
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@VersionlessTargets.cmake")
+else()
+ # For examples using `find_package(...)` inside their CMakeLists.txt files:
+ # Make CMake's AUTOGEN detect this Qt version properly
+ set_directory_properties(PROPERTIES
+ QT_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
+ QT_VERSION_MINOR @PROJECT_VERSION_MINOR@)
+endif()
# if (NOT @INSTALL_CMAKE_NAMESPACE@_FIND_COMPONENTS)
# set(@INSTALL_CMAKE_NAMESPACE@_NOT_FOUND_MESSAGE "The Qt package requires at least one component")
diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in
index 7c6c6545de..fcf5ba4644 100644
--- a/cmake/QtModuleConfig.cmake.in
+++ b/cmake/QtModuleConfig.cmake.in
@@ -9,14 +9,16 @@ get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
@extra_cmake_code@
# Extra cmake code end
-# Find required dependencies, if any.
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
- include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+if (NOT QT_NO_CREATE_TARGETS)
+ # Find required dependencies, if any.
+ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ endif()
+
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake")
endif()
-include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
-
-include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@VersionlessTargets.cmake")
foreach(extra_cmake_include @extra_cmake_includes@)
include("${CMAKE_CURRENT_LIST_DIR}/${extra_cmake_include}")
endforeach()
diff --git a/cmake/QtModuleToolsConfig.cmake.in b/cmake/QtModuleToolsConfig.cmake.in
index afc6de5b19..6d7ff9c8fa 100644
--- a/cmake/QtModuleToolsConfig.cmake.in
+++ b/cmake/QtModuleToolsConfig.cmake.in
@@ -2,11 +2,13 @@
include(CMakeFindDependencyMacro)
-# Find required dependencies, if any.
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
- include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
-endif()
+if (NOT QT_NO_CREATE_TARGETS)
+ # Find required dependencies, if any.
+ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Dependencies.cmake")
+ endif()
-include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@Targets.cmake")
+endif()
@extra_cmake_statements@
diff --git a/cmake/QtPluginConfig.cmake.in b/cmake/QtPluginConfig.cmake.in
index b212d08764..43b5b4d617 100644
--- a/cmake/QtPluginConfig.cmake.in
+++ b/cmake/QtPluginConfig.cmake.in
@@ -5,9 +5,11 @@ include(CMakeFindDependencyMacro)
get_filename_component(_import_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_import_prefix "${_import_prefix}" REALPATH)
-# Find required dependencies, if any.
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
- include("${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
-endif()
+if (NOT QT_NO_CREATE_TARGETS)
+ # Find required dependencies, if any.
+ if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@target@Dependencies.cmake")
+ endif()
-include("${CMAKE_CURRENT_LIST_DIR}/@target@Targets.cmake")
+ include("${CMAKE_CURRENT_LIST_DIR}/@target@Targets.cmake")
+endif()
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index cdbf0c411d..5f61a098bd 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,3 +1,25 @@
+# special case begin
+cmake_minimum_required(VERSION 3.14.0)
+
+project(QtBaseExamples LANGUAGES CXX C ASM)
+
+# Check whether this project is built as part of a Qt build
+if (CMAKE_PROJECT_NAME STREQUAL "QtBaseExamples")
+ set(QT_STANDALONE_EXAMPLES_BUILD TRUE)
+endif()
+
+if (NOT QT_STANDALONE_EXAMPLES_BUILD)
+ # It is part of a Qt build => Use the CMake config files from the binary dir
+ list(APPEND CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}")
+ # Also make sure the CMake config files do not recreate the already-existing targets
+ set(QT_NO_CREATE_TARGETS TRUE)
+endif()
+
+find_package(Qt5 COMPONENTS DBus Network Test Concurrent Sql Widgets Xml Gui)
+# special case end
+
+# Generated from examples.pro.
+
add_subdirectory(corelib)
add_subdirectory(embedded)
add_subdirectory(qpa)
@@ -5,21 +27,62 @@ add_subdirectory(qpa)
if(TARGET Qt::DBus)
add_subdirectory(dbus)
endif()
+
if(TARGET Qt::Network)
add_subdirectory(network)
endif()
+
if(TARGET Qt::Test)
add_subdirectory(qtestlib)
endif()
+
if(TARGET Qt::Concurrent)
add_subdirectory(qtconcurrent)
endif()
+
if(TARGET Qt::Sql)
add_subdirectory(sql)
endif()
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(widgets)
+endif()
+
+if(TARGET Qt::Xml)
+ add_subdirectory(xml)
+endif()
+
if(TARGET Qt::Gui)
add_subdirectory(gui)
+
+ if(QT_FEATURE_opengl)
+# add_subdirectory(opengl) # special case: removed
+ endif()
+
+ if(QT_FEATURE_vulkan)
+# add_subdirectory(vulkan) # special case: removed
+ endif()
endif()
-if(TARGET Qt::Widgets)
- add_subdirectory(widgets)
+
+# special case begin
+if (NOT QT_STANDALONE_EXAMPLES_BUILD)
+ # We use AUTOMOC/UIC/RCC in the examples. Make sure to not fail on a fresh Qt build, that e.g. the moc binary does not exist yet.
+
+ # This function gets all targets below this directory
+ function(get_all_targets _result _dir)
+ get_property(_subdirs DIRECTORY "${_dir}" PROPERTY SUBDIRECTORIES)
+ foreach(_subdir IN LISTS _subdirs)
+ get_all_targets(${_result} "${_subdir}")
+ endforeach()
+ get_property(_sub_targets DIRECTORY "${_dir}" PROPERTY BUILDSYSTEM_TARGETS)
+ set(${_result} ${${_result}} ${_sub_targets} PARENT_SCOPE)
+ endfunction()
+
+ get_all_targets(targets "${CMAKE_CURRENT_SOURCE_DIR}")
+
+ foreach(target ${targets})
+ qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS "moc" "uic" "rcc")
+ endforeach()
+
endif()
+# special case end
diff --git a/examples/corelib/CMakeLists.txt b/examples/corelib/CMakeLists.txt
index 3b61d307d9..5e24def251 100644
--- a/examples/corelib/CMakeLists.txt
+++ b/examples/corelib/CMakeLists.txt
@@ -3,5 +3,8 @@
add_subdirectory(ipc)
add_subdirectory(mimetypes)
add_subdirectory(serialization)
-add_subdirectory(threads)
add_subdirectory(tools)
+
+if(QT_FEATURE_thread)
+ add_subdirectory(threads)
+endif()
diff --git a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
index 39ef3f4e3f..ae0492fe26 100644
--- a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from localfortuneclient.pro.
-#####################################################################
-## localfortuneclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(localfortuneclient LANGUAGES CXX)
-add_qt_executable(localfortuneclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient"
- SOURCES
- client.cpp client.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(localfortuneclient WIN32 MACOSX_BUNDLE
+ client.cpp client.h
+ main.cpp
+)
+target_link_libraries(localfortuneclient PUBLIC
+ 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 e94028413e..11fcf4e297 100644
--- a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
+++ b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from localfortuneserver.pro.
-#####################################################################
-## localfortuneserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(localfortuneserver LANGUAGES CXX)
-add_qt_executable(localfortuneserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver"
- SOURCES
- main.cpp
- server.cpp server.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(localfortuneserver WIN32 MACOSX_BUNDLE
+ main.cpp
+ server.cpp server.h
+)
+target_link_libraries(localfortuneserver PUBLIC
+ 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 a987433302..f4e3780348 100644
--- a/examples/corelib/ipc/sharedmemory/CMakeLists.txt
+++ b/examples/corelib/ipc/sharedmemory/CMakeLists.txt
@@ -1,21 +1,26 @@
# Generated from sharedmemory.pro.
-#####################################################################
-## sharedmemory Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sharedmemory LANGUAGES CXX)
-add_qt_executable(sharedmemory
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory"
- SOURCES
- dialog.cpp dialog.h dialog.ui
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:.:sharedmemory.pro:<TRUE>:
-# EXAMPLE_FILES = "*.png"
+add_executable(sharedmemory WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h dialog.ui
+ main.cpp
+)
+target_link_libraries(sharedmemory PUBLIC
+ 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 4bd2b5ca6a..05e68e6d67 100644
--- a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
+++ b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
@@ -1,21 +1,27 @@
# Generated from mimetypebrowser.pro.
-#####################################################################
-## mimetypebrowser Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mimetypebrowser LANGUAGES CXX)
-add_qt_executable(mimetypebrowser
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- mimetypemodel.cpp mimetypemodel.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:mimetypebrowser.pro:<NONE>:
-# CONFIG = "-app_bundle" "c++11"
-# TEMPLATE = "app"
+add_executable(mimetypebrowser WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mimetypemodel.cpp mimetypemodel.h
+)
+target_link_libraries(mimetypebrowser PUBLIC
+ 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 b62181a2b7..f9f6be09d9 100644
--- a/examples/corelib/serialization/cbordump/CMakeLists.txt
+++ b/examples/corelib/serialization/cbordump/CMakeLists.txt
@@ -1,19 +1,26 @@
# Generated from cbordump.pro.
-#####################################################################
-## cbordump Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(cbordump LANGUAGES CXX)
-add_qt_executable(cbordump
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump"
- SOURCES
- main.cpp
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:cbordump.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+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 4dffb69c5b..f03d3aa9dc 100644
--- a/examples/corelib/serialization/convert/CMakeLists.txt
+++ b/examples/corelib/serialization/convert/CMakeLists.txt
@@ -1,26 +1,33 @@
# Generated from convert.pro.
-#####################################################################
-## convert Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(convert LANGUAGES CXX)
-add_qt_executable(convert
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert"
- SOURCES
- cborconverter.cpp cborconverter.h
- converter.h
- datastreamconverter.cpp datastreamconverter.h
- jsonconverter.cpp jsonconverter.h
- main.cpp
- nullconverter.cpp nullconverter.h
- textconverter.cpp textconverter.h
- xmlconverter.cpp xmlconverter.h
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:convert.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(convert
+ cborconverter.cpp cborconverter.h
+ converter.h
+ datastreamconverter.cpp datastreamconverter.h
+ jsonconverter.cpp jsonconverter.h
+ main.cpp
+ nullconverter.cpp nullconverter.h
+ textconverter.cpp textconverter.h
+ 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 175fca270f..637613fef8 100644
--- a/examples/corelib/serialization/savegame/CMakeLists.txt
+++ b/examples/corelib/serialization/savegame/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from savegame.pro.
-#####################################################################
-## savegame Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(savegame LANGUAGES CXX)
-add_qt_executable(savegame
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame"
- SOURCES
- character.cpp character.h
- game.cpp game.h
- level.cpp level.h
- main.cpp
- LIBRARIES
- # Remove: gui
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 1:.:savegame.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(savegame
+ character.cpp character.h
+ game.cpp game.h
+ level.cpp level.h
+ 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 00f27bacd9..9b5995b1a5 100644
--- a/examples/corelib/threads/mandelbrot/CMakeLists.txt
+++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt
@@ -1,25 +1,27 @@
# Generated from mandelbrot.pro.
-#####################################################################
-## mandelbrot Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mandelbrot LANGUAGES CXX)
-add_qt_executable(mandelbrot
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot"
- SOURCES
- main.cpp
- mandelbrotwidget.cpp mandelbrotwidget.h
- renderthread.cpp renderthread.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
-extend_target(mandelbrot CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS
- LIBRARIES
- m
+add_executable(mandelbrot WIN32 MACOSX_BUNDLE
+ main.cpp
+ mandelbrotwidget.cpp mandelbrotwidget.h
+ renderthread.cpp renderthread.h
+)
+target_link_libraries(mandelbrot PUBLIC
+ Qt::Widgets
+)
+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 b86092bf26..9fc8234e4d 100644
--- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
+++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt
@@ -1,18 +1,28 @@
# Generated from queuedcustomtype.pro.
-#####################################################################
-## queuedcustomtype Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(queuedcustomtype LANGUAGES CXX)
-add_qt_executable(queuedcustomtype
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype"
- SOURCES
- block.cpp block.h
- main.cpp
- renderthread.cpp renderthread.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(queuedcustomtype WIN32 MACOSX_BUNDLE
+ block.cpp block.h
+ main.cpp
+ renderthread.cpp renderthread.h
+ window.cpp window.h
+)
+target_link_libraries(queuedcustomtype PUBLIC
+ 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 d94f1ba5b4..51638e0ff8 100644
--- a/examples/corelib/threads/semaphores/CMakeLists.txt
+++ b/examples/corelib/threads/semaphores/CMakeLists.txt
@@ -1,15 +1,25 @@
# Generated from semaphores.pro.
-#####################################################################
-## semaphores Binary:
-#####################################################################
-
-add_qt_executable(semaphores
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores"
- SOURCES
- semaphores.cpp
-)
+cmake_minimum_required(VERSION 3.14)
+project(semaphores LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:semaphores.pro:<NONE>:
-# CONFIG = "-app_bundle" "console"
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(semaphores
+ semaphores.cpp
+)
+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 0a347c1cdd..4d3e61050c 100644
--- a/examples/corelib/threads/waitconditions/CMakeLists.txt
+++ b/examples/corelib/threads/waitconditions/CMakeLists.txt
@@ -1,15 +1,25 @@
# Generated from waitconditions.pro.
-#####################################################################
-## waitconditions Binary:
-#####################################################################
-
-add_qt_executable(waitconditions
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions"
- SOURCES
- waitconditions.cpp
-)
+cmake_minimum_required(VERSION 3.14)
+project(waitconditions LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:waitconditions.pro:<NONE>:
-# CONFIG = "-moc" "-app_bundle" "console"
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(waitconditions
+ waitconditions.cpp
+)
+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 68afb7221d..62214a46d5 100644
--- a/examples/corelib/tools/contiguouscache/CMakeLists.txt
+++ b/examples/corelib/tools/contiguouscache/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from contiguouscache.pro.
-#####################################################################
-## contiguouscache Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(contiguouscache LANGUAGES CXX)
-add_qt_executable(contiguouscache
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache"
- SOURCES
- main.cpp
- randomlistmodel.cpp randomlistmodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(contiguouscache WIN32 MACOSX_BUNDLE
+ main.cpp
+ randomlistmodel.cpp randomlistmodel.h
+)
+target_link_libraries(contiguouscache PUBLIC
+ 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 e26846da82..394534f5ee 100644
--- a/examples/corelib/tools/customtype/CMakeLists.txt
+++ b/examples/corelib/tools/customtype/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from customtype.pro.
-#####################################################################
-## customtype Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customtype LANGUAGES CXX)
-add_qt_executable(customtype
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype"
- SOURCES
- main.cpp
- message.cpp message.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customtype WIN32 MACOSX_BUNDLE
+ main.cpp
+ message.cpp message.h
+)
+target_link_libraries(customtype PUBLIC
+ 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 a069f73507..53a39c57ce 100644
--- a/examples/corelib/tools/customtypesending/CMakeLists.txt
+++ b/examples/corelib/tools/customtypesending/CMakeLists.txt
@@ -1,17 +1,27 @@
# Generated from customtypesending.pro.
-#####################################################################
-## customtypesending Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customtypesending LANGUAGES CXX)
-add_qt_executable(customtypesending
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending"
- SOURCES
- main.cpp
- message.cpp message.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customtypesending WIN32 MACOSX_BUNDLE
+ main.cpp
+ message.cpp message.h
+ window.cpp window.h
+)
+target_link_libraries(customtypesending PUBLIC
+ Qt::Widgets
+)
+install(TARGETS customtypesending
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt
index 9f321bbce3..26388c51eb 100644
--- a/examples/dbus/chat/CMakeLists.txt
+++ b/examples/dbus/chat/CMakeLists.txt
@@ -1,24 +1,43 @@
# Generated from chat.pro.
-#####################################################################
-## chat Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(chat LANGUAGES CXX)
-add_qt_executable(chat
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/chat"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/chat"
- SOURCES
- chat.cpp chat.h
- chatmainwindow.ui
- chatsetnickname.ui
- DBUS_ADAPTOR_SOURCES
- org.example.chat.xml
- DBUS_INTERFACE_SOURCES
- org.example.chat.xml
- PUBLIC_LIBRARIES
- Qt::DBus
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
+find_package(Qt5 COMPONENTS Widgets)
+
+# special case begin
+set(chat_SRCS)
+qt5_add_dbus_interface(chat_SRCS
+ org.example.chat.xml
+ chat_interface
+)
+qt5_add_dbus_adaptor(chat_SRCS
+ org.example.chat.xml
+ qobject.h
+ QObject
+ chat_adaptor
+)
+# special case end
+add_executable(chat WIN32 MACOSX_BUNDLE
+ chat.cpp chat.h
+ chatmainwindow.ui
+ chatsetnickname.ui
+ ${chat_SRCS} # special case
+)
+target_link_libraries(chat PUBLIC
+ Qt::DBus
+ Qt::Widgets
+)
+install(TARGETS chat
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt
index cccb9584af..543af8491b 100644
--- a/examples/dbus/complexpingpong/CMakeLists.txt
+++ b/examples/dbus/complexpingpong/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from complexpong.pro.
-#####################################################################
-## complexpong Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(complexpong LANGUAGES CXX)
-add_qt_executable(complexpong
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong"
- SOURCES
- complexpong.cpp complexpong.h
- LIBRARIES
- # Remove: gui
- Qt::DBus
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
+
+add_executable(complexpong WIN32 MACOSX_BUNDLE
+ complexpong.cpp complexpong.h
+)
+target_link_libraries(complexpong PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS complexpong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt
index eb622b0ef6..5fe935f24a 100644
--- a/examples/dbus/listnames/CMakeLists.txt
+++ b/examples/dbus/listnames/CMakeLists.txt
@@ -1,22 +1,26 @@
# Generated from listnames.pro.
-#####################################################################
-## listnames Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(listnames LANGUAGES CXX)
-add_qt_executable(listnames
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/listnames"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/listnames"
- SOURCES
- listnames.cpp
- LIBRARIES
- # Remove: gui
- Qt::DBus
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS DBus)
-#### Keys ignored in scope 2:.:listnames.pro:WIN32:
-# CONFIG = "console"
+add_executable(listnames WIN32 MACOSX_BUNDLE
+ listnames.cpp
+)
+target_link_libraries(listnames PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS listnames
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt
index 0979c8d487..e82fe78c51 100644
--- a/examples/dbus/pingpong/CMakeLists.txt
+++ b/examples/dbus/pingpong/CMakeLists.txt
@@ -1,35 +1,27 @@
-# Generated from pingpong.pro.
+# Generated from pong.pro.
-#####################################################################
-## ping Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(pong LANGUAGES CXX)
-add_qt_executable(ping
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/pingpong"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/pingpong"
- SOURCES
- ping.cpp
- ping-common.h
- LIBRARIES
- # Remove: gui
- Qt::DBus
-)
-#####################################################################
-## pong Binary:
-#####################################################################
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-add_qt_executable(pong
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/pingpong"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/pingpong"
- SOURCES
- ping-common.h
- pong.cpp pong.h
- LIBRARIES
- # Remove: gui
- Qt::DBus
-)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
-if(WIN32)
-endif()
+add_executable(pong WIN32 MACOSX_BUNDLE
+ ping-common.h
+ pong.cpp pong.h
+)
+target_link_libraries(pong PUBLIC
+ # Remove: gui
+ Qt::DBus
+)
+install(TARGETS pong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
index a8aed5413a..9532d0ccee 100644
--- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt
@@ -1,19 +1,38 @@
# Generated from car.pro.
-#####################################################################
-## car Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(car LANGUAGES CXX)
-add_qt_executable(car
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car"
- SOURCES
- car.cpp car.h
- main.cpp
- DBUS_ADAPTOR_SOURCES
- car.xml
- LIBRARIES
- Qt::DBus
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
+find_package(Qt5 COMPONENTS Widgets)
+
+# special case begin
+set(car_SRCS)
+qt5_add_dbus_adaptor(car_SRCS
+ car.xml
+ car.h
+ Car
+ car_adaptor
+)
+# special case end
+add_executable(car WIN32 MACOSX_BUNDLE
+ car.cpp car.h
+ main.cpp
+ ${car_SRCS} # special case
+)
+target_link_libraries(car PUBLIC
+ Qt::DBus
+ Qt::Widgets
+)
+install(TARGETS car
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
index 3f360fa51b..00bf809392 100644
--- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
+++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
@@ -1,21 +1,36 @@
# Generated from controller.pro.
-#####################################################################
-## controller Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(controller LANGUAGES CXX)
-add_qt_executable(controller
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controller"
- SOURCES
- controller.cpp controller.h controller.ui
- main.cpp
- DBUS_INTERFACE_SOURCES
- car.xml
- PUBLIC_LIBRARIES
- Qt::DBus
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS DBus)
+find_package(Qt5 COMPONENTS Widgets)
+
+# special case begin
+set(controller_SRCS)
+qt5_add_dbus_interface(controller_SRCS
+ car.xml
+ car_interface
+)
+# special case end
+add_executable(controller WIN32 MACOSX_BUNDLE
+ controller.cpp controller.h controller.ui
+ main.cpp
+ ${controller_SRCS} # special case
+)
+target_link_libraries(controller PUBLIC
+ Qt::DBus
+ 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 3786ed38a4..bc94d6809a 100644
--- a/examples/embedded/digiflip/CMakeLists.txt
+++ b/examples/embedded/digiflip/CMakeLists.txt
@@ -1,15 +1,25 @@
# Generated from digiflip.pro.
-#####################################################################
-## digiflip Binary:
-#####################################################################
-
-add_qt_executable(digiflip
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/digiflip"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/digiflip"
- SOURCES
- digiflip.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(digiflip LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(digiflip WIN32 MACOSX_BUNDLE
+ digiflip.cpp
+)
+target_link_libraries(digiflip PUBLIC
+ 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 20f8eca9f5..8d5d9878f0 100644
--- a/examples/embedded/flickable/CMakeLists.txt
+++ b/examples/embedded/flickable/CMakeLists.txt
@@ -1,16 +1,26 @@
# Generated from flickable.pro.
-#####################################################################
-## flickable Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(flickable LANGUAGES CXX)
-add_qt_executable(flickable
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/flickable"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/flickable"
- SOURCES
- flickable.cpp flickable.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(flickable WIN32 MACOSX_BUNDLE
+ flickable.cpp flickable.h
+ main.cpp
+)
+target_link_libraries(flickable PUBLIC
+ Qt::Widgets
+)
+install(TARGETS flickable
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/embedded/flightinfo/CMakeLists.txt b/examples/embedded/flightinfo/CMakeLists.txt
index a4276bf2d8..9afc98df76 100644
--- a/examples/embedded/flightinfo/CMakeLists.txt
+++ b/examples/embedded/flightinfo/CMakeLists.txt
@@ -1,27 +1,29 @@
# Generated from flightinfo.pro.
-#####################################################################
-## flightinfo Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(flightinfo LANGUAGES CXX)
-add_qt_executable(flightinfo
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/flightinfo"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/flightinfo"
- SOURCES
- flightinfo.cpp
- form.ui
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(flightinfo "flightinfo" PREFIX "/" FILES
- aircraft.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:.:flightinfo.pro:<TRUE>:
-# TEMPLATE = "app"
+add_executable(flightinfo WIN32 MACOSX_BUNDLE
+ flightinfo.cpp
+ form.ui
+ flightinfo.qrc # special case: add
+)
+target_link_libraries(flightinfo PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+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 4779d07adc..35171451bf 100644
--- a/examples/embedded/lightmaps/CMakeLists.txt
+++ b/examples/embedded/lightmaps/CMakeLists.txt
@@ -1,22 +1,30 @@
# Generated from lightmaps.pro.
-#####################################################################
-## lightmaps Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(lightmaps LANGUAGES CXX)
-add_qt_executable(lightmaps
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/lightmaps"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/lightmaps"
- SOURCES
- lightmaps.cpp lightmaps.h
- main.cpp
- mapzoom.cpp mapzoom.h
- slippymap.cpp slippymap.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:lightmaps.pro:<NONE>:
-# TEMPLATE = "app"
+add_executable(lightmaps WIN32 MACOSX_BUNDLE
+ lightmaps.cpp lightmaps.h
+ main.cpp
+ mapzoom.cpp mapzoom.h
+ slippymap.cpp slippymap.h
+)
+target_link_libraries(lightmaps PUBLIC
+ 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 3757bb756a..0578b6e0bd 100644
--- a/examples/embedded/raycasting/CMakeLists.txt
+++ b/examples/embedded/raycasting/CMakeLists.txt
@@ -1,23 +1,26 @@
# Generated from raycasting.pro.
-#####################################################################
-## raycasting Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(raycasting LANGUAGES CXX)
-add_qt_executable(raycasting
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/raycasting"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/raycasting"
- SOURCES
- raycasting.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(raycasting "raycasting" PREFIX "/" FILES
- textures.png)
+find_package(Qt5 COMPONENTS Widgets)
+add_executable(raycasting WIN32 MACOSX_BUNDLE
+ raycasting.cpp raycasting.qrc
+)
+target_link_libraries(raycasting PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 1:.:raycasting.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS raycasting
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/embedded/styleexample/CMakeLists.txt b/examples/embedded/styleexample/CMakeLists.txt
index d14acc8b5a..2210d8cf9b 100644
--- a/examples/embedded/styleexample/CMakeLists.txt
+++ b/examples/embedded/styleexample/CMakeLists.txt
@@ -1,30 +1,27 @@
# Generated from styleexample.pro.
-#####################################################################
-## styleexample Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(styleexample LANGUAGES CXX)
-add_qt_executable(styleexample
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/styleexample"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/embedded/styleexample"
- SOURCES
- main.cpp
- stylewidget.cpp stylewidget.h stylewidget.ui
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(styleexample "styleexample" PREFIX "/" 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)
+find_package(Qt5 COMPONENTS Widgets)
+add_executable(styleexample WIN32 MACOSX_BUNDLE
+ main.cpp
+ stylewidget.cpp stylewidget.h stylewidget.ui
+ styleexample.qrc # special case: add
+)
+target_link_libraries(styleexample PUBLIC
+ Qt::Widgets
+)
+install(TARGETS styleexample
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/analogclock/CMakeLists.txt b/examples/gui/analogclock/CMakeLists.txt
index 99a879c57a..d35b5a7502 100644
--- a/examples/gui/analogclock/CMakeLists.txt
+++ b/examples/gui/analogclock/CMakeLists.txt
@@ -1,21 +1,32 @@
# Generated from analogclock.pro.
-#####################################################################
-## analogclock Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(analogclock LANGUAGES CXX)
-add_qt_executable(analogclock
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/analogclock"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/analogclock"
- SOURCES
- ../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
- main.cpp
- INCLUDE_DIRECTORIES
- ../rasterwindow
- LIBRARIES # special case
- Qt::Gui
+find_package(Qt5 COMPONENTS Widgets) # 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")
+
+add_executable(gui_analogclock WIN32 MACOSX_BUNDLE # special case: renamed target
+ ../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h
+ main.cpp
)
+target_include_directories(gui_analogclock PUBLIC
+ ../rasterwindow
+)
+# special case begin
+target_link_libraries(gui_analogclock PUBLIC
+ Qt::Gui
+)
+# special case end
-#### Keys ignored in scope 1:.:analogclock.pro:<NONE>:
-# CONFIG = "no_batch"
+install(TARGETS gui_analogclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/gui/openglwindow/CMakeLists.txt b/examples/gui/openglwindow/CMakeLists.txt
index a59ba14346..ee62a2c43e 100644
--- a/examples/gui/openglwindow/CMakeLists.txt
+++ b/examples/gui/openglwindow/CMakeLists.txt
@@ -1,18 +1,31 @@
# Generated from openglwindow.pro.
-#####################################################################
-## openglwindow Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(openglwindow LANGUAGES CXX)
-add_qt_executable(openglwindow
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/openglwindow"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/openglwindow"
- SOURCES
- main.cpp
- openglwindow.cpp openglwindow.h
- INCLUDE_DIRECTORIES
- ${CMAKE_CURRENT_SOURCE_DIR}
- LIBRARIES # special case
- Qt::Gui
+find_package(Qt5 COMPONENTS Widgets) # 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")
+
+add_executable(openglwindow WIN32 MACOSX_BUNDLE
+ main.cpp
+ openglwindow.cpp openglwindow.h
+)
+target_include_directories(openglwindow PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+# special case begin
+target_link_libraries(openglwindow PUBLIC
+ Qt::Gui
+)
+# special case end
+install(TARGETS openglwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt
index 61255f3038..f200899fbd 100644
--- a/examples/gui/rasterwindow/CMakeLists.txt
+++ b/examples/gui/rasterwindow/CMakeLists.txt
@@ -1,18 +1,31 @@
# Generated from rasterwindow.pro.
-#####################################################################
-## rasterwindow Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(rasterwindow LANGUAGES CXX)
-add_qt_executable(rasterwindow
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/rasterwindow"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/gui/rasterwindow"
- SOURCES
- main.cpp
- rasterwindow.cpp rasterwindow.h
- INCLUDE_DIRECTORIES
- ${CMAKE_CURRENT_SOURCE_DIR}
- LIBRARIES # special case
- Qt::Gui
+find_package(Qt5 COMPONENTS Widgets) # 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")
+
+add_executable(rasterwindow WIN32 MACOSX_BUNDLE
+ main.cpp
+ rasterwindow.cpp rasterwindow.h
+)
+target_include_directories(rasterwindow PUBLIC
+ ${CMAKE_CURRENT_SOURCE_DIR}
+)
+# special case begin
+target_link_libraries(rasterwindow PUBLIC
+ 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 83c45fb21a..55893a7138 100644
--- a/examples/network/bearermonitor/CMakeLists.txt
+++ b/examples/network/bearermonitor/CMakeLists.txt
@@ -1,33 +1,36 @@
# Generated from bearermonitor.pro.
-#####################################################################
-## bearermonitor Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(bearermonitor LANGUAGES CXX)
-add_qt_executable(bearermonitor
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/bearermonitor"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/bearermonitor"
- SOURCES
- bearermonitor.cpp bearermonitor.h
- bearermonitor_240_320.ui
- bearermonitor_640_480.ui
- main.cpp
- sessionwidget.cpp sessionwidget.h sessionwidget.ui
- PUBLIC_LIBRARIES
- Qt::Gui
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:.:bearermonitor.pro:<TRUE>:
-# CONFIG = "console"
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Gui)
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(bearermonitor
+ bearermonitor.cpp bearermonitor.h
+ bearermonitor_240_320.ui
+ bearermonitor_640_480.ui
+ main.cpp
+ sessionwidget.cpp sessionwidget.h sessionwidget.ui
+)
+target_link_libraries(bearermonitor PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Network
+ Qt::Widgets
+)
-extend_target(bearermonitor CONDITION WIN32
- PUBLIC_LIBRARIES
- ws2_32
+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 bedbf2f607..603c7d9fd2 100644
--- a/examples/network/blockingfortuneclient/CMakeLists.txt
+++ b/examples/network/blockingfortuneclient/CMakeLists.txt
@@ -1,18 +1,30 @@
# Generated from blockingfortuneclient.pro.
-#####################################################################
-## blockingfortuneclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(blockingfortuneclient LANGUAGES CXX)
-add_qt_executable(blockingfortuneclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/blockingfortuneclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/blockingfortuneclient"
- SOURCES
- blockingclient.cpp blockingclient.h
- fortunethread.cpp fortunethread.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(blockingfortuneclient WIN32 MACOSX_BUNDLE
+ blockingclient.cpp blockingclient.h
+ fortunethread.cpp fortunethread.h
+ main.cpp
+)
+target_link_libraries(blockingfortuneclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS blockingfortuneclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/broadcastreceiver/CMakeLists.txt b/examples/network/broadcastreceiver/CMakeLists.txt
index 197e56cef0..79075f3558 100644
--- a/examples/network/broadcastreceiver/CMakeLists.txt
+++ b/examples/network/broadcastreceiver/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from broadcastreceiver.pro.
-#####################################################################
-## broadcastreceiver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(broadcastreceiver LANGUAGES CXX)
-add_qt_executable(broadcastreceiver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/broadcastreceiver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/broadcastreceiver"
- SOURCES
- main.cpp
- receiver.cpp receiver.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(broadcastreceiver WIN32 MACOSX_BUNDLE
+ main.cpp
+ receiver.cpp receiver.h
+)
+target_link_libraries(broadcastreceiver PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS broadcastreceiver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/broadcastsender/CMakeLists.txt b/examples/network/broadcastsender/CMakeLists.txt
index 8fd49d8578..f6da1a5733 100644
--- a/examples/network/broadcastsender/CMakeLists.txt
+++ b/examples/network/broadcastsender/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from broadcastsender.pro.
-#####################################################################
-## broadcastsender Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(broadcastsender LANGUAGES CXX)
-add_qt_executable(broadcastsender
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/broadcastsender"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/broadcastsender"
- SOURCES
- main.cpp
- sender.cpp sender.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(broadcastsender WIN32 MACOSX_BUNDLE
+ main.cpp
+ sender.cpp sender.h
+)
+target_link_libraries(broadcastsender PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS broadcastsender
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/dnslookup/CMakeLists.txt b/examples/network/dnslookup/CMakeLists.txt
index 6ffc633a96..8aa5bea4cb 100644
--- a/examples/network/dnslookup/CMakeLists.txt
+++ b/examples/network/dnslookup/CMakeLists.txt
@@ -1,27 +1,28 @@
# Generated from dnslookup.pro.
-#####################################################################
-## dnslookup Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dnslookup LANGUAGES CXX)
-add_qt_executable(dnslookup
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/dnslookup"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/dnslookup"
- SOURCES
- dnslookup.cpp dnslookup.h
- LIBRARIES
- Qt::Network
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#### Keys ignored in scope 1:.:dnslookup.pro:<NONE>:
-# TEMPLATE = "app"
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-## Scopes:
-#####################################################################
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 2:.:dnslookup.pro:APPLE_OSX:
-# CONFIG = "-app_bundle"
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Network)
-#### Keys ignored in scope 3:.:dnslookup.pro:WIN32:
-# CONFIG = "console"
+add_executable(dnslookup
+ dnslookup.cpp dnslookup.h
+)
+target_link_libraries(dnslookup PUBLIC
+ Qt::Core
+ Qt::Network
+)
+
+install(TARGETS dnslookup
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/download/CMakeLists.txt b/examples/network/download/CMakeLists.txt
index 868685fd0a..0ec20216b5 100644
--- a/examples/network/download/CMakeLists.txt
+++ b/examples/network/download/CMakeLists.txt
@@ -1,18 +1,28 @@
# Generated from download.pro.
-#####################################################################
-## download Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(download LANGUAGES CXX)
-add_qt_executable(download
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/download"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/download"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Network
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Network)
+
+add_executable(download
+ main.cpp
+)
+target_link_libraries(download PUBLIC
+ Qt::Core
+ Qt::Network
)
-#### Keys ignored in scope 1:.:download.pro:<NONE>:
-# CONFIG = "-app_bundle"
+install(TARGETS download
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/downloadmanager/CMakeLists.txt b/examples/network/downloadmanager/CMakeLists.txt
index a5ccac9178..574073c7eb 100644
--- a/examples/network/downloadmanager/CMakeLists.txt
+++ b/examples/network/downloadmanager/CMakeLists.txt
@@ -1,21 +1,30 @@
# Generated from downloadmanager.pro.
-#####################################################################
-## downloadmanager Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(downloadmanager LANGUAGES CXX)
-add_qt_executable(downloadmanager
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/downloadmanager"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/downloadmanager"
- SOURCES
- downloadmanager.cpp downloadmanager.h
- main.cpp
- textprogressbar.cpp textprogressbar.h
- LIBRARIES
- Qt::Network
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Network)
+
+add_executable(downloadmanager
+ downloadmanager.cpp downloadmanager.h
+ main.cpp
+ textprogressbar.cpp textprogressbar.h
+)
+target_link_libraries(downloadmanager PUBLIC
+ Qt::Core
+ Qt::Network
)
-#### Keys ignored in scope 1:.:downloadmanager.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# OTHER_FILES = "debian/changelog" "debian/compat" "debian/control" "debian/copyright" "debian/README" "debian/rules"
+install(TARGETS downloadmanager
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/fortuneclient/CMakeLists.txt b/examples/network/fortuneclient/CMakeLists.txt
index bbeecf9c64..a9e0e00c7e 100644
--- a/examples/network/fortuneclient/CMakeLists.txt
+++ b/examples/network/fortuneclient/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from fortuneclient.pro.
-#####################################################################
-## fortuneclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fortuneclient LANGUAGES CXX)
-add_qt_executable(fortuneclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/fortuneclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/fortuneclient"
- SOURCES
- client.cpp client.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fortuneclient WIN32 MACOSX_BUNDLE
+ client.cpp client.h
+ main.cpp
+)
+target_link_libraries(fortuneclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS fortuneclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/fortuneserver/CMakeLists.txt b/examples/network/fortuneserver/CMakeLists.txt
index 299f43910f..03604f121e 100644
--- a/examples/network/fortuneserver/CMakeLists.txt
+++ b/examples/network/fortuneserver/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from fortuneserver.pro.
-#####################################################################
-## fortuneserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fortuneserver LANGUAGES CXX)
-add_qt_executable(fortuneserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/fortuneserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/fortuneserver"
- SOURCES
- main.cpp
- server.cpp server.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fortuneserver WIN32 MACOSX_BUNDLE
+ main.cpp
+ server.cpp server.h
+)
+target_link_libraries(fortuneserver PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS fortuneserver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/googlesuggest/CMakeLists.txt b/examples/network/googlesuggest/CMakeLists.txt
index ef5deedb80..d445bf646d 100644
--- a/examples/network/googlesuggest/CMakeLists.txt
+++ b/examples/network/googlesuggest/CMakeLists.txt
@@ -1,18 +1,30 @@
# Generated from googlesuggest.pro.
-#####################################################################
-## googlesuggest Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(googlesuggest LANGUAGES CXX)
-add_qt_executable(googlesuggest
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/googlesuggest"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/googlesuggest"
- SOURCES
- googlesuggest.cpp googlesuggest.h
- main.cpp
- searchbox.cpp searchbox.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(googlesuggest WIN32 MACOSX_BUNDLE
+ googlesuggest.cpp googlesuggest.h
+ main.cpp
+ searchbox.cpp searchbox.h
+)
+target_link_libraries(googlesuggest PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS googlesuggest
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/http/CMakeLists.txt b/examples/network/http/CMakeLists.txt
index 30f6b900e2..931c834eae 100644
--- a/examples/network/http/CMakeLists.txt
+++ b/examples/network/http/CMakeLists.txt
@@ -1,20 +1,30 @@
# Generated from http.pro.
-#####################################################################
-## http Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(http LANGUAGES CXX)
-add_qt_executable(http
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/http"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/http"
- SOURCES
- authenticationdialog.ui
- httpwindow.cpp httpwindow.h
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(http WIN32 MACOSX_BUNDLE
+ authenticationdialog.ui
+ httpwindow.cpp httpwindow.h
+ main.cpp
+)
+target_link_libraries(http PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS http
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/loopback/CMakeLists.txt b/examples/network/loopback/CMakeLists.txt
index 566b48a76e..06410c7b5c 100644
--- a/examples/network/loopback/CMakeLists.txt
+++ b/examples/network/loopback/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from loopback.pro.
-#####################################################################
-## loopback Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(loopback LANGUAGES CXX)
-add_qt_executable(loopback
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/loopback"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/loopback"
- SOURCES
- dialog.cpp dialog.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(loopback WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ main.cpp
+)
+target_link_libraries(loopback PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS loopback
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/multicastreceiver/CMakeLists.txt b/examples/network/multicastreceiver/CMakeLists.txt
index 11204015f2..71bcadc253 100644
--- a/examples/network/multicastreceiver/CMakeLists.txt
+++ b/examples/network/multicastreceiver/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from multicastreceiver.pro.
-#####################################################################
-## multicastreceiver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(multicastreceiver LANGUAGES CXX)
-add_qt_executable(multicastreceiver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multicastreceiver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multicastreceiver"
- SOURCES
- main.cpp
- receiver.cpp receiver.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(multicastreceiver WIN32 MACOSX_BUNDLE
+ main.cpp
+ receiver.cpp receiver.h
+)
+target_link_libraries(multicastreceiver PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS multicastreceiver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/multicastsender/CMakeLists.txt b/examples/network/multicastsender/CMakeLists.txt
index e02a6b7145..bcb2370649 100644
--- a/examples/network/multicastsender/CMakeLists.txt
+++ b/examples/network/multicastsender/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from multicastsender.pro.
-#####################################################################
-## multicastsender Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(multicastsender LANGUAGES CXX)
-add_qt_executable(multicastsender
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multicastsender"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multicastsender"
- SOURCES
- main.cpp
- sender.cpp sender.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(multicastsender WIN32 MACOSX_BUNDLE
+ main.cpp
+ sender.cpp sender.h
+)
+target_link_libraries(multicastsender PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS multicastsender
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/multistreamclient/CMakeLists.txt b/examples/network/multistreamclient/CMakeLists.txt
index b9f10f3fd5..399333fd29 100644
--- a/examples/network/multistreamclient/CMakeLists.txt
+++ b/examples/network/multistreamclient/CMakeLists.txt
@@ -1,21 +1,33 @@
# Generated from multistreamclient.pro.
-#####################################################################
-## multistreamclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(multistreamclient LANGUAGES CXX)
-add_qt_executable(multistreamclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamclient"
- SOURCES
- chatconsumer.cpp chatconsumer.h
- client.cpp client.h
- consumer.h
- main.cpp
- movieconsumer.cpp movieconsumer.h
- timeconsumer.cpp timeconsumer.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(multistreamclient WIN32 MACOSX_BUNDLE
+ chatconsumer.cpp chatconsumer.h
+ client.cpp client.h
+ consumer.h
+ main.cpp
+ movieconsumer.cpp movieconsumer.h
+ timeconsumer.cpp timeconsumer.h
+)
+target_link_libraries(multistreamclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS multistreamclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/multistreamserver/CMakeLists.txt b/examples/network/multistreamserver/CMakeLists.txt
index 3475995178..bf48042f58 100644
--- a/examples/network/multistreamserver/CMakeLists.txt
+++ b/examples/network/multistreamserver/CMakeLists.txt
@@ -1,24 +1,33 @@
# Generated from multistreamserver.pro.
-#####################################################################
-## multistreamserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(multistreamserver LANGUAGES CXX)
-add_qt_executable(multistreamserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/multistreamserver"
- SOURCES
- chatprovider.cpp chatprovider.h
- main.cpp
- movieprovider.cpp movieprovider.h
- provider.h
- server.cpp server.h
- timeprovider.cpp timeprovider.h
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(multistreamserver WIN32 MACOSX_BUNDLE
+ chatprovider.cpp chatprovider.h
+ main.cpp
+ movieprovider.cpp movieprovider.h
+ provider.h
+ server.cpp server.h
+ timeprovider.cpp timeprovider.h
+)
+target_link_libraries(multistreamserver PUBLIC
+ Qt::Network
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:multistreamserver.pro:<NONE>:
-# EXAMPLE_FILES = "animation.gif"
+install(TARGETS multistreamserver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/network-chat/CMakeLists.txt b/examples/network/network-chat/CMakeLists.txt
index d620d899d1..a4fb950370 100644
--- a/examples/network/network-chat/CMakeLists.txt
+++ b/examples/network/network-chat/CMakeLists.txt
@@ -1,23 +1,33 @@
# Generated from network-chat.pro.
-#####################################################################
-## network-chat Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(network-chat LANGUAGES CXX)
-add_qt_executable(network-chat
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/network-chat"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/network-chat"
- SOURCES
- chatdialog.cpp chatdialog.h chatdialog.ui
- client.cpp client.h
- connection.cpp connection.h
- main.cpp
- peermanager.cpp peermanager.h
- server.cpp server.h
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(network-chat WIN32 MACOSX_BUNDLE
+ chatdialog.cpp chatdialog.h chatdialog.ui
+ client.cpp client.h
+ connection.cpp connection.h
+ main.cpp
+ peermanager.cpp peermanager.h
+ server.cpp server.h
+)
+target_link_libraries(network-chat PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS network-chat
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/securesocketclient/CMakeLists.txt b/examples/network/securesocketclient/CMakeLists.txt
index fd9a12e4bb..d112af044a 100644
--- a/examples/network/securesocketclient/CMakeLists.txt
+++ b/examples/network/securesocketclient/CMakeLists.txt
@@ -1,26 +1,32 @@
# Generated from securesocketclient.pro.
-#####################################################################
-## securesocketclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(securesocketclient LANGUAGES CXX)
-add_qt_executable(securesocketclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/securesocketclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/securesocketclient"
- SOURCES
- certificateinfo.cpp certificateinfo.h certificateinfo.ui
- main.cpp
- sslclient.cpp sslclient.h sslclient.ui
- sslerrors.ui
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(securesocketclient "securesocketclient" FILES
- encrypted.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(securesocketclient WIN32 MACOSX_BUNDLE
+ certificateinfo.cpp certificateinfo.h certificateinfo.ui
+ main.cpp
+ securesocketclient.qrc
+ sslclient.cpp sslclient.h sslclient.ui
+ sslerrors.ui
+)
+target_link_libraries(securesocketclient PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+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 5516b36cc3..531b1196a3 100644
--- a/examples/network/secureudpclient/CMakeLists.txt
+++ b/examples/network/secureudpclient/CMakeLists.txt
@@ -1,24 +1,31 @@
# Generated from secureudpclient.pro.
-#####################################################################
-## secureudpclient Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(secureudpclient LANGUAGES CXX)
-add_qt_executable(secureudpclient
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/secureudpclient"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/secureudpclient"
- SOURCES
- addressdialog.cpp addressdialog.h addressdialog.ui
- association.cpp association.h
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Network)
+
+add_executable(secureudpclient WIN32 MACOSX_BUNDLE
+ addressdialog.cpp addressdialog.h addressdialog.ui
+ association.cpp association.h
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+)
+target_link_libraries(secureudpclient PUBLIC
+ Qt::Network
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:.:secureudpclient.pro:<TRUE>:
-# TEMPLATE = "app"
+install(TARGETS secureudpclient
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/secureudpserver/CMakeLists.txt b/examples/network/secureudpserver/CMakeLists.txt
index 6d4968c9f7..e6e60711d0 100644
--- a/examples/network/secureudpserver/CMakeLists.txt
+++ b/examples/network/secureudpserver/CMakeLists.txt
@@ -1,24 +1,31 @@
# Generated from secureudpserver.pro.
-#####################################################################
-## secureudpserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(secureudpserver LANGUAGES CXX)
-add_qt_executable(secureudpserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/secureudpserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/secureudpserver"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- nicselector.cpp nicselector.h nicselector.ui
- server.cpp server.h
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Network)
+
+add_executable(secureudpserver WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ nicselector.cpp nicselector.h nicselector.ui
+ server.cpp server.h
+)
+target_link_libraries(secureudpserver PUBLIC
+ Qt::Network
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:.:secureudpserver.pro:<TRUE>:
-# TEMPLATE = "app"
+install(TARGETS secureudpserver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/threadedfortuneserver/CMakeLists.txt b/examples/network/threadedfortuneserver/CMakeLists.txt
index 124ac1d1cc..43b95e60d5 100644
--- a/examples/network/threadedfortuneserver/CMakeLists.txt
+++ b/examples/network/threadedfortuneserver/CMakeLists.txt
@@ -1,19 +1,31 @@
# Generated from threadedfortuneserver.pro.
-#####################################################################
-## threadedfortuneserver Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(threadedfortuneserver LANGUAGES CXX)
-add_qt_executable(threadedfortuneserver
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/threadedfortuneserver"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/threadedfortuneserver"
- SOURCES
- dialog.cpp dialog.h
- fortuneserver.cpp fortuneserver.h
- fortunethread.cpp fortunethread.h
- main.cpp
- LIBRARIES
- Qt::Network
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(threadedfortuneserver WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ fortuneserver.cpp fortuneserver.h
+ fortunethread.cpp fortunethread.h
+ main.cpp
+)
+target_link_libraries(threadedfortuneserver PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS threadedfortuneserver
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/network/torrent/.prev_CMakeLists.txt b/examples/network/torrent/.prev_CMakeLists.txt
index 5d23f5e74b..8391a0a9db 100644
--- a/examples/network/torrent/.prev_CMakeLists.txt
+++ b/examples/network/torrent/.prev_CMakeLists.txt
@@ -1,42 +1,41 @@
# Generated from torrent.pro.
-#####################################################################
-## torrent Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(torrent LANGUAGES CXX)
-add_qt_executable(torrent
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/torrent"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/torrent"
- SOURCES
- addtorrentdialog.cpp addtorrentdialog.h
- bencodeparser.cpp bencodeparser.h
- connectionmanager.cpp connectionmanager.h
- filemanager.cpp filemanager.h
- forms/addtorrentform.ui
- main.cpp
- mainwindow.cpp mainwindow.h
- metainfo.cpp metainfo.h
- peerwireclient.cpp peerwireclient.h
- ratecontroller.cpp ratecontroller.h
- torrentclient.cpp torrentclient.h
- torrentserver.cpp torrentserver.h
- trackerclient.cpp trackerclient.h
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(torrent "icons" PREFIX "/" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(torrent WIN32 MACOSX_BUNDLE
+ addtorrentdialog.cpp addtorrentdialog.h
+ bencodeparser.cpp bencodeparser.h
+ connectionmanager.cpp connectionmanager.h
+ filemanager.cpp filemanager.h
+ forms/addtorrentform.ui
+ icons.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ metainfo.cpp metainfo.h
+ peerwireclient.cpp peerwireclient.h
+ ratecontroller.cpp ratecontroller.h
+ torrentclient.cpp torrentclient.h
+ torrentserver.cpp torrentserver.h
+ trackerclient.cpp trackerclient.h
+)
+target_link_libraries(torrent PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS torrent
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt
index 448335e7aa..2a49e3800b 100644
--- a/examples/network/torrent/CMakeLists.txt
+++ b/examples/network/torrent/CMakeLists.txt
@@ -1,44 +1,42 @@
# Generated from torrent.pro.
-#####################################################################
-## torrent Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(torrent LANGUAGES CXX)
-add_qt_executable(torrent
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/torrent"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/network/torrent"
- SOURCES
- addtorrentdialog.cpp addtorrentdialog.h
- bencodeparser.cpp bencodeparser.h
- connectionmanager.cpp connectionmanager.h
- filemanager.cpp filemanager.h
- forms/addtorrentform.ui
- main.cpp
- mainwindow.cpp mainwindow.h
- metainfo.cpp metainfo.h
- peerwireclient.cpp peerwireclient.h
- ratecontroller.cpp ratecontroller.h
- torrentclient.cpp torrentclient.h
- torrentserver.cpp torrentserver.h
- trackerclient.cpp trackerclient.h
- INCLUDE_DIRECTORIES # special case
- forms # special case
- PUBLIC_LIBRARIES
- Qt::Network
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(torrent "icons" PREFIX "/" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(torrent WIN32 MACOSX_BUNDLE
+ addtorrentdialog.cpp addtorrentdialog.h
+ bencodeparser.cpp bencodeparser.h
+ connectionmanager.cpp connectionmanager.h
+ filemanager.cpp filemanager.h
+ forms/addtorrentform.ui
+ icons.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ metainfo.cpp metainfo.h
+ peerwireclient.cpp peerwireclient.h
+ ratecontroller.cpp ratecontroller.h
+ torrentclient.cpp torrentclient.h
+ torrentserver.cpp torrentserver.h
+ trackerclient.cpp trackerclient.h
+)
+target_include_directories(torrent PUBLIC forms) # special case
+target_link_libraries(torrent PUBLIC
+ Qt::Network
+ Qt::Widgets
+)
+
+install(TARGETS torrent
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qpa/qrasterwindow/CMakeLists.txt b/examples/qpa/qrasterwindow/CMakeLists.txt
index 0eae5b28af..c74ce2974b 100644
--- a/examples/qpa/qrasterwindow/CMakeLists.txt
+++ b/examples/qpa/qrasterwindow/CMakeLists.txt
@@ -1,15 +1,24 @@
# Generated from qrasterwindow.pro.
-#####################################################################
-## qrasterwindow Binary:
-#####################################################################
-
-add_qt_executable(qrasterwindow
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/qrasterwindow"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/qrasterwindow"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Gui # special case
+cmake_minimum_required(VERSION 3.14)
+project(qrasterwindow LANGUAGES CXX)
+
+find_package(Qt5 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")
+
+add_executable(qrasterwindow WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(qrasterwindow PUBLIC Qt::Gui) # special case: add
+
+install(TARGETS qrasterwindow
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt
index 55135e02ff..2bd7b6fd85 100644
--- a/examples/qpa/windows/CMakeLists.txt
+++ b/examples/qpa/windows/CMakeLists.txt
@@ -1,19 +1,33 @@
# Generated from windows.pro.
-#####################################################################
-## windows Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(windows LANGUAGES CXX)
-add_qt_executable(windows
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/windows"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qpa/windows"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::GuiPrivate
- Qt::CorePrivate
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Gui)
+find_package(Qt5 COMPONENTS Core)
+
+add_executable(windows
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(windows PRIVATE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+)
+target_link_libraries(windows PUBLIC
+ Qt::Core
+ Qt::Gui
)
-#### Keys ignored in scope 1:.:windows.pro:<NONE>:
-# CONFIG = "console"
+install(TARGETS windows
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtconcurrent/imagescaling/CMakeLists.txt b/examples/qtconcurrent/imagescaling/CMakeLists.txt
index 0de3f26c5e..a288397de7 100644
--- a/examples/qtconcurrent/imagescaling/CMakeLists.txt
+++ b/examples/qtconcurrent/imagescaling/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from imagescaling.pro.
-#####################################################################
-## imagescaling Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(imagescaling LANGUAGES CXX)
-add_qt_executable(imagescaling
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/imagescaling"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/imagescaling"
- SOURCES
- imagescaling.cpp imagescaling.h
- main.cpp
- LIBRARIES
- Qt::Concurrent
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Concurrent)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(imagescaling WIN32 MACOSX_BUNDLE
+ imagescaling.cpp imagescaling.h
+ main.cpp
+)
+target_link_libraries(imagescaling PUBLIC
+ Qt::Concurrent
+ Qt::Widgets
+)
+
+install(TARGETS imagescaling
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/qtconcurrent/map/.prev_CMakeLists.txt b/examples/qtconcurrent/map/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..48a18038ad
--- /dev/null
+++ b/examples/qtconcurrent/map/.prev_CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from map.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(mapdemo LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Concurrent)
+
+add_executable(mapdemo
+ main.cpp
+)
+target_link_libraries(mapdemo PUBLIC
+ Qt::Concurrent
+)
+
+install(TARGETS mapdemo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtconcurrent/map/CMakeLists.txt b/examples/qtconcurrent/map/CMakeLists.txt
index 147b91236b..a5bac9a973 100644
--- a/examples/qtconcurrent/map/CMakeLists.txt
+++ b/examples/qtconcurrent/map/CMakeLists.txt
@@ -1,20 +1,27 @@
# Generated from map.pro.
-#####################################################################
-## mapdemo Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mapdemo LANGUAGES CXX)
-add_qt_executable(mapdemo
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/map"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/map"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Concurrent
- Qt::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")
+
+find_package(Qt5 COMPONENTS Concurrent)
+find_package(Qt5 COMPONENTS Gui) # special case
-#### Keys ignored in scope 1:.:map.pro:<NONE>:
-# CONFIG = "-app_bundle"
-# TEMPLATE = "app"
+add_executable(mapdemo
+ main.cpp
+)
+target_link_libraries(mapdemo PUBLIC
+ Qt::Concurrent
+ Qt::Gui # special case
+)
+install(TARGETS mapdemo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtconcurrent/progressdialog/CMakeLists.txt b/examples/qtconcurrent/progressdialog/CMakeLists.txt
index 3aae4af084..8a61fd0e0a 100644
--- a/examples/qtconcurrent/progressdialog/CMakeLists.txt
+++ b/examples/qtconcurrent/progressdialog/CMakeLists.txt
@@ -1,18 +1,28 @@
# Generated from progressdialog.pro.
-#####################################################################
-## progressdialog Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(progressdialog LANGUAGES CXX)
-add_qt_executable(progressdialog
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/progressdialog"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/progressdialog"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Concurrent
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Concurrent)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(progressdialog
+ main.cpp
+)
+target_link_libraries(progressdialog PUBLIC
+ Qt::Concurrent
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:progressdialog.pro:<NONE>:
-# CONFIG = "console"
+install(TARGETS progressdialog
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtconcurrent/runfunction/CMakeLists.txt b/examples/qtconcurrent/runfunction/CMakeLists.txt
index c400b44cf6..f71a789423 100644
--- a/examples/qtconcurrent/runfunction/CMakeLists.txt
+++ b/examples/qtconcurrent/runfunction/CMakeLists.txt
@@ -1,19 +1,28 @@
# Generated from runfunction.pro.
-#####################################################################
-## runfunction Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(runfunction LANGUAGES CXX)
-add_qt_executable(runfunction
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/runfunction"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/runfunction"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Concurrent
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Concurrent)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(runfunction
+ main.cpp
+)
+target_link_libraries(runfunction PUBLIC
+ Qt::Concurrent
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:runfunction.pro:<NONE>:
-# CONFIG = "-app_bundle"
+install(TARGETS runfunction
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtconcurrent/wordcount/CMakeLists.txt b/examples/qtconcurrent/wordcount/CMakeLists.txt
index 9bb2ac58d7..4c6402102d 100644
--- a/examples/qtconcurrent/wordcount/CMakeLists.txt
+++ b/examples/qtconcurrent/wordcount/CMakeLists.txt
@@ -1,19 +1,28 @@
# Generated from wordcount.pro.
-#####################################################################
-## wordcount Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(wordcount LANGUAGES CXX)
-add_qt_executable(wordcount
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/wordcount"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtconcurrent/wordcount"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Concurrent
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Concurrent)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(wordcount
+ main.cpp
+)
+target_link_libraries(wordcount PUBLIC
+ Qt::Concurrent
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:wordcount.pro:<NONE>:
-# CONFIG = "-app_bundle"
+install(TARGETS wordcount
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/qtestlib/tutorial1/CMakeLists.txt b/examples/qtestlib/tutorial1/CMakeLists.txt
index 6e489e329f..b30293a3e3 100644
--- a/examples/qtestlib/tutorial1/CMakeLists.txt
+++ b/examples/qtestlib/tutorial1/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tutorial1.pro.
-#####################################################################
-## tutorial1 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tutorial1 LANGUAGES CXX)
-add_qt_executable(tutorial1
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial1"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial1"
- SOURCES
- testqstring.cpp
- LIBRARIES
- Qt::Widgets
- Qt::Test
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Test)
+
+add_executable(tutorial1 WIN32 MACOSX_BUNDLE
+ testqstring.cpp
+)
+target_link_libraries(tutorial1 PUBLIC
+ 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 06288ce50b..ed7cc3f224 100644
--- a/examples/qtestlib/tutorial2/CMakeLists.txt
+++ b/examples/qtestlib/tutorial2/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tutorial2.pro.
-#####################################################################
-## tutorial2 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tutorial2 LANGUAGES CXX)
-add_qt_executable(tutorial2
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial2"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial2"
- SOURCES
- testqstring.cpp
- LIBRARIES
- Qt::Widgets
- Qt::Test
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Test)
+
+add_executable(tutorial2 WIN32 MACOSX_BUNDLE
+ testqstring.cpp
+)
+target_link_libraries(tutorial2 PUBLIC
+ 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 79683e0cfc..975ac4dfd6 100644
--- a/examples/qtestlib/tutorial3/CMakeLists.txt
+++ b/examples/qtestlib/tutorial3/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tutorial3.pro.
-#####################################################################
-## tutorial3 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tutorial3 LANGUAGES CXX)
-add_qt_executable(tutorial3
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial3"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial3"
- SOURCES
- testgui.cpp
- LIBRARIES
- Qt::Widgets
- Qt::Test
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Test)
+
+add_executable(tutorial3 WIN32 MACOSX_BUNDLE
+ testgui.cpp
+)
+target_link_libraries(tutorial3 PUBLIC
+ 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 2f3d2bb88a..069afd031e 100644
--- a/examples/qtestlib/tutorial4/CMakeLists.txt
+++ b/examples/qtestlib/tutorial4/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tutorial4.pro.
-#####################################################################
-## tutorial4 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tutorial4 LANGUAGES CXX)
-add_qt_executable(tutorial4
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial4"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial4"
- SOURCES
- testgui.cpp
- LIBRARIES
- Qt::Widgets
- Qt::Test
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Test)
+
+add_executable(tutorial4 WIN32 MACOSX_BUNDLE
+ testgui.cpp
+)
+target_link_libraries(tutorial4 PUBLIC
+ 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 e4af9b354c..65dba6dcb5 100644
--- a/examples/qtestlib/tutorial5/CMakeLists.txt
+++ b/examples/qtestlib/tutorial5/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tutorial5.pro.
-#####################################################################
-## tutorial5 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tutorial5 LANGUAGES CXX)
-add_qt_executable(tutorial5
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial5"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial5"
- SOURCES
- benchmarking.cpp
- LIBRARIES
- Qt::Widgets
- Qt::Test
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Test)
+
+add_executable(tutorial5 WIN32 MACOSX_BUNDLE
+ benchmarking.cpp
+)
+target_link_libraries(tutorial5 PUBLIC
+ 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 7a25b95cde..294a764a9b 100644
--- a/examples/sql/books/CMakeLists.txt
+++ b/examples/sql/books/CMakeLists.txt
@@ -1,31 +1,35 @@
# Generated from books.pro.
-#####################################################################
-## books Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(books LANGUAGES CXX)
-add_qt_executable(books
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/books"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/books"
- SOURCES
- bookdelegate.cpp bookdelegate.h
- bookwindow.cpp bookwindow.h bookwindow.ui
- initdb.h
- main.cpp
- INCLUDE_DIRECTORIES
- .
- PUBLIC_LIBRARIES
- Qt::Sql
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(books "books" PREFIX "/" FILES
- images/star.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:.:books.pro:<TRUE>:
-# TEMPLATE = "app"
+add_executable(books WIN32 MACOSX_BUNDLE
+ bookdelegate.cpp bookdelegate.h
+ books.qrc
+ bookwindow.cpp bookwindow.h bookwindow.ui
+ initdb.h
+ main.cpp
+)
+target_include_directories(books PUBLIC
+ .
+)
+target_link_libraries(books PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+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 8e87a32211..3ccea061ff 100644
--- a/examples/sql/cachedtable/CMakeLists.txt
+++ b/examples/sql/cachedtable/CMakeLists.txt
@@ -1,18 +1,30 @@
# Generated from cachedtable.pro.
-#####################################################################
-## cachedtable Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(cachedtable LANGUAGES CXX)
-add_qt_executable(cachedtable
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/cachedtable"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/cachedtable"
- SOURCES
- ../connection.h
- main.cpp
- tableeditor.cpp tableeditor.h
- LIBRARIES
- Qt::Sql
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(cachedtable WIN32 MACOSX_BUNDLE
+ ../connection.h
+ main.cpp
+ tableeditor.cpp tableeditor.h
+)
+target_link_libraries(cachedtable PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+install(TARGETS cachedtable
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/sql/drilldown/CMakeLists.txt b/examples/sql/drilldown/CMakeLists.txt
index a4301d3474..b8fab77b0c 100644
--- a/examples/sql/drilldown/CMakeLists.txt
+++ b/examples/sql/drilldown/CMakeLists.txt
@@ -1,28 +1,33 @@
# Generated from drilldown.pro.
-#####################################################################
-## drilldown Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(drilldown LANGUAGES CXX)
-add_qt_executable(drilldown
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/drilldown"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/drilldown"
- SOURCES
- ../connection.h
- imageitem.cpp imageitem.h
- informationwindow.cpp informationwindow.h
- main.cpp
- view.cpp view.h
- LIBRARIES
- Qt::Sql
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(drilldown "drilldown" PREFIX "/" FILES
- images/qt-creator.png
- images/qt-logo.png
- images/qt-project.png
- images/qt-quick.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(drilldown WIN32 MACOSX_BUNDLE
+ ../connection.h
+ drilldown.qrc
+ imageitem.cpp imageitem.h
+ informationwindow.cpp informationwindow.h
+ main.cpp
+ view.cpp view.h
+)
+target_link_libraries(drilldown PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+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 8c73675e55..d1f4883da1 100644
--- a/examples/sql/masterdetail/CMakeLists.txt
+++ b/examples/sql/masterdetail/CMakeLists.txt
@@ -1,30 +1,34 @@
# Generated from masterdetail.pro.
-#####################################################################
-## masterdetail Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(masterdetail LANGUAGES CXX)
-add_qt_executable(masterdetail
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/masterdetail"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/masterdetail"
- SOURCES
- database.h
- dialog.cpp dialog.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Sql
- Qt::Widgets
- Qt::Xml
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(masterdetail "masterdetail" FILES
- images/icon.png
- images/image.png)
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS Xml)
+add_executable(masterdetail WIN32 MACOSX_BUNDLE
+ database.h
+ dialog.cpp dialog.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ masterdetail.qrc
+)
+target_link_libraries(masterdetail PUBLIC
+ Qt::Sql
+ Qt::Widgets
+ Qt::Xml
+)
-#### Keys ignored in scope 1:.:masterdetail.pro:<NONE>:
-# EXAMPLE_FILES = "albumdetails.xml"
+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 5c9d48c7f1..7f617c7c33 100644
--- a/examples/sql/querymodel/CMakeLists.txt
+++ b/examples/sql/querymodel/CMakeLists.txt
@@ -1,19 +1,31 @@
# Generated from querymodel.pro.
-#####################################################################
-## querymodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(querymodel LANGUAGES CXX)
-add_qt_executable(querymodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/querymodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/querymodel"
- SOURCES
- ../connection.h
- customsqlmodel.cpp customsqlmodel.h
- editablesqlmodel.cpp editablesqlmodel.h
- main.cpp
- LIBRARIES
- Qt::Sql
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(querymodel WIN32 MACOSX_BUNDLE
+ ../connection.h
+ customsqlmodel.cpp customsqlmodel.h
+ editablesqlmodel.cpp editablesqlmodel.h
+ main.cpp
+)
+target_link_libraries(querymodel PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+install(TARGETS querymodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/sql/relationaltablemodel/CMakeLists.txt b/examples/sql/relationaltablemodel/CMakeLists.txt
index d31042cc73..de4dba49cc 100644
--- a/examples/sql/relationaltablemodel/CMakeLists.txt
+++ b/examples/sql/relationaltablemodel/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from relationaltablemodel.pro.
-#####################################################################
-## relationaltablemodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(relationaltablemodel LANGUAGES CXX)
-add_qt_executable(relationaltablemodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/relationaltablemodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/relationaltablemodel"
- SOURCES
- ../connection.h
- relationaltablemodel.cpp
- LIBRARIES
- Qt::Sql
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(relationaltablemodel WIN32 MACOSX_BUNDLE
+ ../connection.h
+ relationaltablemodel.cpp
+)
+target_link_libraries(relationaltablemodel PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+install(TARGETS relationaltablemodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/sql/sqlbrowser/CMakeLists.txt b/examples/sql/sqlbrowser/CMakeLists.txt
index a2e0ed951d..dee4d4a58e 100644
--- a/examples/sql/sqlbrowser/CMakeLists.txt
+++ b/examples/sql/sqlbrowser/CMakeLists.txt
@@ -1,31 +1,32 @@
# Generated from sqlbrowser.pro.
-#####################################################################
-## sqlbrowser Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sqlbrowser LANGUAGES CXX)
-add_qt_executable(sqlbrowser
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/sqlbrowser"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/sqlbrowser"
- SOURCES
- browser.cpp browser.h
- browserwidget.ui
- connectionwidget.cpp connectionwidget.h
- main.cpp
- qsqlconnectiondialog.cpp qsqlconnectiondialog.h qsqlconnectiondialog.ui
- PUBLIC_LIBRARIES
- Qt::Sql
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:.:sqlbrowser.pro:<TRUE>:
-# TEMPLATE = "app"
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(sqlbrowser WIN32 MACOSX_BUNDLE
+ browser.cpp browser.h
+ browserwidget.ui
+ connectionwidget.cpp connectionwidget.h
+ main.cpp
+ qsqlconnectiondialog.cpp qsqlconnectiondialog.h qsqlconnectiondialog.ui
+)
+target_link_libraries(sqlbrowser PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
-#### Keys ignored in scope 2:.:.:sqlbrowser.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+install(TARGETS sqlbrowser
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/sql/sqlwidgetmapper/CMakeLists.txt b/examples/sql/sqlwidgetmapper/CMakeLists.txt
index 41d95da21e..586592fb18 100644
--- a/examples/sql/sqlwidgetmapper/CMakeLists.txt
+++ b/examples/sql/sqlwidgetmapper/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from sqlwidgetmapper.pro.
-#####################################################################
-## sqlwidgetmapper Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sqlwidgetmapper LANGUAGES CXX)
-add_qt_executable(sqlwidgetmapper
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/sqlwidgetmapper"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/sqlwidgetmapper"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Sql
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(sqlwidgetmapper WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(sqlwidgetmapper PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+install(TARGETS sqlwidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/sql/tablemodel/CMakeLists.txt b/examples/sql/tablemodel/CMakeLists.txt
index 68644a4b3d..9972927166 100644
--- a/examples/sql/tablemodel/CMakeLists.txt
+++ b/examples/sql/tablemodel/CMakeLists.txt
@@ -1,17 +1,29 @@
# Generated from tablemodel.pro.
-#####################################################################
-## tablemodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tablemodel LANGUAGES CXX)
-add_qt_executable(tablemodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/tablemodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/sql/tablemodel"
- SOURCES
- ../connection.h
- tablemodel.cpp
- LIBRARIES
- Qt::Sql
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Sql)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(tablemodel WIN32 MACOSX_BUNDLE
+ ../connection.h
+ tablemodel.cpp
+)
+target_link_libraries(tablemodel PUBLIC
+ Qt::Sql
+ Qt::Widgets
+)
+
+install(TARGETS tablemodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/animation/animatedtiles/CMakeLists.txt b/examples/widgets/animation/animatedtiles/CMakeLists.txt
index 0af95adcf8..dacde5535c 100644
--- a/examples/widgets/animation/animatedtiles/CMakeLists.txt
+++ b/examples/widgets/animation/animatedtiles/CMakeLists.txt
@@ -1,26 +1,27 @@
# Generated from animatedtiles.pro.
-#####################################################################
-## animatedtiles Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(animatedtiles LANGUAGES CXX)
-add_qt_executable(animatedtiles
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/animatedtiles"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(animatedtiles "animatedtiles" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(animatedtiles WIN32 MACOSX_BUNDLE
+ animatedtiles.qrc
+ main.cpp
+)
+target_link_libraries(animatedtiles PUBLIC
+ Qt::Widgets
+)
+
+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 b7444412a6..1500b11f3b 100644
--- a/examples/widgets/animation/easing/CMakeLists.txt
+++ b/examples/widgets/animation/easing/CMakeLists.txt
@@ -1,25 +1,30 @@
# Generated from easing.pro.
-#####################################################################
-## easing Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(easing LANGUAGES CXX)
-add_qt_executable(easing
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/easing"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/easing"
- SOURCES
- animation.h
- form.ui
- main.cpp
- window.cpp window.h
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(easing "easing" FILES
- images/qt-logo.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(easing WIN32 MACOSX_BUNDLE
+ animation.h
+ easing.qrc
+ form.ui
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(easing PUBLIC
+ Qt::Widgets
+)
+
+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 5cbb8f4936..cc2b70af44 100644
--- a/examples/widgets/animation/moveblocks/CMakeLists.txt
+++ b/examples/widgets/animation/moveblocks/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from moveblocks.pro.
-#####################################################################
-## moveblocks Binary:
-#####################################################################
-
-add_qt_executable(moveblocks
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/moveblocks"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(moveblocks LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(moveblocks WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(moveblocks PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS moveblocks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/animation/states/CMakeLists.txt b/examples/widgets/animation/states/CMakeLists.txt
index 52a9357789..a28995db99 100644
--- a/examples/widgets/animation/states/CMakeLists.txt
+++ b/examples/widgets/animation/states/CMakeLists.txt
@@ -1,25 +1,27 @@
# Generated from states.pro.
-#####################################################################
-## states Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(states LANGUAGES CXX)
-add_qt_executable(states
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/states"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/states"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(states "states" FILES
- accessories-dictionary.png
- akregator.png
- digikam.png
- help-browser.png
- k3b.png
- kchart.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(states WIN32 MACOSX_BUNDLE
+ main.cpp
+ states.qrc
+)
+target_link_libraries(states PUBLIC
+ Qt::Widgets
+)
+
+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 f604598232..5cb2e86c48 100644
--- a/examples/widgets/animation/stickman/CMakeLists.txt
+++ b/examples/widgets/animation/stickman/CMakeLists.txt
@@ -1,29 +1,32 @@
# Generated from stickman.pro.
-#####################################################################
-## stickman Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(stickman LANGUAGES CXX)
-add_qt_executable(stickman
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/stickman"
- SOURCES
- animation.cpp animation.h
- graphicsview.cpp graphicsview.h
- lifecycle.cpp lifecycle.h
- main.cpp
- node.cpp node.h
- rectbutton.cpp rectbutton.h
- stickman.cpp stickman.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(stickman "stickman" FILES
- animations/chilling.bin
- animations/dancing.bin
- animations/dead.bin
- animations/jumping.bin)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(stickman WIN32 MACOSX_BUNDLE
+ animation.cpp animation.h
+ graphicsview.cpp graphicsview.h
+ lifecycle.cpp lifecycle.h
+ main.cpp
+ node.cpp node.h
+ rectbutton.cpp rectbutton.h
+ stickman.cpp stickman.h stickman.qrc
+)
+target_link_libraries(stickman PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS stickman
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/animation/sub-attaq/CMakeLists.txt b/examples/widgets/animation/sub-attaq/CMakeLists.txt
index e7cb602e19..3260a5f75d 100644
--- a/examples/widgets/animation/sub-attaq/CMakeLists.txt
+++ b/examples/widgets/animation/sub-attaq/CMakeLists.txt
@@ -1,142 +1,43 @@
# Generated from sub-attaq.pro.
-#####################################################################
-## sub-attaq Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sub-attaq LANGUAGES CXX)
-add_qt_executable(sub-attaq
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/animation/sub-attaq"
- SOURCES
- 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
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-set_source_files_properties("pics/big/background.png"
- PROPERTIES alias "big/background")
-set_source_files_properties("pics/big/boat.png"
- PROPERTIES alias "big/boat")
-set_source_files_properties("pics/big/bomb.png"
- PROPERTIES alias "big/bomb")
-set_source_files_properties("pics/big/explosion/boat/step1.png"
- PROPERTIES alias "big/explosion/boat/step1")
-set_source_files_properties("pics/big/explosion/boat/step2.png"
- PROPERTIES alias "big/explosion/boat/step2")
-set_source_files_properties("pics/big/explosion/boat/step3.png"
- PROPERTIES alias "big/explosion/boat/step3")
-set_source_files_properties("pics/big/explosion/boat/step4.png"
- PROPERTIES alias "big/explosion/boat/step4")
-set_source_files_properties("pics/big/explosion/submarine/step1.png"
- PROPERTIES alias "big/explosion/submarine/step1")
-set_source_files_properties("pics/big/explosion/submarine/step2.png"
- PROPERTIES alias "big/explosion/submarine/step2")
-set_source_files_properties("pics/big/explosion/submarine/step3.png"
- PROPERTIES alias "big/explosion/submarine/step3")
-set_source_files_properties("pics/big/explosion/submarine/step4.png"
- PROPERTIES alias "big/explosion/submarine/step4")
-set_source_files_properties("pics/big/submarine.png"
- PROPERTIES alias "big/submarine")
-set_source_files_properties("pics/big/surface.png"
- PROPERTIES alias "big/surface")
-set_source_files_properties("pics/big/torpedo.png"
- PROPERTIES alias "big/torpedo")
-set_source_files_properties("pics/scalable/boat.svg"
- PROPERTIES alias "boat")
-set_source_files_properties("pics/scalable/sub-attaq.svg"
- PROPERTIES alias "all")
-set_source_files_properties("pics/scalable/submarine.svg"
- PROPERTIES alias "submarine")
-set_source_files_properties("pics/scalable/torpedo.svg"
- PROPERTIES alias "torpedo")
-set_source_files_properties("pics/small/background.png"
- PROPERTIES alias "small/background")
-set_source_files_properties("pics/small/boat.png"
- PROPERTIES alias "small/boat")
-set_source_files_properties("pics/small/bomb.png"
- PROPERTIES alias "small/bomb")
-set_source_files_properties("pics/small/submarine.png"
- PROPERTIES alias "small/submarine")
-set_source_files_properties("pics/small/surface.png"
- PROPERTIES alias "small/surface")
-set_source_files_properties("pics/small/torpedo.png"
- PROPERTIES alias "small/torpedo")
-set_source_files_properties("pics/welcome/logo-a.png"
- PROPERTIES alias "logo-a")
-set_source_files_properties("pics/welcome/logo-a2.png"
- PROPERTIES alias "logo-a2")
-set_source_files_properties("pics/welcome/logo-b.png"
- PROPERTIES alias "logo-b")
-set_source_files_properties("pics/welcome/logo-dash.png"
- PROPERTIES alias "logo-dash")
-set_source_files_properties("pics/welcome/logo-excl.png"
- PROPERTIES alias "logo-excl")
-set_source_files_properties("pics/welcome/logo-q.png"
- PROPERTIES alias "logo-q")
-set_source_files_properties("pics/welcome/logo-s.png"
- PROPERTIES alias "logo-s")
-set_source_files_properties("pics/welcome/logo-t.png"
- PROPERTIES alias "logo-t")
-set_source_files_properties("pics/welcome/logo-t2.png"
- PROPERTIES alias "logo-t2")
-set_source_files_properties("pics/welcome/logo-u.png"
- PROPERTIES alias "logo-u")
-add_qt_resource(sub-attaq "subattaq" PREFIX "/" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS OpenGL) # special case
-## Scopes:
-#####################################################################
+add_executable(sub-attaq WIN32 MACOSX_BUNDLE
+ 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
+ subattaq.qrc
+ submarine.cpp submarine.h submarine_p.h
+ textinformationitem.cpp textinformationitem.h
+ torpedo.cpp torpedo.h
+)
+target_link_libraries(sub-attaq PUBLIC
+ Qt::Widgets
+)
+if (TARGET Qt::OpenGL)
+ target_link_libraries(sub-attaq PUBLIC Qt::OpenGL)
+endif()
-extend_target(sub-attaq CONDITION TARGET Qt::OpenGL
- LIBRARIES
- Qt::OpenGL
+install(TARGETS sub-attaq
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt
index 1956e3800e..e4533298d0 100644
--- a/examples/widgets/desktop/screenshot/CMakeLists.txt
+++ b/examples/widgets/desktop/screenshot/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from screenshot.pro.
-#####################################################################
-## screenshot Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(screenshot LANGUAGES CXX)
-add_qt_executable(screenshot
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot"
- SOURCES
- main.cpp
- screenshot.cpp screenshot.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(screenshot WIN32 MACOSX_BUNDLE
+ main.cpp
+ screenshot.cpp screenshot.h
+)
+target_link_libraries(screenshot PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS screenshot
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt
index 9f5d05e751..2e89c2a8f9 100644
--- a/examples/widgets/desktop/systray/CMakeLists.txt
+++ b/examples/widgets/desktop/systray/CMakeLists.txt
@@ -1,23 +1,28 @@
# Generated from systray.pro.
-#####################################################################
-## systray Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(systray LANGUAGES CXX)
-add_qt_executable(systray
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(systray "systray" PREFIX "/" FILES
- images/bad.png
- images/heart.png
- images/trash.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(systray WIN32 MACOSX_BUNDLE
+ main.cpp
+ systray.qrc
+ window.cpp window.h
+)
+target_link_libraries(systray PUBLIC
+ Qt::Widgets
+)
+
+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 6d1cf9bab8..1c9ecebcee 100644
--- a/examples/widgets/dialogs/classwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt
@@ -1,27 +1,27 @@
# Generated from classwizard.pro.
-#####################################################################
-## classwizard Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(classwizard LANGUAGES CXX)
-add_qt_executable(classwizard
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard"
- SOURCES
- classwizard.cpp classwizard.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(classwizard "classwizard" FILES
- images/background.png
- images/banner.png
- images/logo1.png
- images/logo2.png
- images/logo3.png
- images/watermark1.png
- images/watermark2.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(classwizard WIN32 MACOSX_BUNDLE
+ classwizard.cpp classwizard.h classwizard.qrc
+ main.cpp
+)
+target_link_libraries(classwizard PUBLIC
+ Qt::Widgets
+)
+
+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 400cf23989..8037d670d9 100644
--- a/examples/widgets/dialogs/extension/CMakeLists.txt
+++ b/examples/widgets/dialogs/extension/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from extension.pro.
-#####################################################################
-## extension Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(extension LANGUAGES CXX)
-add_qt_executable(extension
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension"
- SOURCES
- finddialog.cpp finddialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(extension WIN32 MACOSX_BUNDLE
+ finddialog.cpp finddialog.h
+ main.cpp
+)
+target_link_libraries(extension PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS extension
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt
index 26442a71b1..11e971b7f2 100644
--- a/examples/widgets/dialogs/findfiles/CMakeLists.txt
+++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from findfiles.pro.
-#####################################################################
-## findfiles Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(findfiles LANGUAGES CXX)
-add_qt_executable(findfiles
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(findfiles WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(findfiles PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS findfiles
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
index 78b8cb7f51..eef8e33ca1 100644
--- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt
@@ -1,23 +1,29 @@
# Generated from licensewizard.pro.
-#####################################################################
-## licensewizard Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(licensewizard LANGUAGES CXX)
-add_qt_executable(licensewizard
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard"
- SOURCES
- licensewizard.cpp licensewizard.h
- main.cpp
- LIBRARIES
- Qt::Widgets
- Qt::PrintSupport
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(licensewizard "licensewizard" FILES
- images/logo.png
- images/watermark.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport)
+
+add_executable(licensewizard WIN32 MACOSX_BUNDLE
+ licensewizard.cpp licensewizard.h licensewizard.qrc
+ main.cpp
+)
+target_link_libraries(licensewizard PUBLIC
+ Qt::PrintSupport
+ Qt::Widgets
+)
+
+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 3c0ddc0199..2aa96fba06 100644
--- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
+++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from standarddialogs.pro.
-#####################################################################
-## standarddialogs Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(standarddialogs LANGUAGES CXX)
-add_qt_executable(standarddialogs
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs"
- SOURCES
- dialog.cpp dialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(standarddialogs WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ main.cpp
+)
+target_link_libraries(standarddialogs PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS standarddialogs
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
index a8cbbb4b4e..da05a322f3 100644
--- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt
+++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from tabdialog.pro.
-#####################################################################
-## tabdialog Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tabdialog LANGUAGES CXX)
-add_qt_executable(tabdialog
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog"
- SOURCES
- main.cpp
- tabdialog.cpp tabdialog.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(tabdialog WIN32 MACOSX_BUNDLE
+ main.cpp
+ tabdialog.cpp tabdialog.h
+)
+target_link_libraries(tabdialog PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS tabdialog
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
index 2deae77c0d..307945b2c2 100644
--- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
+++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from trivialwizard.pro.
-#####################################################################
-## trivialwizard Binary:
-#####################################################################
-
-add_qt_executable(trivialwizard
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard"
- SOURCES
- trivialwizard.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(trivialwizard LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(trivialwizard WIN32 MACOSX_BUNDLE
+ trivialwizard.cpp
+)
+target_link_libraries(trivialwizard PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS trivialwizard
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
index 62a7be0cef..ced583e1db 100644
--- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt
@@ -1,23 +1,28 @@
# Generated from draggableicons.pro.
-#####################################################################
-## draggableicons Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(draggableicons LANGUAGES CXX)
-add_qt_executable(draggableicons
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicons"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicons"
- SOURCES
- dragwidget.cpp dragwidget.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(draggableicons "draggableicons" FILES
- images/boat.png
- images/car.png
- images/house.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(draggableicons WIN32 MACOSX_BUNDLE
+ draggableicons.qrc
+ dragwidget.cpp dragwidget.h
+ main.cpp
+)
+target_link_libraries(draggableicons PUBLIC
+ Qt::Widgets
+)
+
+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 96ec5feff6..aa6656ed0b 100644
--- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
+++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt
@@ -1,21 +1,28 @@
# Generated from draggabletext.pro.
-#####################################################################
-## draggabletext Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(draggabletext LANGUAGES CXX)
-add_qt_executable(draggabletext
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext"
- SOURCES
- dragwidget.cpp dragwidget.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(draggabletext "draggabletext" PREFIX "/dictionary" FILES
- words.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(draggabletext WIN32 MACOSX_BUNDLE
+ draggabletext.qrc
+ dragwidget.cpp dragwidget.h
+ main.cpp
+)
+target_link_libraries(draggabletext PUBLIC
+ Qt::Widgets
+)
+
+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 0d54133750..abb850c0b6 100644
--- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt
+++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from dropsite.pro.
-#####################################################################
-## dropsite Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dropsite LANGUAGES CXX)
-add_qt_executable(dropsite
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite"
- SOURCES
- droparea.cpp droparea.h
- dropsitewindow.cpp dropsitewindow.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dropsite WIN32 MACOSX_BUNDLE
+ droparea.cpp droparea.h
+ dropsitewindow.cpp dropsitewindow.h
+ main.cpp
+)
+target_link_libraries(dropsite PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS dropsite
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
index fcd7f3da15..e0ab3d36c5 100644
--- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
+++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from fridgemagnets.pro.
-#####################################################################
-## fridgemagnets Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fridgemagnets LANGUAGES CXX)
-add_qt_executable(fridgemagnets
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets"
- SOURCES
- draglabel.cpp draglabel.h
- dragwidget.cpp dragwidget.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(fridgemagnets "fridgemagnets" PREFIX "/dictionary" FILES
- words.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fridgemagnets WIN32 MACOSX_BUNDLE
+ draglabel.cpp draglabel.h
+ dragwidget.cpp dragwidget.h
+ fridgemagnets.qrc
+ main.cpp
+)
+target_link_libraries(fridgemagnets PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS fridgemagnets
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
index 2622dd068e..b95d7b2cf4 100644
--- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt
+++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt
@@ -1,26 +1,30 @@
# Generated from puzzle.pro.
-#####################################################################
-## puzzle Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
-add_qt_executable(puzzle
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/puzzle"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/puzzle"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- pieceslist.cpp pieceslist.h
- puzzlewidget.cpp puzzlewidget.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(puzzle "puzzle" PREFIX "/images" FILES
- example.jpg)
+find_package(Qt5 COMPONENTS Widgets)
+add_executable(draganddrop_puzzle WIN32 MACOSX_BUNDLE # 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
+ Qt::Widgets
+)
-#### Keys ignored in scope 1:.:puzzle.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "dndpuzzle"
+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 f534c47102..c99beb310f 100644
--- a/examples/widgets/effects/blurpicker/CMakeLists.txt
+++ b/examples/widgets/effects/blurpicker/CMakeLists.txt
@@ -1,30 +1,28 @@
# Generated from blurpicker.pro.
-#####################################################################
-## blurpicker Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(blurpicker LANGUAGES CXX)
-add_qt_executable(blurpicker
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker"
- SOURCES
- blureffect.cpp blureffect.h
- blurpicker.cpp blurpicker.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(blurpicker "blurpicker" PREFIX "/" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(blurpicker WIN32 MACOSX_BUNDLE
+ blureffect.cpp blureffect.h
+ blurpicker.cpp blurpicker.h blurpicker.qrc
+ main.cpp
+)
+target_link_libraries(blurpicker PUBLIC
+ Qt::Widgets
+)
+
+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 838a10022e..689b0593ea 100644
--- a/examples/widgets/effects/fademessage/CMakeLists.txt
+++ b/examples/widgets/effects/fademessage/CMakeLists.txt
@@ -1,21 +1,27 @@
# Generated from fademessage.pro.
-#####################################################################
-## fademessage Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fademessage LANGUAGES CXX)
-add_qt_executable(fademessage
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage"
- SOURCES
- fademessage.cpp fademessage.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(fademessage "fademessage" PREFIX "/" FILES
- background.jpg)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fademessage WIN32 MACOSX_BUNDLE
+ fademessage.cpp fademessage.h fademessage.qrc
+ main.cpp
+)
+target_link_libraries(fademessage PUBLIC
+ Qt::Widgets
+)
+
+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 4862654314..1efaa42774 100644
--- a/examples/widgets/gestures/imagegestures/CMakeLists.txt
+++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from imagegestures.pro.
-#####################################################################
-## imagegestures Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(imagegestures LANGUAGES CXX)
-add_qt_executable(imagegestures
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures"
- SOURCES
- imagewidget.cpp imagewidget.h
- main.cpp
- mainwidget.cpp mainwidget.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(imagegestures WIN32 MACOSX_BUNDLE
+ imagewidget.cpp imagewidget.h
+ main.cpp
+ mainwidget.cpp mainwidget.h
+)
+target_link_libraries(imagegestures PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS imagegestures
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
index 8149f96784..1488f394c6 100644
--- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from anchorlayout.pro.
-#####################################################################
-## anchorlayout Binary:
-#####################################################################
-
-add_qt_executable(anchorlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(anchorlayout LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(anchorlayout WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(anchorlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS anchorlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
index d285a35ecc..0ce632e6b6 100644
--- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
+++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from basicgraphicslayouts.pro.
-#####################################################################
-## basicgraphicslayouts Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(basicgraphicslayouts LANGUAGES CXX)
-add_qt_executable(basicgraphicslayouts
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphicslayouts"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphicslayouts"
- SOURCES
- layoutitem.cpp layoutitem.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(basicgraphicslayouts "basicgraphicslayouts" FILES
- images/block.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(basicgraphicslayouts WIN32 MACOSX_BUNDLE
+ basicgraphicslayouts.qrc
+ layoutitem.cpp layoutitem.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(basicgraphicslayouts PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS basicgraphicslayouts
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/boxes/CMakeLists.txt b/examples/widgets/graphicsview/boxes/CMakeLists.txt
index 11331b1906..4e1d105a3a 100644
--- a/examples/widgets/graphicsview/boxes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/boxes/CMakeLists.txt
@@ -1,52 +1,38 @@
# Generated from boxes.pro.
-#####################################################################
-## boxes Binary:
-#####################################################################
-
-add_qt_executable(boxes
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/boxes"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/boxes"
- SOURCES
- 3rdparty/fbm.c 3rdparty/fbm.h
- glbuffers.cpp glbuffers.h
- glextensions.cpp glextensions.h
- gltrianglemesh.h
- main.cpp
- qtbox.cpp qtbox.h
- roundedbox.cpp roundedbox.h
- scene.cpp scene.h
- trackball.cpp trackball.h
- LIBRARIES
- Qt::OpenGL
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(boxes LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS OpenGL)
+find_package(Qt5 COMPONENTS Widgets)
+
+
+add_executable(boxes WIN32 MACOSX_BUNDLE
+ 3rdparty/fbm.c 3rdparty/fbm.h
+ boxes.qrc
+ glbuffers.cpp glbuffers.h
+ glextensions.cpp glextensions.h
+ gltrianglemesh.h
+ main.cpp
+ qtbox.cpp qtbox.h
+ roundedbox.cpp roundedbox.h
+ scene.cpp scene.h
+ trackball.cpp trackball.h
+)
+target_link_libraries(boxes PUBLIC
+ Qt::OpenGL
+ Qt::Widgets
)
-# Resources:
-add_qt_resource(boxes "boxes" PREFIX "/res/boxes" FILES
- basic.fsh
- basic.vsh
- cubemap_negx.jpg
- cubemap_negy.jpg
- cubemap_negz.jpg
- cubemap_posx.jpg
- cubemap_posy.jpg
- cubemap_posz.jpg
- dotted.fsh
- fresnel.fsh
- glass.fsh
- granite.fsh
- marble.fsh
- parameters.par
- qt-logo.jpg
- qt-logo.png
- reflection.fsh
- refraction.fsh
- smiley.png
- square.jpg
- wood.fsh)
-
-
-## Scopes:
-#####################################################################
+install(TARGETS boxes
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt
index 566a8aae02..81f290be99 100644
--- a/examples/widgets/graphicsview/chip/CMakeLists.txt
+++ b/examples/widgets/graphicsview/chip/CMakeLists.txt
@@ -1,44 +1,38 @@
# Generated from chip.pro.
-#####################################################################
-## chip Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(chip LANGUAGES CXX)
-add_qt_executable(chip
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/chip"
- SOURCES
- chip.cpp chip.h
- main.cpp
- mainwindow.cpp mainwindow.h
- view.cpp view.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(chip "images" FILES
- fileprint.png
- qt4logo.png
- rotateleft.png
- rotateright.png
- zoomin.png
- zoomout.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS OpenGL) # special case
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-extend_target(chip CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+add_executable(chip WIN32 MACOSX_BUNDLE
+ chip.cpp chip.h
+ images.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ view.cpp view.h
)
-
-extend_target(chip CONDITION TARGET Qt::OpenGL
- LIBRARIES
- Qt::OpenGL
+target_link_libraries(chip PUBLIC
+ 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)
+endif()
+
+install(TARGETS chip
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-#### Keys ignored in scope 4:.:chip.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
index 5455bec89e..36b1fb85c1 100644
--- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
+++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt
@@ -1,21 +1,28 @@
# Generated from collidingmice.pro.
-#####################################################################
-## collidingmice Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(collidingmice LANGUAGES CXX)
-add_qt_executable(collidingmice
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmice"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmice"
- SOURCES
- main.cpp
- mouse.cpp mouse.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(collidingmice "mice" PREFIX "/" FILES
- images/cheese.jpg)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(collidingmice WIN32 MACOSX_BUNDLE
+ main.cpp
+ mice.qrc
+ mouse.cpp mouse.h
+)
+target_link_libraries(collidingmice PUBLIC
+ Qt::Widgets
+)
+
+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 fb3ff6c712..76f60aabaa 100644
--- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
+++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt
@@ -1,39 +1,31 @@
# Generated from diagramscene.pro.
-#####################################################################
-## diagramscene Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(diagramscene LANGUAGES CXX)
-add_qt_executable(diagramscene
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene"
- SOURCES
- arrow.cpp arrow.h
- diagramitem.cpp diagramitem.h
- diagramscene.cpp diagramscene.h
- diagramtextitem.cpp diagramtextitem.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(diagramscene "diagramscene" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(diagramscene WIN32 MACOSX_BUNDLE
+ arrow.cpp arrow.h
+ diagramitem.cpp diagramitem.h
+ diagramscene.cpp diagramscene.h diagramscene.qrc
+ diagramtextitem.cpp diagramtextitem.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(diagramscene PUBLIC
+ Qt::Widgets
+)
+
+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 76932368e8..2adcff3ae5 100644
--- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
+++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt
@@ -1,22 +1,28 @@
# Generated from dragdroprobot.pro.
-#####################################################################
-## dragdroprobot Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dragdroprobot LANGUAGES CXX)
-add_qt_executable(dragdroprobot
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobot"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobot"
- SOURCES
- coloritem.cpp coloritem.h
- main.cpp
- robot.cpp robot.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(dragdroprobot "robot" PREFIX "/" FILES
- images/head.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dragdroprobot WIN32 MACOSX_BUNDLE
+ coloritem.cpp coloritem.h
+ main.cpp
+ robot.cpp robot.h robot.qrc
+)
+target_link_libraries(dragdroprobot PUBLIC
+ Qt::Widgets
+)
+
+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 d1c10327b0..42fd71fa5f 100644
--- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
+++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt
@@ -1,18 +1,29 @@
# Generated from elasticnodes.pro.
-#####################################################################
-## elasticnodes Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(elasticnodes LANGUAGES CXX)
-add_qt_executable(elasticnodes
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes"
- SOURCES
- edge.cpp edge.h
- graphwidget.cpp graphwidget.h
- main.cpp
- node.cpp node.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(elasticnodes WIN32 MACOSX_BUNDLE
+ edge.cpp edge.h
+ graphwidget.cpp graphwidget.h
+ main.cpp
+ node.cpp node.h
+)
+target_link_libraries(elasticnodes PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS elasticnodes
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
index dda61e0f68..2652b985df 100644
--- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
+++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt
@@ -1,30 +1,29 @@
# Generated from embeddeddialogs.pro.
-#####################################################################
-## embeddeddialogs Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(embeddeddialogs LANGUAGES CXX)
-add_qt_executable(embeddeddialogs
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddialogs"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddialogs"
- SOURCES
- customproxy.cpp customproxy.h
- embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(embeddeddialogs "embeddeddialogs" FILES
- No-Ones-Laughing-3.jpg)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 2:.:.:embeddeddialogs.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+add_executable(embeddeddialogs WIN32 MACOSX_BUNDLE
+ customproxy.cpp customproxy.h
+ embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui
+ embeddeddialogs.qrc
+ main.cpp
+)
+target_link_libraries(embeddeddialogs PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS embeddeddialogs
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
index 2d313ff700..96b82b7955 100644
--- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt
@@ -1,20 +1,28 @@
# Generated from flowlayout.pro.
-#####################################################################
-## flowlayout Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(flowlayout LANGUAGES CXX)
-add_qt_executable(flowlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/flowlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/flowlayout"
- SOURCES
- flowlayout.cpp flowlayout.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(graphicsview_flowlayout WIN32 MACOSX_BUNDLE # special case: renamed flowlayout
+ flowlayout.cpp flowlayout.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(graphicsview_flowlayout PUBLIC # special case: renamed flowlayout
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:flowlayout.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "flowlayout_graphicsview"
+install(TARGETS graphicsview_flowlayout # special case: renamed flowlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..9c4282391e
--- /dev/null
+++ b/examples/widgets/graphicsview/padnavigator/.prev_CMakeLists.txt
@@ -0,0 +1,45 @@
+# 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
+)
+
+# 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
+ Qt::OpenGL
+)
diff --git a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
index 9c4282391e..e995f2a16e 100644
--- a/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
+++ b/examples/widgets/graphicsview/padnavigator/CMakeLists.txt
@@ -1,45 +1,37 @@
# Generated from padnavigator.pro.
-#####################################################################
-## padnavigator Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(padnavigator LANGUAGES CXX)
-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
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# 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)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:.:padnavigator.pro:<TRUE>:
-# CONFIG = "console"
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS OpenGL) # special case
-## Scopes:
-#####################################################################
+add_executable(padnavigator
+ flippablepad.cpp flippablepad.h
+ form.ui
+ main.cpp
+ padnavigator.cpp padnavigator.h padnavigator.qrc
+ roundrectitem.cpp roundrectitem.h
+ splashitem.cpp splashitem.h
+)
+target_link_libraries(padnavigator PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::OpenGL)
+ target_link_libraries(padnavigator PUBLIC Qt::OpenGL)
+endif()
+# special case end
-extend_target(padnavigator CONDITION TARGET Qt::OpenGL
- PUBLIC_LIBRARIES
- Qt::OpenGL
+install(TARGETS padnavigator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
index 87e4742b44..afb35675d8 100644
--- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from simpleanchorlayout.pro.
-#####################################################################
-## simpleanchorlayout Binary:
-#####################################################################
-
-add_qt_executable(simpleanchorlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchorlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchorlayout"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(simpleanchorlayout LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(simpleanchorlayout WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(simpleanchorlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS simpleanchorlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
index 5a20bbdb2e..750352e325 100644
--- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
+++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt
@@ -1,25 +1,27 @@
# Generated from weatheranchorlayout.pro.
-#####################################################################
-## weatheranchorlayout Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(weatheranchorlayout LANGUAGES CXX)
-add_qt_executable(weatheranchorlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatheranchorlayout"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(weatheranchorlayout "weatheranchorlayout" FILES
- images/5days.jpg
- images/details.jpg
- images/place.jpg
- images/tabbar.jpg
- images/title.jpg
- images/weather-few-clouds.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(weatheranchorlayout WIN32 MACOSX_BUNDLE
+ main.cpp
+ weatheranchorlayout.qrc
+)
+target_link_libraries(weatheranchorlayout PUBLIC
+ Qt::Widgets
+)
+
+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 cee0ef70e2..026c2406a4 100644
--- a/examples/widgets/itemviews/addressbook/CMakeLists.txt
+++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt
@@ -1,20 +1,31 @@
# Generated from addressbook.pro.
-#####################################################################
-## addressbook Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(addressbook LANGUAGES CXX)
-add_qt_executable(addressbook
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook"
- SOURCES
- adddialog.cpp adddialog.h
- addresswidget.cpp addresswidget.h
- main.cpp
- mainwindow.cpp mainwindow.h
- newaddresstab.cpp newaddresstab.h
- tablemodel.cpp tablemodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(addressbook WIN32 MACOSX_BUNDLE
+ adddialog.cpp adddialog.h
+ addresswidget.cpp addresswidget.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ newaddresstab.cpp newaddresstab.h
+ tablemodel.cpp tablemodel.h
+)
+target_link_libraries(addressbook PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS addressbook
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
index 6da9a73867..2efba58b10 100644
--- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from basicsortfiltermodel.pro.
-#####################################################################
-## basicsortfiltermodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(basicsortfiltermodel LANGUAGES CXX)
-add_qt_executable(basicsortfiltermodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfiltermodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfiltermodel"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(basicsortfiltermodel WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(basicsortfiltermodel PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS basicsortfiltermodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt
index 9d707d1ec6..79c489b03e 100644
--- a/examples/widgets/itemviews/chart/CMakeLists.txt
+++ b/examples/widgets/itemviews/chart/CMakeLists.txt
@@ -1,30 +1,29 @@
# Generated from chart.pro.
-#####################################################################
-## chart Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(chart LANGUAGES CXX)
-add_qt_executable(chart
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- pieview.cpp pieview.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(chart "chart" PREFIX "/Charts" FILES
- qtdata.cht)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(chart WIN32 MACOSX_BUNDLE
+ chart.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pieview.cpp pieview.h
+)
+target_link_libraries(chart PUBLIC
+ Qt::Widgets
+)
-extend_target(chart CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS
- LIBRARIES
- m
+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 317489e6e2..c33cc61118 100644
--- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
+++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from coloreditorfactory.pro.
-#####################################################################
-## coloreditorfactory Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(coloreditorfactory LANGUAGES CXX)
-add_qt_executable(coloreditorfactory
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfactory"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfactory"
- SOURCES
- colorlisteditor.cpp colorlisteditor.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(coloreditorfactory WIN32 MACOSX_BUNDLE
+ colorlisteditor.cpp colorlisteditor.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(coloreditorfactory PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS coloreditorfactory
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
index 326df33ba2..7cce164bc6 100644
--- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from combowidgetmapper.pro.
-#####################################################################
-## combowidgetmapper Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(combowidgetmapper LANGUAGES CXX)
-add_qt_executable(combowidgetmapper
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapper"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(combowidgetmapper WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(combowidgetmapper PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS combowidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
index 6cbfa84ae1..0aa34c46d8 100644
--- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt
@@ -1,23 +1,30 @@
# Generated from customsortfiltermodel.pro.
-#####################################################################
-## customsortfiltermodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customsortfiltermodel LANGUAGES CXX)
-add_qt_executable(customsortfiltermodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfiltermodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfiltermodel"
- SOURCES
- filterwidget.cpp filterwidget.h
- main.cpp
- mysortfilterproxymodel.cpp mysortfilterproxymodel.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(customsortfiltermodel "customsortfiltermodel" PREFIX "/" FILES
- images/find.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customsortfiltermodel WIN32 MACOSX_BUNDLE
+ customsortfiltermodel.qrc
+ filterwidget.cpp filterwidget.h
+ main.cpp
+ mysortfilterproxymodel.cpp mysortfilterproxymodel.h
+ window.cpp window.h
+)
+target_link_libraries(customsortfiltermodel PUBLIC
+ Qt::Widgets
+)
+
+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 5ad3455249..3e6e7c9ac7 100644
--- a/examples/widgets/itemviews/dirview/CMakeLists.txt
+++ b/examples/widgets/itemviews/dirview/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from dirview.pro.
-#####################################################################
-## dirview Binary:
-#####################################################################
-
-add_qt_executable(dirview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(dirview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dirview WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(dirview PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS dirview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
index 9cb49e0a25..c86c0d7272 100644
--- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt
@@ -1,25 +1,30 @@
# Generated from editabletreemodel.pro.
-#####################################################################
-## editabletreemodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(editabletreemodel LANGUAGES CXX)
-add_qt_executable(editabletreemodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemodel"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- treeitem.cpp treeitem.h
- treemodel.cpp treemodel.h
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(editabletreemodel "editabletreemodel" PREFIX "/" FILES
- default.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(editabletreemodel WIN32 MACOSX_BUNDLE
+ editabletreemodel.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ treeitem.cpp treeitem.h
+ treemodel.cpp treemodel.h
+)
+target_link_libraries(editabletreemodel PUBLIC
+ Qt::Widgets
+)
+
+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 d3f2578302..5013d5bab2 100644
--- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt
+++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from fetchmore.pro.
-#####################################################################
-## fetchmore Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fetchmore LANGUAGES CXX)
-add_qt_executable(fetchmore
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore"
- SOURCES
- filelistmodel.cpp filelistmodel.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fetchmore WIN32 MACOSX_BUNDLE
+ filelistmodel.cpp filelistmodel.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(fetchmore PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS fetchmore
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
index c8bffce970..afcb66a6b2 100644
--- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt
+++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from flattreeview.pro.
-#####################################################################
-## flattreeview Binary:
-#####################################################################
-
-add_qt_executable(flattreeview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(flattreeview LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(flattreeview WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(flattreeview PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS flattreeview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
index 11e8a1e471..a17ffef5fc 100644
--- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
+++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt
@@ -1,21 +1,28 @@
# Generated from frozencolumn.pro.
-#####################################################################
-## frozencolumn Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(frozencolumn LANGUAGES CXX)
-add_qt_executable(frozencolumn
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn"
- SOURCES
- freezetablewidget.cpp freezetablewidget.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(frozencolumn "grades" PREFIX "/" FILES
- grades.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(frozencolumn WIN32 MACOSX_BUNDLE
+ freezetablewidget.cpp freezetablewidget.h
+ grades.qrc
+ main.cpp
+)
+target_link_libraries(frozencolumn PUBLIC
+ Qt::Widgets
+)
+
+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 d970348bc6..f14bded157 100644
--- a/examples/widgets/itemviews/interview/CMakeLists.txt
+++ b/examples/widgets/itemviews/interview/CMakeLists.txt
@@ -1,32 +1,28 @@
# Generated from interview.pro.
-#####################################################################
-## interview Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(interview LANGUAGES CXX)
-add_qt_executable(interview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview"
- SOURCES
- main.cpp
- model.cpp model.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(interview "interview" PREFIX "/" FILES
- images/folder.png
- images/interview.png
- images/services.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:interview.pro:<NONE>:
-# TEMPLATE = "app"
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(interview WIN32 MACOSX_BUNDLE
+ interview.qrc
+ main.cpp
+ model.cpp model.h
+)
+target_link_libraries(interview PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 2:.:interview.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+install(TARGETS interview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt
index fc29cde3b1..e9a04a0807 100644
--- a/examples/widgets/itemviews/pixelator/CMakeLists.txt
+++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt
@@ -1,31 +1,36 @@
# Generated from pixelator.pro.
-#####################################################################
-## pixelator Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(pixelator LANGUAGES CXX)
-add_qt_executable(pixelator
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/pixelator"
- SOURCES
- imagemodel.cpp imagemodel.h
- main.cpp
- mainwindow.cpp mainwindow.h
- pixeldelegate.cpp pixeldelegate.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(pixelator "images" FILES
- images/qt.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-extend_target(pixelator CONDITION TARGET Qt::PrintSupport
- LIBRARIES
+add_executable(pixelator WIN32 MACOSX_BUNDLE
+ imagemodel.cpp imagemodel.h
+ images.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ pixeldelegate.cpp pixeldelegate.h
+)
+target_link_libraries(pixelator PUBLIC
+ Qt::Widgets
+)
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(pixelator PUBLIC
Qt::PrintSupport
+ )
+endif()
+
+install(TARGETS pixelator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt
index a105278418..cffbdbb1b0 100644
--- a/examples/widgets/itemviews/puzzle/CMakeLists.txt
+++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt
@@ -1,23 +1,30 @@
# Generated from puzzle.pro.
-#####################################################################
-## puzzle Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(puzzle LANGUAGES CXX)
-add_qt_executable(puzzle_itemview # special case
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- piecesmodel.cpp piecesmodel.h
- puzzlewidget.cpp puzzlewidget.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(puzzle_itemview "puzzle" PREFIX "/images" FILES # special case
- example.jpg)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(itemviews_puzzle WIN32 MACOSX_BUNDLE # 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
+ Qt::Widgets
+)
+
+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 2514287049..4a1812d96d 100644
--- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt
@@ -1,19 +1,31 @@
# Generated from simpledommodel.pro.
-#####################################################################
-## simpledommodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(simpledommodel LANGUAGES CXX)
-add_qt_executable(simpledommodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel"
- SOURCES
- domitem.cpp domitem.h
- dommodel.cpp dommodel.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Xml
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Xml)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(simpledommodel WIN32 MACOSX_BUNDLE
+ domitem.cpp domitem.h
+ dommodel.cpp dommodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(simpledommodel PUBLIC
+ Qt::Widgets
+ Qt::Xml
+)
+
+install(TARGETS simpledommodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
index 1b50a3508c..3fb889229d 100644
--- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
+++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from simpletreemodel.pro.
-#####################################################################
-## simpletreemodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(simpletreemodel LANGUAGES CXX)
-add_qt_executable(simpletreemodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel"
- SOURCES
- main.cpp
- treeitem.cpp treeitem.h
- treemodel.cpp treemodel.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(simpletreemodel "simpletreemodel" FILES
- default.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(simpletreemodel WIN32 MACOSX_BUNDLE
+ main.cpp
+ simpletreemodel.qrc
+ treeitem.cpp treeitem.h
+ treemodel.cpp treemodel.h
+)
+target_link_libraries(simpletreemodel PUBLIC
+ Qt::Widgets
+)
+
+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 849f7e2969..d25d491544 100644
--- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
+++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from simplewidgetmapper.pro.
-#####################################################################
-## simplewidgetmapper Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(simplewidgetmapper LANGUAGES CXX)
-add_qt_executable(simplewidgetmapper
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmapper"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmapper"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(simplewidgetmapper WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(simplewidgetmapper PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS simplewidgetmapper
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
index b8c24f591c..809c1cd0d0 100644
--- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from spinboxdelegate.pro.
-#####################################################################
-## spinboxdelegate Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(spinboxdelegate LANGUAGES CXX)
-add_qt_executable(spinboxdelegate
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate"
- SOURCES
- delegate.cpp delegate.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(spinboxdelegate WIN32 MACOSX_BUNDLE
+ delegate.cpp delegate.h
+ main.cpp
+)
+target_link_libraries(spinboxdelegate PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS spinboxdelegate
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
index 498164c1cd..811caec6a6 100644
--- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
+++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt
@@ -1,35 +1,36 @@
# Generated from spreadsheet.pro.
-#####################################################################
-## spreadsheet Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(spreadsheet LANGUAGES CXX)
-add_qt_executable(spreadsheet
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spreadsheet"
- SOURCES
- main.cpp
- printview.cpp printview.h
- spreadsheet.cpp spreadsheet.h
- spreadsheetdelegate.cpp spreadsheetdelegate.h
- spreadsheetitem.cpp spreadsheetitem.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(spreadsheet "spreadsheet" PREFIX "/" FILES
- images/interview.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-extend_target(spreadsheet CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+add_executable(spreadsheet WIN32 MACOSX_BUNDLE
+ main.cpp
+ printview.cpp printview.h
+ spreadsheet.cpp spreadsheet.h spreadsheet.qrc
+ spreadsheetdelegate.cpp spreadsheetdelegate.h
+ spreadsheetitem.cpp spreadsheetitem.h
+)
+target_link_libraries(spreadsheet PUBLIC
+ Qt::Widgets
)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(spreadsheet PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-#### Keys ignored in scope 3:.:spreadsheet.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+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 0b94a12fb6..8cfb991143 100644
--- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt
+++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt
@@ -1,18 +1,29 @@
# Generated from stardelegate.pro.
-#####################################################################
-## stardelegate Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(stardelegate LANGUAGES CXX)
-add_qt_executable(stardelegate
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate"
- SOURCES
- main.cpp
- stardelegate.cpp stardelegate.h
- stareditor.cpp stareditor.h
- starrating.cpp starrating.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(stardelegate WIN32 MACOSX_BUNDLE
+ main.cpp
+ stardelegate.cpp stardelegate.h
+ stareditor.cpp stareditor.h
+ starrating.cpp starrating.h
+)
+target_link_libraries(stardelegate PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS stardelegate
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt
index efad83e1a1..d25d839347 100644
--- a/examples/widgets/itemviews/storageview/CMakeLists.txt
+++ b/examples/widgets/itemviews/storageview/CMakeLists.txt
@@ -1,20 +1,31 @@
# Generated from storageview.pro.
-#####################################################################
-## storageview Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(storageview LANGUAGES CXX)
-add_qt_executable(storageview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview"
- SOURCES
- main.cpp
- storagemodel.cpp storagemodel.h
- LIBRARIES
- Qt::Gui
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Gui)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(storageview WIN32 MACOSX_BUNDLE
+ main.cpp
+ storagemodel.cpp storagemodel.h
+)
+target_link_libraries(storageview PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:storageview.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS storageview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/layouts/basiclayouts/CMakeLists.txt b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
index 28ac6a48b2..83c4833b9d 100644
--- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from basiclayouts.pro.
-#####################################################################
-## basiclayouts Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(basiclayouts LANGUAGES CXX)
-add_qt_executable(basiclayouts
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts"
- SOURCES
- dialog.cpp dialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(basiclayouts WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ main.cpp
+)
+target_link_libraries(basiclayouts PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS basiclayouts
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt
index 72cf6002a2..cfe34ad68f 100644
--- a/examples/widgets/layouts/borderlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from borderlayout.pro.
-#####################################################################
-## borderlayout Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(borderlayout LANGUAGES CXX)
-add_qt_executable(borderlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout"
- SOURCES
- borderlayout.cpp borderlayout.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(borderlayout WIN32 MACOSX_BUNDLE
+ borderlayout.cpp borderlayout.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(borderlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS borderlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
index 47f935bf68..1989672b9c 100644
--- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
+++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from dynamiclayouts.pro.
-#####################################################################
-## dynamiclayouts Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dynamiclayouts LANGUAGES CXX)
-add_qt_executable(dynamiclayouts
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts"
- SOURCES
- dialog.cpp dialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dynamiclayouts WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ main.cpp
+)
+target_link_libraries(dynamiclayouts PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS dynamiclayouts
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt
index a887abb93e..6a7ad689ca 100644
--- a/examples/widgets/layouts/flowlayout/CMakeLists.txt
+++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from flowlayout.pro.
-#####################################################################
-## flowlayout Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(flowlayout LANGUAGES CXX)
-add_qt_executable(flowlayout_layout # special case
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout"
- SOURCES
- flowlayout.cpp flowlayout.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(flowlayout WIN32 MACOSX_BUNDLE
+ flowlayout.cpp flowlayout.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(flowlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS flowlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
index 52d1db1d9e..d442ccacd0 100644
--- a/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
+++ b/examples/widgets/mac/qmaccocoaviewcontainer/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from qmaccocoaviewcontainer.pro.
-#####################################################################
-## qmaccocoaviewcontainer Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(qmaccocoaviewcontainer LANGUAGES CXX)
-add_qt_executable(qmaccocoaviewcontainer
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmaccocoaviewcontainer"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmaccocoaviewcontainer"
- SOURCES
- main.mm
- LIBRARIES
- Qt::Widgets
- ${FWAppKit}
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(qmaccocoaviewcontainer WIN32 MACOSX_BUNDLE
+ main.mm
+)
+target_link_libraries(qmaccocoaviewcontainer PUBLIC
+ ${FWAppKit}
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:qmaccocoaviewcontainer.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS qmaccocoaviewcontainer
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
index 9708fae762..267b49361f 100644
--- a/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
+++ b/examples/widgets/mac/qmacnativewidget/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from qmacnativewidget.pro.
-#####################################################################
-## qmacnativewidget Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(qmacnativewidget LANGUAGES CXX)
-add_qt_executable(qmacnativewidget
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmacnativewidget"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mac/qmacnativewidget"
- SOURCES
- main.mm
- LIBRARIES
- Qt::Widgets
- ${FWAppKit}
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(qmacnativewidget WIN32 MACOSX_BUNDLE
+ main.mm
+)
+target_link_libraries(qmacnativewidget PUBLIC
+ ${FWAppKit}
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:qmacnativewidget.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS qmacnativewidget
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt
index 8a9bdea2c2..67ac4637ff 100644
--- a/examples/widgets/mainwindows/application/CMakeLists.txt
+++ b/examples/widgets/mainwindows/application/CMakeLists.txt
@@ -1,26 +1,28 @@
# Generated from application.pro.
-#####################################################################
-## application Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(application LANGUAGES CXX)
-add_qt_executable(application
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(application "application" FILES
- images/copy.png
- images/cut.png
- images/new.png
- images/open.png
- images/paste.png
- images/save.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(application WIN32 MACOSX_BUNDLE
+ application.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(application PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS application
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
index e8fd580fd8..ceacc184da 100644
--- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
+++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt
@@ -1,32 +1,34 @@
# Generated from dockwidgets.pro.
-#####################################################################
-## dockwidgets Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dockwidgets LANGUAGES CXX)
-add_qt_executable(dockwidgets
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/dockwidgets"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(dockwidgets "dockwidgets" FILES
- images/new.png
- images/print.png
- images/save.png
- images/undo.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-## Scopes:
-#####################################################################
+add_executable(dockwidgets WIN32 MACOSX_BUNDLE
+ dockwidgets.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(dockwidgets PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(dockwidgets PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-extend_target(dockwidgets CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+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 df1d9b6355..5af2a7ffe9 100644
--- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt
@@ -1,35 +1,29 @@
# Generated from mainwindow.pro.
-#####################################################################
-## mainwindow Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mainwindow LANGUAGES CXX)
-add_qt_executable(mainwindow
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow"
- SOURCES
- colorswatch.cpp colorswatch.h
- main.cpp
- mainwindow.cpp mainwindow.h
- toolbar.cpp toolbar.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(mainwindow "mainwindow" PREFIX "/res" FILES
- qt.png
- titlebarCenter.png
- titlebarLeft.png
- titlebarRight.png)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:mainwindow.pro:<NONE>:
-# TEMPLATE = "app"
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(mainwindow WIN32 MACOSX_BUNDLE
+ colorswatch.cpp colorswatch.h
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.qrc
+ toolbar.cpp toolbar.h
+)
+target_link_libraries(mainwindow PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 2:.:mainwindow.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+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 c20acbdfca..481e2477c1 100644
--- a/examples/widgets/mainwindows/mdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt
@@ -1,27 +1,29 @@
# Generated from mdi.pro.
-#####################################################################
-## mdi Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mdi LANGUAGES CXX)
-add_qt_executable(mdi
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- mdichild.cpp mdichild.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(mdi "mdi" FILES
- images/copy.png
- images/cut.png
- images/new.png
- images/open.png
- images/paste.png
- images/save.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mdi WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mdi.qrc
+ mdichild.cpp mdichild.h
+)
+target_link_libraries(mdi PUBLIC
+ Qt::Widgets
+)
+
+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 6d7e471a8c..a10ef9090e 100644
--- a/examples/widgets/mainwindows/menus/CMakeLists.txt
+++ b/examples/widgets/mainwindows/menus/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from menus.pro.
-#####################################################################
-## menus Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(menus LANGUAGES CXX)
-add_qt_executable(menus
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(menus WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(menus PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS menus
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt
index 8391aa0cbc..81cb80f7a3 100644
--- a/examples/widgets/mainwindows/sdi/CMakeLists.txt
+++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt
@@ -1,26 +1,28 @@
# Generated from sdi.pro.
-#####################################################################
-## sdi Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sdi LANGUAGES CXX)
-add_qt_executable(sdi
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(sdi "sdi" FILES
- images/copy.png
- images/cut.png
- images/new.png
- images/open.png
- images/paste.png
- images/save.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(sdi WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ sdi.qrc
+)
+target_link_libraries(sdi PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS sdi
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt
index cda43296dd..a3dc7861fa 100644
--- a/examples/widgets/painting/affine/CMakeLists.txt
+++ b/examples/widgets/painting/affine/CMakeLists.txt
@@ -1,23 +1,33 @@
# Generated from affine.pro.
-#####################################################################
-## affine Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(affine LANGUAGES CXX)
-add_qt_executable(affine
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/affine"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/affine"
- SOURCES
- main.cpp
- xform.cpp xform.h
- # INCLUDE_DIRECTORIES ../shared # special case
- LIBRARIES # special case
- painting_shared
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(affine WIN32 MACOSX_BUNDLE
+ # 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::Widgets
+ painting_shared # special case
)
-# Resources:
-add_qt_resource(affine "affine" PREFIX "/res/affine" FILES
- bg1.jpg
- xform.cpp
- xform.html)
+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 176149dad5..d0a0ac749d 100644
--- a/examples/widgets/painting/basicdrawing/CMakeLists.txt
+++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt
@@ -1,23 +1,29 @@
# Generated from basicdrawing.pro.
-#####################################################################
-## basicdrawing Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(basicdrawing LANGUAGES CXX)
-add_qt_executable(basicdrawing
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing"
- SOURCES
- main.cpp
- renderarea.cpp renderarea.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(basicdrawing "basicdrawing" FILES
- images/brick.png
- images/qt-logo.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(basicdrawing WIN32 MACOSX_BUNDLE
+ basicdrawing.qrc
+ main.cpp
+ renderarea.cpp renderarea.h
+ window.cpp window.h
+)
+target_link_libraries(basicdrawing PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS basicdrawing
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt
index 1e83bc4814..d083cf00dd 100644
--- a/examples/widgets/painting/composition/CMakeLists.txt
+++ b/examples/widgets/painting/composition/CMakeLists.txt
@@ -1,23 +1,32 @@
# Generated from composition.pro.
-#####################################################################
-## composition Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(composition LANGUAGES CXX)
-add_qt_executable(composition
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/composition"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/composition"
- SOURCES
- composition.cpp composition.h
- main.cpp
- LIBRARIES # special case
- painting_shared
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(composition WIN32 MACOSX_BUNDLE
+ # special case: remove files from ../shared
+ composition.cpp composition.h composition.qrc
+ main.cpp
+)
+target_include_directories(composition PUBLIC
+ ../shared
+)
+target_link_libraries(composition PUBLIC
+ Qt::Widgets
+ painting_shared # special case
)
-# Resources:
-add_qt_resource(composition "composition" PREFIX "/res/composition" FILES
- composition.cpp
- composition.html
- flower.jpg
- flower_alpha.jpg)
+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 a2305782a5..edbfea218d 100644
--- a/examples/widgets/painting/concentriccircles/CMakeLists.txt
+++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from concentriccircles.pro.
-#####################################################################
-## concentriccircles Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(concentriccircles LANGUAGES CXX)
-add_qt_executable(concentriccircles
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircles"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircles"
- SOURCES
- circlewidget.cpp circlewidget.h
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(concentriccircles WIN32 MACOSX_BUNDLE
+ circlewidget.cpp circlewidget.h
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(concentriccircles PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS concentriccircles
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt
index 67622da25d..591bc552ea 100644
--- a/examples/widgets/painting/deform/CMakeLists.txt
+++ b/examples/widgets/painting/deform/CMakeLists.txt
@@ -1,21 +1,33 @@
# Generated from deform.pro.
-#####################################################################
-## deform Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(deform LANGUAGES CXX)
-add_qt_executable(deform
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/deform"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/deform"
- SOURCES
- main.cpp
- pathdeform.cpp pathdeform.h
- LIBRARIES # special case
- painting_shared
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(deform WIN32 MACOSX_BUNDLE
+ # 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::Widgets
+ painting_shared # special case
)
-# Resources:
-add_qt_resource(deform "deform" PREFIX "/res/deform" FILES
- pathdeform.cpp
- pathdeform.html)
+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 38bb59eb6c..e533cdb63a 100644
--- a/examples/widgets/painting/fontsampler/CMakeLists.txt
+++ b/examples/widgets/painting/fontsampler/CMakeLists.txt
@@ -1,27 +1,28 @@
# Generated from fontsampler.pro.
-#####################################################################
-## fontsampler Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fontsampler LANGUAGES CXX)
-add_qt_executable(fontsampler
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/fontsampler"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/fontsampler"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- mainwindowbase.ui
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(fontsampler WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mainwindowbase.ui
+)
+target_link_libraries(fontsampler PUBLIC
+ Qt::Widgets
+)
-extend_target(fontsampler CONDITION TARGET Qt::PrintSupport
- PUBLIC_LIBRARIES
- Qt::PrintSupport
+install(TARGETS fontsampler
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt
index 0d5553b986..b25739e919 100644
--- a/examples/widgets/painting/gradients/CMakeLists.txt
+++ b/examples/widgets/painting/gradients/CMakeLists.txt
@@ -1,21 +1,32 @@
# Generated from gradients.pro.
-#####################################################################
-## gradients Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(gradients LANGUAGES CXX)
-add_qt_executable(gradients
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients"
- SOURCES
- gradients.cpp gradients.h
- main.cpp
- LIBRARIES # special case
- painting_shared
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(gradients WIN32 MACOSX_BUNDLE
+ # special case: remove files from ../shared
+ gradients.cpp gradients.h gradients.qrc
+ main.cpp
+)
+target_include_directories(gradients PUBLIC
+ ../shared
+)
+target_link_libraries(gradients PUBLIC
+ Qt::Widgets
+ painting_shared # special case
)
-# Resources:
-add_qt_resource(gradients "gradients" PREFIX "/res/gradients" FILES
- gradients.cpp
- gradients.html)
+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 eed2bede43..506a3d8510 100644
--- a/examples/widgets/painting/imagecomposition/CMakeLists.txt
+++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt
@@ -1,22 +1,28 @@
# Generated from imagecomposition.pro.
-#####################################################################
-## imagecomposition Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(imagecomposition LANGUAGES CXX)
-add_qt_executable(imagecomposition
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition"
- SOURCES
- imagecomposer.cpp imagecomposer.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(imagecomposition "imagecomposition" FILES
- images/butterfly.png
- images/checker.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(imagecomposition WIN32 MACOSX_BUNDLE
+ imagecomposer.cpp imagecomposer.h
+ imagecomposition.qrc
+ main.cpp
+)
+target_link_libraries(imagecomposition PUBLIC
+ Qt::Widgets
+)
+
+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 13dd321a52..423d7d98ed 100644
--- a/examples/widgets/painting/painterpaths/CMakeLists.txt
+++ b/examples/widgets/painting/painterpaths/CMakeLists.txt
@@ -1,26 +1,28 @@
# Generated from painterpaths.pro.
-#####################################################################
-## painterpaths Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(painterpaths LANGUAGES CXX)
-add_qt_executable(painterpaths
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths"
- SOURCES
- main.cpp
- renderarea.cpp renderarea.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
- painting_shared # special case
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(painterpaths WIN32 MACOSX_BUNDLE
+ main.cpp
+ renderarea.cpp renderarea.h
+ window.cpp window.h
+)
+target_link_libraries(painterpaths PUBLIC
+ Qt::Widgets
+)
-extend_target(painterpaths CONDITION UNIX AND NOT APPLE_OSX AND NOT HAIKU AND NOT INTEGRITY AND NOT VXWORKS
- LIBRARIES
- m
+install(TARGETS painterpaths
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt
index 150a1baa83..ce32f38549 100644
--- a/examples/widgets/painting/pathstroke/CMakeLists.txt
+++ b/examples/widgets/painting/pathstroke/CMakeLists.txt
@@ -1,21 +1,34 @@
# Generated from pathstroke.pro.
-#####################################################################
-## pathstroke Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(pathstroke LANGUAGES CXX)
-add_qt_executable(pathstroke
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke"
- SOURCES
- main.cpp
- pathstroke.cpp pathstroke.h
- LIBRARIES # special case
- painting_shared
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(pathstroke WIN32 MACOSX_BUNDLE
+ ../shared/arthurstyle.cpp ../shared/arthurstyle.h
+ ../shared/arthurwidgets.cpp ../shared/arthurwidgets.h
+ ../shared/hoverpoints.cpp ../shared/hoverpoints.h
+ ../shared/shared.qrc
+ main.cpp
+ pathstroke.cpp pathstroke.h pathstroke.qrc
+)
+target_include_directories(pathstroke PUBLIC
+ ../shared
+)
+target_link_libraries(pathstroke PUBLIC
+ Qt::Widgets
)
-# Resources:
-add_qt_resource(pathstroke "pathstroke" PREFIX "/res/pathstroke" FILES
- pathstroke.cpp
- pathstroke.html)
+install(TARGETS pathstroke
+ 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 a7bec2789b..c94a586425 100644
--- a/examples/widgets/painting/shared/CMakeLists.txt
+++ b/examples/widgets/painting/shared/CMakeLists.txt
@@ -2,7 +2,7 @@
# special case:
add_library(painting_shared OBJECT)
-qt_manual_moc(moc_files arthurwidgets.h hoverpoints.h) # no automoc for OBJECT libs:-/
+qt5_wrap_cpp(moc_files arthurwidgets.h hoverpoints.h) # no automoc for OBJECT libs:-/
target_sources(painting_shared PRIVATE
arthurstyle.cpp arthurstyle.h
arthurwidgets.cpp arthurwidgets.h
@@ -12,53 +12,16 @@ target_sources(painting_shared PRIVATE
target_link_libraries(painting_shared PUBLIC Qt::Widgets)
target_include_directories(painting_shared PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}")
-
-# Resources:
-add_qt_resource(painting_shared "shared" PREFIX "/res" 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)
-
+qt5_add_resources(res_files shared.qrc)
+target_sources(painting_shared PRIVATE ${res_files})
## Scopes:
#####################################################################
-extend_target(painting_shared CONDITION TARGET Qt::OpenGL OR QT_FEATURE_opengles2
- DEFINES
- QT_OPENGL_SUPPORT
- LIBRARIES
+if (TARGET Qt::OpenGL OR QT_FEATURE_opengles2)
+ target_compile_definitions(painting_shared PRIVATE QT_OPENGL_SUPPORT)
+ target_link_libraries(painting_shared PRIVATE
Qt::OpenGL
Qt::Widgets
-)
+ )
+endif()
diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt
index a3c3130c32..5837f90f9d 100644
--- a/examples/widgets/painting/transformations/CMakeLists.txt
+++ b/examples/widgets/painting/transformations/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from transformations.pro.
-#####################################################################
-## transformations Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(transformations LANGUAGES CXX)
-add_qt_executable(transformations
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations"
- SOURCES
- main.cpp
- renderarea.cpp renderarea.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(transformations WIN32 MACOSX_BUNDLE
+ main.cpp
+ renderarea.cpp renderarea.h
+ window.cpp window.h
+)
+target_link_libraries(transformations PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS transformations
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt
index 8d26479929..099991172d 100644
--- a/examples/widgets/richtext/calendar/CMakeLists.txt
+++ b/examples/widgets/richtext/calendar/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from calendar.pro.
-#####################################################################
-## calendar Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(calendar LANGUAGES CXX)
-add_qt_executable(calendar
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(calendar WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(calendar PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS calendar
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt
index 5f12e98cdf..9dd715c752 100644
--- a/examples/widgets/richtext/orderform/CMakeLists.txt
+++ b/examples/widgets/richtext/orderform/CMakeLists.txt
@@ -1,25 +1,32 @@
# Generated from orderform.pro.
-#####################################################################
-## orderform Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(orderform LANGUAGES CXX)
-add_qt_executable(orderform
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform"
- SOURCES
- detailsdialog.cpp detailsdialog.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport)
+
+add_executable(orderform WIN32 MACOSX_BUNDLE
+ detailsdialog.cpp detailsdialog.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(orderform PUBLIC
+ Qt::Widgets
+)
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(orderform PUBLIC Qt::PrintSupport)
+endif()
-extend_target(orderform CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+install(TARGETS orderform
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
index afffcc639b..918843e1bd 100644
--- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
+++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from syntaxhighlighter.pro.
-#####################################################################
-## syntaxhighlighter Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(syntaxhighlighter LANGUAGES CXX)
-add_qt_executable(syntaxhighlighter
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighter"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighter"
- SOURCES
- highlighter.cpp highlighter.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(syntaxhighlighter WIN32 MACOSX_BUNDLE
+ highlighter.cpp highlighter.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(syntaxhighlighter PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS syntaxhighlighter
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt
index 487f708b34..54689bae5b 100644
--- a/examples/widgets/richtext/textedit/CMakeLists.txt
+++ b/examples/widgets/richtext/textedit/CMakeLists.txt
@@ -1,83 +1,33 @@
# Generated from textedit.pro.
-#####################################################################
-## textedit Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(textedit LANGUAGES CXX)
-add_qt_executable(textedit
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/richtext/textedit"
- SOURCES
- main.cpp
- textedit.cpp textedit.h
- PUBLIC_LIBRARIES
- Qt::Widgets
-)
-
-# Resources:
-add_qt_resource(textedit "textedit" PREFIX "/" 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)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-#### Keys ignored in scope 1:.:.:textedit.pro:<TRUE>:
-# EXAMPLE_FILES = "textedit.qdoc"
-# TEMPLATE = "app"
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
-extend_target(textedit CONDITION TARGET Qt::PrintSupport
- PUBLIC_LIBRARIES
- Qt::PrintSupport
+add_executable(textedit WIN32 MACOSX_BUNDLE
+ main.cpp
+ textedit.cpp textedit.h textedit.qrc
+)
+target_link_libraries(textedit PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(textedit PUBLIC Qt::PrintSupport)
+endif()
+# special case end
+
+install(TARGETS textedit
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
-
-#### Keys ignored in scope 3:.:.:textedit.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt
index 0f25d6b71c..5b36cfc9ae 100644
--- a/examples/widgets/scroller/graphicsview/CMakeLists.txt
+++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt
@@ -1,18 +1,26 @@
# Generated from graphicsview.pro.
-#####################################################################
-## graphicsview Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(graphicsview LANGUAGES CXX)
-add_qt_executable(graphicsview
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(graphicsview WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(graphicsview PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:graphicsview.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS graphicsview
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
index 0fc20f59ae..758265686b 100644
--- a/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
+++ b/examples/widgets/statemachine/eventtransitions/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from eventtransitions.pro.
-#####################################################################
-## eventtransitions Binary:
-#####################################################################
-
-add_qt_executable(eventtransitions
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/eventtransitions"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(eventtransitions LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(eventtransitions WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(eventtransitions PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS eventtransitions
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/statemachine/factorial/CMakeLists.txt b/examples/widgets/statemachine/factorial/CMakeLists.txt
index e38995220e..e383225705 100644
--- a/examples/widgets/statemachine/factorial/CMakeLists.txt
+++ b/examples/widgets/statemachine/factorial/CMakeLists.txt
@@ -1,22 +1,26 @@
# Generated from factorial.pro.
-#####################################################################
-## factorial Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(factorial LANGUAGES CXX)
-add_qt_executable(factorial
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/factorial"
- SOURCES
- main.cpp
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 2:.:factorial.pro:WIN32:
-# CONFIG = "console"
+add_executable(factorial
+ main.cpp
+)
+target_link_libraries(factorial PUBLIC
+ Qt::Core
+)
-#### Keys ignored in scope 3:.:factorial.pro:APPLE_OSX:
-# CONFIG = "-app_bundle"
+install(TARGETS factorial
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/statemachine/pingpong/CMakeLists.txt b/examples/widgets/statemachine/pingpong/CMakeLists.txt
index b911bd727f..e3745a280d 100644
--- a/examples/widgets/statemachine/pingpong/CMakeLists.txt
+++ b/examples/widgets/statemachine/pingpong/CMakeLists.txt
@@ -1,22 +1,26 @@
# Generated from pingpong.pro.
-#####################################################################
-## pingpong Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(pingpong LANGUAGES CXX)
-add_qt_executable(pingpong
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/pingpong"
- SOURCES
- main.cpp
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Core)
-#### Keys ignored in scope 2:.:pingpong.pro:WIN32:
-# CONFIG = "console"
+add_executable(pingpong
+ main.cpp
+)
+target_link_libraries(pingpong PUBLIC
+ Qt::Core
+)
-#### Keys ignored in scope 3:.:pingpong.pro:APPLE_OSX:
-# CONFIG = "-app_bundle"
+install(TARGETS pingpong
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/statemachine/rogue/CMakeLists.txt b/examples/widgets/statemachine/rogue/CMakeLists.txt
index a6a1a473e1..7ce3c5c966 100644
--- a/examples/widgets/statemachine/rogue/CMakeLists.txt
+++ b/examples/widgets/statemachine/rogue/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from rogue.pro.
-#####################################################################
-## rogue Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(rogue LANGUAGES CXX)
-add_qt_executable(rogue
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/rogue"
- SOURCES
- main.cpp
- movementtransition.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(rogue WIN32 MACOSX_BUNDLE
+ main.cpp
+ movementtransition.h
+ window.cpp window.h
+)
+target_link_libraries(rogue PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS rogue
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/statemachine/trafficlight/CMakeLists.txt b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
index 52f9fb3c6c..3325c5fe46 100644
--- a/examples/widgets/statemachine/trafficlight/CMakeLists.txt
+++ b/examples/widgets/statemachine/trafficlight/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from trafficlight.pro.
-#####################################################################
-## trafficlight Binary:
-#####################################################################
-
-add_qt_executable(trafficlight
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/trafficlight"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(trafficlight LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(trafficlight WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(trafficlight PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS trafficlight
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
index c5f14b7514..3ea05f9595 100644
--- a/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
+++ b/examples/widgets/statemachine/twowaybutton/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from twowaybutton.pro.
-#####################################################################
-## twowaybutton Binary:
-#####################################################################
-
-add_qt_executable(twowaybutton
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/statemachine/twowaybutton"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(twowaybutton LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(twowaybutton WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(twowaybutton PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS twowaybutton
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tools/CMakeLists.txt b/examples/widgets/tools/CMakeLists.txt
index 90ac6fe86f..042f751b0f 100644
--- a/examples/widgets/tools/CMakeLists.txt
+++ b/examples/widgets/tools/CMakeLists.txt
@@ -16,5 +16,7 @@ add_subdirectory(undoframework)
if(QT_FEATURE_library) # special case
add_subdirectory(echoplugin)
- add_subdirectory(plugandpaint)
+ # FIXME: Currently broken # special case
+ # Fails to link (ld: error: undefined symbol: qt_static_plugin_BasicToolsPlugin()) # special case
+ #add_subdirectory(plugandpaint) # special case
endif()
diff --git a/examples/widgets/tools/codecs/CMakeLists.txt b/examples/widgets/tools/codecs/CMakeLists.txt
index 703aa3fb47..99040e807e 100644
--- a/examples/widgets/tools/codecs/CMakeLists.txt
+++ b/examples/widgets/tools/codecs/CMakeLists.txt
@@ -1,26 +1,30 @@
# Generated from codecs.pro.
-#####################################################################
-## codecs Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(codecs LANGUAGES CXX)
-add_qt_executable(codecs
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/codecs"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/codecs"
- SOURCES
- encodingdialog.cpp encodingdialog.h
- main.cpp
- mainwindow.cpp mainwindow.h
- previewform.cpp previewform.h
- PUBLIC_LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(codecs "codecs" PREFIX "/" FILES
- images/editcopy.png)
+find_package(Qt5 COMPONENTS Widgets)
+add_executable(codecs WIN32 MACOSX_BUNDLE
+ codecs.qrc
+ encodingdialog.cpp encodingdialog.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ previewform.cpp previewform.h
+)
+target_link_libraries(codecs PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 1:.:.:codecs.pro:<TRUE>:
-# EXAMPLE_FILES = "encodedfiles"
+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 b39b4f262d..9db2d089d9 100644
--- a/examples/widgets/tools/completer/CMakeLists.txt
+++ b/examples/widgets/tools/completer/CMakeLists.txt
@@ -1,23 +1,29 @@
# Generated from completer.pro.
-#####################################################################
-## completer Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(completer LANGUAGES CXX)
-add_qt_executable(completer
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/completer"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/completer"
- SOURCES
- fsmodel.cpp fsmodel.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(completer "completer" PREFIX "/" FILES
- resources/countries.txt
- resources/wordlist.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(completer WIN32 MACOSX_BUNDLE
+ completer.qrc
+ fsmodel.cpp fsmodel.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(completer PUBLIC
+ Qt::Widgets
+)
+
+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 04f8035ff3..7c1db10bef 100644
--- a/examples/widgets/tools/customcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/customcompleter/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from customcompleter.pro.
-#####################################################################
-## customcompleter Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(customcompleter LANGUAGES CXX)
-add_qt_executable(customcompleter
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- textedit.cpp textedit.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(customcompleter "customcompleter" PREFIX "/" FILES
- resources/wordlist.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(customcompleter WIN32 MACOSX_BUNDLE
+ customcompleter.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ textedit.cpp textedit.h
+)
+target_link_libraries(customcompleter PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS customcompleter
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
index 3c9082db07..941007505d 100644
--- a/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/echowindow/CMakeLists.txt
@@ -1,33 +1,28 @@
# Generated from echowindow.pro.
-#####################################################################
-## echoplugin Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(echoplugin LANGUAGES CXX)
-add_qt_executable(echoplugin
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin"
- SOURCES
- echointerface.h
- echowindow.cpp echowindow.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#### Keys ignored in scope 1:.:echowindow.pro:<NONE>:
-# CONFIG = "install_ok"
-# QMAKE_PROJECT_NAME = "echopluginwindow"
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-## Scopes:
-#####################################################################
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 3:.:echowindow.pro:CONFIG(debug,release OR debug):
-# DESTDIR = "../debug/"
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 4:.:echowindow.pro:CONFIG(release,release OR debug):
-# DESTDIR = "../release/"
+add_executable(echopluginwindow WIN32 MACOSX_BUNDLE # special case: renamed target
+ echointerface.h
+ echowindow.cpp echowindow.h
+ main.cpp
+)
+target_link_libraries(echopluginwindow PUBLIC # special case: renamed target
+ Qt::Widgets
+)
-#### Keys ignored in scope 5:.:echowindow.pro:else:
-# DESTDIR = "../"
+install(TARGETS echopluginwindow # special case: renamed target
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
index 7250a7e0a6..78f5dcbe70 100644
--- a/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/echoplugin/plugin/CMakeLists.txt
@@ -1,22 +1,10 @@
-# Generated from plugin.pro.
+# special case begin
-#####################################################################
-## qtLibraryTargetechoplugin Module:
-#####################################################################
-
-add_qt_plugin(echoplugin_plugin TYPE plugin # special case
- SOURCES
- echoplugin.cpp echoplugin.h
- INCLUDE_DIRECTORIES
- ../echowindow
- LIBRARIES
- Qt::Widgets
+add_library(echoplugin MODULE
+ echoplugin.cpp echoplugin.h
)
-#### Keys ignored in scope 1:.:plugin.pro:<NONE>:
-# CONFIG = "plugin" "install_ok"
-# DESTDIR = "../plugins"
-# EXAMPLE_FILES = "echoplugin.json"
-# INSTALLS = "target"
-# TEMPLATE = "lib"
-# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/echoplugin/plugins"
+target_include_directories(echoplugin PUBLIC ../echowindow)
+target_link_libraries(echoplugin PUBLIC Qt::Widgets)
+
+# special case end
diff --git a/examples/widgets/tools/i18n/CMakeLists.txt b/examples/widgets/tools/i18n/CMakeLists.txt
index 033362bb4c..3835cc27ea 100644
--- a/examples/widgets/tools/i18n/CMakeLists.txt
+++ b/examples/widgets/tools/i18n/CMakeLists.txt
@@ -1,38 +1,29 @@
# Generated from i18n.pro.
-#####################################################################
-## i18n Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(i18n LANGUAGES CXX)
-add_qt_executable(i18n
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/i18n"
- SOURCES
- languagechooser.cpp languagechooser.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-# Resources:
-add_qt_resource(i18n "i18n" 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)
+find_package(Qt5 COMPONENTS Widgets)
+add_executable(i18n WIN32 MACOSX_BUNDLE
+ i18n.qrc
+ languagechooser.cpp languagechooser.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(i18n PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 1:.:i18n.pro:<NONE>:
-# TRANSLATIONS = "translations/i18n_ar.ts" "translations/i18n_cs.ts" "translations/i18n_de.ts" "translations/i18n_el.ts" "translations/i18n_en.ts" "translations/i18n_eo.ts" "translations/i18n_fr.ts" "translations/i18n_it.ts" "translations/i18n_jp.ts" "translations/i18n_ko.ts" "translations/i18n_no.ts" "translations/i18n_ru.ts" "translations/i18n_sv.ts" "translations/i18n_zh.ts"
+install(TARGETS i18n
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
index e5bbbacec2..2e730791cc 100644
--- a/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/app/CMakeLists.txt
@@ -1,29 +1,33 @@
# Generated from app.pro.
-#####################################################################
-## plugandpaint Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(plugandpaint LANGUAGES CXX)
-add_qt_executable(plugandpaint
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint"
- SOURCES
- interfaces.h
- main.cpp
- mainwindow.cpp mainwindow.h
- paintarea.cpp paintarea.h
- plugindialog.cpp plugindialog.h
- LIBRARIES
- Qt::Widgets
- pnp_basictools # special case
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 1:.:app.pro:<NONE>:
-# CONFIG = "install_ok"
-# DESTDIR = ".."
+find_package(Qt5 COMPONENTS Widgets)
-## Scopes:
-#####################################################################
+add_executable(plugandpaint WIN32 MACOSX_BUNDLE
+ 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::Widgets
+ pnp_basictools # special case
+)
+target_link_libraries(plugandpaint PUBLIC pnp_basictools) # special case
-# special case: Remove the rest
+install(TARGETS plugandpaint
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
index a059d0deab..64d239b054 100644
--- a/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/basictools/CMakeLists.txt
@@ -1,30 +1,13 @@
-# Generated from basictools.pro.
+# special case begin
-#####################################################################
-## qtLibraryTargetpnp_basictools Module:
-#####################################################################
-
-add_qt_plugin(pnp_basictools # special case
- STATIC # special case
- OUTPUT_DIRECTORY ../../plugins # special case
- INSTALL_DIRECTORY ../../plugins # special case
- ARCHIVE_INSTALL_DIRECTORY ../../plugins # special case
- SOURCES
- basictoolsplugin.cpp basictoolsplugin.h
- INCLUDE_DIRECTORIES
- ../../app
- LIBRARIES
- Qt::Widgets
+add_library(pnp_basictools MODULE STATIC
+ 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::Widgets)
-# CONFIG = "plugin" "static" "install_ok"
-# DESTDIR = "../../plugins"
-# INSTALLS = "target"
-# TEMPLATE = "lib"
-# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 2:.:basictools.pro:APPLE_UIKIT:
-# CONFIG = "debug_and_release"
+# special case end
diff --git a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
index a0447c833e..31d6f5ef65 100644
--- a/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
+++ b/examples/widgets/tools/plugandpaint/plugins/extrafilters/CMakeLists.txt
@@ -1,27 +1,9 @@
-# Generated from extrafilters.pro.
+# special case begin
-#####################################################################
-## qtLibraryTargetpnp_extrafilters Module:
-#####################################################################
-
-add_qt_plugin(pnp_extrafilters_plugin TYPE plugin # special case
- SOURCES
- extrafiltersplugin.cpp extrafiltersplugin.h
- INCLUDE_DIRECTORIES
- ../../app
- LIBRARIES
- Qt::Widgets
+add_library(pnp_extrafilters_plugin MODULE
+ extrafiltersplugin.cpp extrafiltersplugin.h
)
+target_include_directories(pnp_extrafilters_plugin PRIVATE ../../app)
+target_link_libraries(pnp_extrafilters_plugin PRIVATE Qt::Widgets)
-#### Keys ignored in scope 1:.:extrafilters.pro:<NONE>:
-# CONFIG = "plugin" "install_ok"
-# DESTDIR = "../../plugins"
-# INSTALLS = "target"
-# TEMPLATE = "lib"
-# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/plugandpaint/plugins"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 2:.:extrafilters.pro:APPLE_UIKIT:
-# CONFIG = "debug_and_release"
+# special case end
diff --git a/examples/widgets/tools/regexp/CMakeLists.txt b/examples/widgets/tools/regexp/CMakeLists.txt
index da729f5f5b..026e72673a 100644
--- a/examples/widgets/tools/regexp/CMakeLists.txt
+++ b/examples/widgets/tools/regexp/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from regexp.pro.
-#####################################################################
-## regexp Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(regexp LANGUAGES CXX)
-add_qt_executable(regexp
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regexp"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regexp"
- SOURCES
- main.cpp
- regexpdialog.cpp regexpdialog.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(regexp WIN32 MACOSX_BUNDLE
+ main.cpp
+ regexpdialog.cpp regexpdialog.h
+)
+target_link_libraries(regexp PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS regexp
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt
index e9dcb977a2..ba7274b007 100644
--- a/examples/widgets/tools/regularexpression/CMakeLists.txt
+++ b/examples/widgets/tools/regularexpression/CMakeLists.txt
@@ -1,21 +1,28 @@
# Generated from regularexpression.pro.
-#####################################################################
-## regularexpression Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(regularexpression LANGUAGES CXX)
-add_qt_executable(regularexpression
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression"
- SOURCES
- main.cpp
- regularexpressiondialog.cpp regularexpressiondialog.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(regularexpression "regularexpression" FILES
- images/copy.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(regularexpression WIN32 MACOSX_BUNDLE
+ main.cpp
+ regularexpression.qrc
+ regularexpressiondialog.cpp regularexpressiondialog.h
+)
+target_link_libraries(regularexpression PUBLIC
+ Qt::Widgets
+)
+
+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 ce260da358..7bfa75cade 100644
--- a/examples/widgets/tools/settingseditor/CMakeLists.txt
+++ b/examples/widgets/tools/settingseditor/CMakeLists.txt
@@ -1,22 +1,30 @@
# Generated from settingseditor.pro.
-#####################################################################
-## settingseditor Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(settingseditor LANGUAGES CXX)
-add_qt_executable(settingseditor
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor"
- SOURCES
- locationdialog.cpp locationdialog.h
- main.cpp
- mainwindow.cpp mainwindow.h
- settingstree.cpp settingstree.h
- variantdelegate.cpp variantdelegate.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(settingseditor WIN32 MACOSX_BUNDLE
+ locationdialog.cpp locationdialog.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ settingstree.cpp settingstree.h
+ variantdelegate.cpp variantdelegate.h
+)
+target_link_libraries(settingseditor PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:settingseditor.pro:<NONE>:
-# EXAMPLE_FILES = "inifiles"
+install(TARGETS settingseditor
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt
index 630c3703f8..8ee575f8a6 100644
--- a/examples/widgets/tools/styleplugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/CMakeLists.txt
@@ -1,4 +1,19 @@
# Generated from styleplugin.pro.
+# special case begin
+cmake_minimum_required(VERSION 3.14)
+project(styleplugin LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+# special case end
+
add_subdirectory(stylewindow)
add_subdirectory(plugin)
diff --git a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
index c311799d30..28c6ec07ab 100644
--- a/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/plugin/CMakeLists.txt
@@ -1,32 +1,9 @@
-# Generated from plugin.pro.
+# special case begin
-#####################################################################
-## mplestyleplugin Module:
-#####################################################################
-
-add_qt_plugin(simplestyleplugin TYPE style # special case
- SOURCES
- simplestyle.cpp simplestyle.h
- simplestyleplugin.cpp simplestyleplugin.h
- LIBRARIES
- Qt::Widgets
+add_library(simplestyleplugin MODULE
+ simplestyle.cpp simplestyle.h
+ simplestyleplugin.cpp simplestyleplugin.h
)
+target_link_libraries(simplestyleplugin PUBLIC Qt::Widgets)
-#### Keys ignored in scope 1:.:plugin.pro:<NONE>:
-# CONFIG = "plugin" "install_ok"
-# EXAMPLE_FILES = "simplestyle.json"
-# INSTALLS = "target"
-# TEMPLATE = "lib"
-# target.path = "$$[QT_INSTALL_EXAMPLES]/widgets/tools/styleplugin/styles"
-
-## Scopes:
-#####################################################################
-
-#### Keys ignored in scope 3:.:plugin.pro:CONFIG(debug,release OR debug):
-# DESTDIR = "../debug/styles/"
-
-#### Keys ignored in scope 4:.:plugin.pro:CONFIG(release,release OR debug):
-# DESTDIR = "../release/styles/"
-
-#### Keys ignored in scope 5:.:plugin.pro:else:
-# DESTDIR = "../styles/"
+# special case end
diff --git a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
index a6d6a56874..3e3893ad03 100644
--- a/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
+++ b/examples/widgets/tools/styleplugin/stylewindow/CMakeLists.txt
@@ -1,31 +1,27 @@
# Generated from stylewindow.pro.
-#####################################################################
-## styleplugin Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(styleplugin LANGUAGES CXX)
-add_qt_executable(styleplugin
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin"
- SOURCES
- main.cpp
- stylewindow.cpp stylewindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#### Keys ignored in scope 1:.:stylewindow.pro:<NONE>:
-# CONFIG = "install_ok"
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-## Scopes:
-#####################################################################
+set(INSTALL_EXAMPLEDIR "examples")
-#### Keys ignored in scope 3:.:stylewindow.pro:debug:
-# DESTDIR = "../debug/"
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 4:.:stylewindow.pro:release:
-# DESTDIR = "../release/"
+add_executable(styleplugin WIN32 MACOSX_BUNDLE
+ main.cpp
+ stylewindow.cpp stylewindow.h
+)
+target_link_libraries(styleplugin PUBLIC
+ Qt::Widgets
+)
-#### Keys ignored in scope 5:.:stylewindow.pro:else:
-# DESTDIR = "../"
+install(TARGETS styleplugin
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
index ab4d60f290..a6bd7177f1 100644
--- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
+++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt
@@ -1,22 +1,28 @@
# Generated from treemodelcompleter.pro.
-#####################################################################
-## treemodelcompleter Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(treemodelcompleter LANGUAGES CXX)
-add_qt_executable(treemodelcompleter
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- treemodelcompleter.cpp treemodelcompleter.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(treemodelcompleter "treemodelcompleter" PREFIX "/" FILES
- resources/treemodel.txt)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(treemodelcompleter WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ treemodelcompleter.cpp treemodelcompleter.h treemodelcompleter.qrc
+)
+target_link_libraries(treemodelcompleter PUBLIC
+ Qt::Widgets
+)
+
+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 f3f1a5a436..5cd91dda0a 100644
--- a/examples/widgets/tools/undo/CMakeLists.txt
+++ b/examples/widgets/tools/undo/CMakeLists.txt
@@ -1,46 +1,30 @@
# Generated from undo.pro.
-#####################################################################
-## undo Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(undo LANGUAGES CXX)
-add_qt_executable(undo
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undo"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undo"
- SOURCES
- commands.cpp commands.h
- document.cpp document.h
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-# Resources:
-add_qt_resource(undo "undo" PREFIX "/" 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)
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 2:.:.:undo.pro:build_all AND NOT build_pass:
-# CONFIG = "-build_all" "release"
+add_executable(undo WIN32 MACOSX_BUNDLE
+ commands.cpp commands.h
+ document.cpp document.h
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ undo.qrc
+)
+target_link_libraries(undo PUBLIC
+ Qt::Widgets
+)
+
+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 0689d0df08..a1a6c2c624 100644
--- a/examples/widgets/tools/undoframework/CMakeLists.txt
+++ b/examples/widgets/tools/undoframework/CMakeLists.txt
@@ -1,24 +1,31 @@
# Generated from undoframework.pro.
-#####################################################################
-## undoframework Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(undoframework LANGUAGES CXX)
-add_qt_executable(undoframework
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework"
- SOURCES
- commands.cpp commands.h
- diagramitem.cpp diagramitem.h
- diagramscene.cpp diagramscene.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(undoframework "undoframework" FILES
- images/cross.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(undoframework WIN32 MACOSX_BUNDLE
+ commands.cpp commands.h
+ diagramitem.cpp diagramitem.h
+ diagramscene.cpp diagramscene.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ undoframework.qrc
+)
+target_link_libraries(undoframework PUBLIC
+ Qt::Widgets
+)
+
+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 76920b0f3c..0589e555f3 100644
--- a/examples/widgets/touch/dials/CMakeLists.txt
+++ b/examples/widgets/touch/dials/CMakeLists.txt
@@ -1,18 +1,27 @@
# Generated from dials.pro.
-#####################################################################
-## dials Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(dials LANGUAGES CXX)
-add_qt_executable(dials
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/dials"
- SOURCES
- dials.ui
- main.cpp
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dials WIN32 MACOSX_BUNDLE
+ dials.ui
+ main.cpp
+)
+target_link_libraries(dials PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS dials
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt
index 82ec8cd91e..a419a614be 100644
--- a/examples/widgets/touch/fingerpaint/CMakeLists.txt
+++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt
@@ -1,25 +1,34 @@
# Generated from fingerpaint.pro.
-#####################################################################
-## fingerpaint Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(fingerpaint LANGUAGES CXX)
-add_qt_executable(fingerpaint
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/fingerpaint"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- scribblearea.cpp scribblearea.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
+
+add_executable(fingerpaint WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ scribblearea.cpp scribblearea.h
+)
+target_link_libraries(fingerpaint PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(fingerpaint PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-extend_target(fingerpaint CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+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 e8976db270..4a8f55820a 100644
--- a/examples/widgets/touch/knobs/CMakeLists.txt
+++ b/examples/widgets/touch/knobs/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from knobs.pro.
-#####################################################################
-## knobs Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(knobs LANGUAGES CXX)
-add_qt_executable(knobs
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs"
- SOURCES
- knob.cpp knob.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(knobs WIN32 MACOSX_BUNDLE
+ knob.cpp knob.h
+ main.cpp
+)
+target_link_libraries(knobs PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS knobs
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt
index 92d7b4c3b3..379dde1e9f 100644
--- a/examples/widgets/touch/pinchzoom/CMakeLists.txt
+++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt
@@ -1,22 +1,29 @@
# Generated from pinchzoom.pro.
-#####################################################################
-## pinchzoom Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(pinchzoom LANGUAGES CXX)
-add_qt_executable(pinchzoom
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom"
- SOURCES
- graphicsview.cpp graphicsview.h
- main.cpp
- mouse.cpp mouse.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(pinchzoom "mice" PREFIX "/" FILES
- images/cheese.jpg)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(pinchzoom WIN32 MACOSX_BUNDLE
+ graphicsview.cpp graphicsview.h
+ main.cpp
+ mice.qrc
+ mouse.cpp mouse.h
+)
+target_link_libraries(pinchzoom PUBLIC
+ Qt::Widgets
+)
+
+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 dcfc424a24..14533cb8dc 100644
--- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from part1.pro.
-#####################################################################
-## part1 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part1 LANGUAGES CXX)
-add_qt_executable(part1
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part1"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part1"
- SOURCES
- addressbook.cpp addressbook.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part1 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ main.cpp
+)
+target_link_libraries(part1 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part1.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part1"
+install(TARGETS part1
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
index b9fe9307ee..aace9f86af 100644
--- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from part2.pro.
-#####################################################################
-## part2 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part2 LANGUAGES CXX)
-add_qt_executable(part2
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part2"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part2"
- SOURCES
- addressbook.cpp addressbook.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part2 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ main.cpp
+)
+target_link_libraries(part2 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part2.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part2"
+install(TARGETS part2
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
index f83a8c5379..b9fadf57d0 100644
--- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from part3.pro.
-#####################################################################
-## part3 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part3 LANGUAGES CXX)
-add_qt_executable(part3
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part3"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part3"
- SOURCES
- addressbook.cpp addressbook.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part3 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ main.cpp
+)
+target_link_libraries(part3 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part3.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part3"
+install(TARGETS part3
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
index 0dee5fab9a..af8dfd4904 100644
--- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from part4.pro.
-#####################################################################
-## part4 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part4 LANGUAGES CXX)
-add_qt_executable(part4
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part4"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part4"
- SOURCES
- addressbook.cpp addressbook.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part4 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ main.cpp
+)
+target_link_libraries(part4 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part4.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part4"
+install(TARGETS part4
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
index 564f044ba8..eec0af2bac 100644
--- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt
@@ -1,20 +1,28 @@
# Generated from part5.pro.
-#####################################################################
-## part5 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part5 LANGUAGES CXX)
-add_qt_executable(part5
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part5"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part5"
- SOURCES
- addressbook.cpp addressbook.h
- finddialog.cpp finddialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part5 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ finddialog.cpp finddialog.h
+ main.cpp
+)
+target_link_libraries(part5 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part5.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part5"
+install(TARGETS part5
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
index 375f1f0612..294f16a26d 100644
--- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt
@@ -1,20 +1,28 @@
# Generated from part6.pro.
-#####################################################################
-## part6 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part6 LANGUAGES CXX)
-add_qt_executable(part6
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part6"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part6"
- SOURCES
- addressbook.cpp addressbook.h
- finddialog.cpp finddialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part6 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ finddialog.cpp finddialog.h
+ main.cpp
+)
+target_link_libraries(part6 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part6.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part6"
+install(TARGETS part6
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
index 1ccd87fff5..3d50ebcc6c 100644
--- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
+++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt
@@ -1,20 +1,28 @@
# Generated from part7.pro.
-#####################################################################
-## part7 Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(part7 LANGUAGES CXX)
-add_qt_executable(part7
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part7"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/part7"
- SOURCES
- addressbook.cpp addressbook.h
- finddialog.cpp finddialog.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part7 WIN32 MACOSX_BUNDLE
+ addressbook.cpp addressbook.h
+ finddialog.cpp finddialog.h
+ main.cpp
+)
+target_link_libraries(part7 PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:part7.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "ab_part7"
+install(TARGETS part7
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
index c39133d235..50f6e31364 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from part1.pro.
-#####################################################################
-## part1 Binary:
-#####################################################################
-
-add_qt_executable(part1
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part1"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part1"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(part1 LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part1 WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(part1 PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS part1
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
index ff9ddd6584..9df643de4a 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from part2.pro.
-#####################################################################
-## part2 Binary:
-#####################################################################
-
-add_qt_executable(part2
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part2"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part2"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(part2 LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part2 WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(part2 PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS part2
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
index 2564472be6..048d2d60ab 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from part3.pro.
-#####################################################################
-## part3 Binary:
-#####################################################################
-
-add_qt_executable(part3
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part3"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part3"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(part3 LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part3 WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(part3 PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS part3
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
index 473b803044..c752b44d04 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from part4.pro.
-#####################################################################
-## part4 Binary:
-#####################################################################
-
-add_qt_executable(part4
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part4"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part4"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(part4 LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part4 WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(part4 PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS part4
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
index 93d2ea4175..fc4fd05b6e 100644
--- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
+++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from part5.pro.
-#####################################################################
-## part5 Binary:
-#####################################################################
-
-add_qt_executable(part5
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part5"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/gsQt/part5"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(part5 LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(part5 WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(part5 PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS part5
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
index 1edda802f9..82e1b4dbab 100644
--- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 1_readonly.pro.
-#####################################################################
-## mv_readonly Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_readonly LANGUAGES CXX)
-add_qt_executable(mv_readonly
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_readonly"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_readonly"
- SOURCES
- main.cpp
- mymodel.cpp mymodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_readonly WIN32 MACOSX_BUNDLE
+ main.cpp
+ mymodel.cpp mymodel.h
+)
+target_link_libraries(mv_readonly PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:1_readonly.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_readonly
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
index 3235275d6a..898df9bfbf 100644
--- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 2_formatting.pro.
-#####################################################################
-## mv_formatting Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_formatting LANGUAGES CXX)
-add_qt_executable(mv_formatting
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_formatting"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_formatting"
- SOURCES
- main.cpp
- mymodel.cpp mymodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_formatting WIN32 MACOSX_BUNDLE
+ main.cpp
+ mymodel.cpp mymodel.h
+)
+target_link_libraries(mv_formatting PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:2_formatting.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_formatting
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
index 746bafc19a..b460b7b281 100644
--- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 3_changingmodel.pro.
-#####################################################################
-## mv_changingmodel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_changingmodel LANGUAGES CXX)
-add_qt_executable(mv_changingmodel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_changingmodel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_changingmodel"
- SOURCES
- main.cpp
- mymodel.cpp mymodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_changingmodel WIN32 MACOSX_BUNDLE
+ main.cpp
+ mymodel.cpp mymodel.h
+)
+target_link_libraries(mv_changingmodel PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:3_changingmodel.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_changingmodel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
index ef7e0a501b..e76299ee0c 100644
--- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 4_headers.pro.
-#####################################################################
-## mv_headers Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_headers LANGUAGES CXX)
-add_qt_executable(mv_headers
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_headers"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_headers"
- SOURCES
- main.cpp
- mymodel.cpp mymodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_headers WIN32 MACOSX_BUNDLE
+ main.cpp
+ mymodel.cpp mymodel.h
+)
+target_link_libraries(mv_headers PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:4_headers.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_headers
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
index 2ce884a7fe..ceb2ef0ed5 100644
--- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt
@@ -1,20 +1,28 @@
# Generated from 5_edit.pro.
-#####################################################################
-## mv_edit Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_edit LANGUAGES CXX)
-add_qt_executable(mv_edit
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edit"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edit"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- mymodel.cpp mymodel.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_edit WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ mymodel.cpp mymodel.h
+)
+target_link_libraries(mv_edit PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:5_edit.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_edit
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
index 1d5a9425e5..f6409036fd 100644
--- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 6_treeview.pro.
-#####################################################################
-## mv_tree Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_tree LANGUAGES CXX)
-add_qt_executable(mv_tree
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_treeview"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_treeview"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_tree WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(mv_tree PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:6_treeview.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_tree
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
index 0560dc7a60..f328863a1f 100644
--- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
+++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from 7_selections.pro.
-#####################################################################
-## mv_selections Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mv_selections LANGUAGES CXX)
-add_qt_executable(mv_selections
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_selections"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_selections"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mv_selections WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(mv_selections PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:7_selections.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mv_selections
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt
index d34d3ca846..fee3e14285 100644
--- a/examples/widgets/tutorials/notepad/CMakeLists.txt
+++ b/examples/widgets/tutorials/notepad/CMakeLists.txt
@@ -1,51 +1,35 @@
# Generated from notepad.pro.
-#####################################################################
-## notepad Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(notepad LANGUAGES CXX)
-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
- LIBRARIES # special case
- Qt::Widgets # special case
-)
-
-# 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)
+find_package(Qt5 COMPONENTS Widgets) # special case: add
+find_package(Qt5 COMPONENTS PrintSupport) # special case: add
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#### Keys ignored in scope 1:.:.:notepad.pro:<TRUE>:
-# TEMPLATE = "app"
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-## Scopes:
-#####################################################################
+set(INSTALL_EXAMPLEDIR "examples")
-extend_target(notepad CONDITION TARGET Qt::PrintSupport
- PUBLIC_LIBRARIES
+add_executable(notepad WIN32 MACOSX_BUNDLE
+ main.cpp
+ notepad.cpp notepad.h notepad.qrc notepad.ui
+)
+# special case begin
+target_link_libraries(notepad PUBLIC
+ Qt::Widgets
+)
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(notepad PUBLIC
Qt::PrintSupport
+ )
+endif()
+# special case end
+
+install(TARGETS notepad
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
index 823098c9fc..6725ad69f5 100644
--- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from childwidget.pro.
-#####################################################################
-## childwidget Binary:
-#####################################################################
-
-add_qt_executable(childwidget
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwidget"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwidget"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(childwidget LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(childwidget WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(childwidget PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS childwidget
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
index 7f88c89d80..32ca867208 100644
--- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from nestedlayouts.pro.
-#####################################################################
-## nestedlayouts Binary:
-#####################################################################
-
-add_qt_executable(nestedlayouts
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedlayouts"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedlayouts"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(nestedlayouts LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(nestedlayouts WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(nestedlayouts PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS nestedlayouts
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
index 2ef630033b..b18e09a278 100644
--- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from toplevel.pro.
-#####################################################################
-## toplevel Binary:
-#####################################################################
-
-add_qt_executable(toplevel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/toplevel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/toplevel"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(toplevel LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(toplevel WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(toplevel PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS toplevel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
index 157865b68c..4d8899227a 100644
--- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
+++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt
@@ -1,15 +1,26 @@
# Generated from windowlayout.pro.
-#####################################################################
-## windowlayout Binary:
-#####################################################################
-
-add_qt_executable(windowlayout
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowlayout"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowlayout"
- SOURCES
- main.cpp
- LIBRARIES
- Qt::Widgets
+cmake_minimum_required(VERSION 3.14)
+project(windowlayout LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(windowlayout WIN32 MACOSX_BUNDLE
+ main.cpp
+)
+target_link_libraries(windowlayout PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS windowlayout
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt
index 890a300294..064b9f23e8 100644
--- a/examples/widgets/widgets/analogclock/CMakeLists.txt
+++ b/examples/widgets/widgets/analogclock/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from analogclock.pro.
-#####################################################################
-## analogclock Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(analogclock LANGUAGES CXX)
-add_qt_executable(analogclock_widgets # special case
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock"
- SOURCES
- analogclock.cpp analogclock.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(analogclock WIN32 MACOSX_BUNDLE
+ analogclock.cpp analogclock.h
+ main.cpp
+)
+target_link_libraries(analogclock PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:analogclock.pro:<NONE>:
-# QMAKE_PROJECT_NAME = "widgets_analogclock"
+install(TARGETS analogclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt
index b4f58b4f39..779272f31a 100644
--- a/examples/widgets/widgets/calculator/CMakeLists.txt
+++ b/examples/widgets/widgets/calculator/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from calculator.pro.
-#####################################################################
-## calculator Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(calculator LANGUAGES CXX)
-add_qt_executable(calculator
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator"
- SOURCES
- button.cpp button.h
- calculator.cpp calculator.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(calculator WIN32 MACOSX_BUNDLE
+ button.cpp button.h
+ calculator.cpp calculator.h
+ main.cpp
+)
+target_link_libraries(calculator PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS calculator
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
index 463fce3849..ed496bdad7 100644
--- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt
+++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from calendarwidget.pro.
-#####################################################################
-## calendarwidget Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(calendarwidget LANGUAGES CXX)
-add_qt_executable(calendarwidget
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(calendarwidget WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(calendarwidget PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS calendarwidget
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt
index a09b63a4f7..f397822c59 100644
--- a/examples/widgets/widgets/charactermap/CMakeLists.txt
+++ b/examples/widgets/widgets/charactermap/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from charactermap.pro.
-#####################################################################
-## charactermap Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(charactermap LANGUAGES CXX)
-add_qt_executable(charactermap
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap"
- SOURCES
- characterwidget.cpp characterwidget.h
- main.cpp
- mainwindow.cpp mainwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(charactermap WIN32 MACOSX_BUNDLE
+ characterwidget.cpp characterwidget.h
+ main.cpp
+ mainwindow.cpp mainwindow.h
+)
+target_link_libraries(charactermap PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS charactermap
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt
index 7c29d383ff..f352b060cb 100644
--- a/examples/widgets/widgets/codeeditor/CMakeLists.txt
+++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from codeeditor.pro.
-#####################################################################
-## codeeditor Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(codeeditor LANGUAGES CXX)
-add_qt_executable(codeeditor
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor"
- SOURCES
- codeeditor.cpp codeeditor.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(codeeditor WIN32 MACOSX_BUNDLE
+ codeeditor.cpp codeeditor.h
+ main.cpp
+)
+target_link_libraries(codeeditor PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS codeeditor
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt
index b85528a1e8..505e6a67b6 100644
--- a/examples/widgets/widgets/digitalclock/CMakeLists.txt
+++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from digitalclock.pro.
-#####################################################################
-## digitalclock Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(digitalclock LANGUAGES CXX)
-add_qt_executable(digitalclock
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock"
- SOURCES
- digitalclock.cpp digitalclock.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(digitalclock WIN32 MACOSX_BUNDLE
+ digitalclock.cpp digitalclock.h
+ main.cpp
+)
+target_link_libraries(digitalclock PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS digitalclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
index b894e18692..1efb7a1bb3 100644
--- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt
+++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt
@@ -1,21 +1,32 @@
# Generated from elidedlabel.pro.
-#####################################################################
-## elidedlabel Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(elidedlabel LANGUAGES CXX)
-add_qt_executable(elidedlabel
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel"
- SOURCES
- elidedlabel.cpp elidedlabel.h
- main.cpp
- testwidget.cpp testwidget.h
- LIBRARIES
- Qt::Gui
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Gui)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(elidedlabel WIN32 MACOSX_BUNDLE
+ elidedlabel.cpp elidedlabel.h
+ main.cpp
+ testwidget.cpp testwidget.h
+)
+target_link_libraries(elidedlabel PUBLIC
+ Qt::Core
+ Qt::Gui
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:elidedlabel.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS elidedlabel
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/groupbox/CMakeLists.txt b/examples/widgets/widgets/groupbox/CMakeLists.txt
index 1d77ab37dc..0b13e4587d 100644
--- a/examples/widgets/widgets/groupbox/CMakeLists.txt
+++ b/examples/widgets/widgets/groupbox/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from groupbox.pro.
-#####################################################################
-## groupbox Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(groupbox LANGUAGES CXX)
-add_qt_executable(groupbox
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(groupbox WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(groupbox PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS groupbox
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt
index 34d9bcec94..ef20d8d2b0 100644
--- a/examples/widgets/widgets/icons/CMakeLists.txt
+++ b/examples/widgets/widgets/icons/CMakeLists.txt
@@ -1,24 +1,32 @@
# Generated from icons.pro.
-#####################################################################
-## icons Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(icons LANGUAGES CXX)
-add_qt_executable(icons
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons"
- SOURCES
- iconpreviewarea.cpp iconpreviewarea.h
- iconsizespinbox.cpp iconsizespinbox.h
- imagedelegate.cpp imagedelegate.h
- main.cpp
- mainwindow.cpp mainwindow.h
- DEFINES
- SRCDIR=\\\"/\\\"
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
-#### Keys ignored in scope 1:.:icons.pro:<NONE>:
-# EXAMPLE_FILES = "images/*"
+add_executable(icons WIN32 MACOSX_BUNDLE
+ 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::Widgets
+)
+install(TARGETS icons
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt
index 4684653e64..49695865c7 100644
--- a/examples/widgets/widgets/imageviewer/CMakeLists.txt
+++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt
@@ -1,24 +1,33 @@
# Generated from imageviewer.pro.
-#####################################################################
-## imageviewer Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(imageviewer LANGUAGES CXX)
-add_qt_executable(imageviewer
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/imageviewer"
- SOURCES
- imageviewer.cpp imageviewer.h
- main.cpp
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
+
+add_executable(imageviewer WIN32 MACOSX_BUNDLE
+ imageviewer.cpp imageviewer.h
+ main.cpp
+)
+target_link_libraries(imageviewer PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(imageviewer PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-extend_target(imageviewer CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+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 59406a703d..eb8f210f6c 100644
--- a/examples/widgets/widgets/lineedits/CMakeLists.txt
+++ b/examples/widgets/widgets/lineedits/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from lineedits.pro.
-#####################################################################
-## lineedits Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(lineedits LANGUAGES CXX)
-add_qt_executable(lineedits
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(lineedits WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(lineedits PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS lineedits
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
index 6ec817458c..2746ca670a 100644
--- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt
+++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt
@@ -1,19 +1,29 @@
# Generated from mousebuttons.pro.
-#####################################################################
-## mousebuttons Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(mousebuttons LANGUAGES CXX)
-add_qt_executable(mousebuttons
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons"
- SOURCES
- buttontester.cpp buttontester.h
- main.cpp
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Core)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(mousebuttons WIN32 MACOSX_BUNDLE
+ buttontester.cpp buttontester.h
+ main.cpp
+)
+target_link_libraries(mousebuttons PUBLIC
+ Qt::Core
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:mousebuttons.pro:<NONE>:
-# TEMPLATE = "app"
+install(TARGETS mousebuttons
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt
index 0df3465fea..b96cce628e 100644
--- a/examples/widgets/widgets/movie/CMakeLists.txt
+++ b/examples/widgets/widgets/movie/CMakeLists.txt
@@ -1,19 +1,27 @@
# Generated from movie.pro.
-#####################################################################
-## movie Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(movie LANGUAGES CXX)
-add_qt_executable(movie
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie"
- SOURCES
- main.cpp
- movieplayer.cpp movieplayer.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(movie WIN32 MACOSX_BUNDLE
+ main.cpp
+ movieplayer.cpp movieplayer.h
+)
+target_link_libraries(movie PUBLIC
+ Qt::Widgets
)
-#### Keys ignored in scope 1:.:movie.pro:<NONE>:
-# EXAMPLE_FILES = "animation.gif"
+install(TARGETS movie
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt
index d9b2292336..51db261f22 100644
--- a/examples/widgets/widgets/scribble/CMakeLists.txt
+++ b/examples/widgets/widgets/scribble/CMakeLists.txt
@@ -1,25 +1,34 @@
# Generated from scribble.pro.
-#####################################################################
-## scribble Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(scribble LANGUAGES CXX)
-add_qt_executable(scribble
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/scribble"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- scribblearea.cpp scribblearea.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
-## Scopes:
-#####################################################################
+find_package(Qt5 COMPONENTS Widgets)
+find_package(Qt5 COMPONENTS PrintSupport) # special case
+
+add_executable(scribble WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ scribblearea.cpp scribblearea.h
+)
+target_link_libraries(scribble PUBLIC
+ Qt::Widgets
+)
+# special case begin
+if (TARGET Qt::PrintSupport)
+ target_link_libraries(scribble PUBLIC Qt::PrintSupport)
+endif()
+# special case end
-extend_target(scribble CONDITION TARGET Qt::PrintSupport
- LIBRARIES
- Qt::PrintSupport
+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 ab199d6981..144d3006c5 100644
--- a/examples/widgets/widgets/shapedclock/CMakeLists.txt
+++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from shapedclock.pro.
-#####################################################################
-## shapedclock Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(shapedclock LANGUAGES CXX)
-add_qt_executable(shapedclock
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock"
- SOURCES
- main.cpp
- shapedclock.cpp shapedclock.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(shapedclock WIN32 MACOSX_BUNDLE
+ main.cpp
+ shapedclock.cpp shapedclock.h
+)
+target_link_libraries(shapedclock PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS shapedclock
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt
index a064ad5a4a..bfdd22a7cc 100644
--- a/examples/widgets/widgets/sliders/CMakeLists.txt
+++ b/examples/widgets/widgets/sliders/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from sliders.pro.
-#####################################################################
-## sliders Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(sliders LANGUAGES CXX)
-add_qt_executable(sliders
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders"
- SOURCES
- main.cpp
- slidersgroup.cpp slidersgroup.h
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(sliders WIN32 MACOSX_BUNDLE
+ main.cpp
+ slidersgroup.cpp slidersgroup.h
+ window.cpp window.h
+)
+target_link_libraries(sliders PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS sliders
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt
index 8635f06a8e..680ecad2a8 100644
--- a/examples/widgets/widgets/spinboxes/CMakeLists.txt
+++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt
@@ -1,16 +1,27 @@
# Generated from spinboxes.pro.
-#####################################################################
-## spinboxes Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(spinboxes LANGUAGES CXX)
-add_qt_executable(spinboxes
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes"
- SOURCES
- main.cpp
- window.cpp window.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(spinboxes WIN32 MACOSX_BUNDLE
+ main.cpp
+ window.cpp window.h
+)
+target_link_libraries(spinboxes PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS spinboxes
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt
index d33d90a5bc..e0db35653c 100644
--- a/examples/widgets/widgets/styles/CMakeLists.txt
+++ b/examples/widgets/widgets/styles/CMakeLists.txt
@@ -1,23 +1,29 @@
# Generated from styles.pro.
-#####################################################################
-## styles Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(styles LANGUAGES CXX)
-add_qt_executable(styles
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles"
- SOURCES
- main.cpp
- norwegianwoodstyle.cpp norwegianwoodstyle.h
- widgetgallery.cpp widgetgallery.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(styles "styles" FILES
- images/woodbackground.png
- images/woodbutton.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(styles WIN32 MACOSX_BUNDLE
+ main.cpp
+ norwegianwoodstyle.cpp norwegianwoodstyle.h
+ styles.qrc
+ widgetgallery.cpp widgetgallery.h
+)
+target_link_libraries(styles PUBLIC
+ Qt::Widgets
+)
+
+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 227eb13b68..7e99a39695 100644
--- a/examples/widgets/widgets/stylesheet/CMakeLists.txt
+++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt
@@ -1,58 +1,29 @@
# Generated from stylesheet.pro.
-#####################################################################
-## stylesheet Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(stylesheet LANGUAGES CXX)
-add_qt_executable(stylesheet
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h mainwindow.ui
- stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(stylesheet "stylesheet" PREFIX "/" 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)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(stylesheet WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h mainwindow.ui
+ stylesheet.qrc
+ stylesheeteditor.cpp stylesheeteditor.h stylesheeteditor.ui
+)
+target_link_libraries(stylesheet PUBLIC
+ Qt::Widgets
+)
+
+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 f23fe7ec71..febec2afd0 100644
--- a/examples/widgets/widgets/tablet/CMakeLists.txt
+++ b/examples/widgets/widgets/tablet/CMakeLists.txt
@@ -1,26 +1,30 @@
# Generated from tablet.pro.
-#####################################################################
-## qttablet Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(qttablet LANGUAGES CXX)
-add_qt_executable(qttablet
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet"
- SOURCES
- main.cpp
- mainwindow.cpp mainwindow.h
- tabletapplication.cpp tabletapplication.h
- tabletcanvas.cpp tabletcanvas.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(qttablet "images" FILES
- images/cursor-airbrush.png
- images/cursor-eraser.png
- images/cursor-felt-marker.png
- images/cursor-pencil.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(qttablet WIN32 MACOSX_BUNDLE
+ images.qrc
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ tabletapplication.cpp tabletapplication.h
+ tabletcanvas.cpp tabletcanvas.h
+)
+target_link_libraries(qttablet PUBLIC
+ Qt::Widgets
+)
+
+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 002667a6b9..ec79577928 100644
--- a/examples/widgets/widgets/tetrix/CMakeLists.txt
+++ b/examples/widgets/widgets/tetrix/CMakeLists.txt
@@ -1,18 +1,29 @@
# Generated from tetrix.pro.
-#####################################################################
-## tetrix Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tetrix LANGUAGES CXX)
-add_qt_executable(tetrix
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix"
- SOURCES
- main.cpp
- tetrixboard.cpp tetrixboard.h
- tetrixpiece.cpp tetrixpiece.h
- tetrixwindow.cpp tetrixwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(tetrix WIN32 MACOSX_BUNDLE
+ main.cpp
+ tetrixboard.cpp tetrixboard.h
+ tetrixpiece.cpp tetrixpiece.h
+ tetrixwindow.cpp tetrixwindow.h
+)
+target_link_libraries(tetrix PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS tetrix
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt
index 02d773858a..90601659f6 100644
--- a/examples/widgets/widgets/tooltips/CMakeLists.txt
+++ b/examples/widgets/widgets/tooltips/CMakeLists.txt
@@ -1,24 +1,29 @@
# Generated from tooltips.pro.
-#####################################################################
-## tooltips Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(tooltips LANGUAGES CXX)
-add_qt_executable(tooltips
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips"
- SOURCES
- main.cpp
- shapeitem.cpp shapeitem.h
- sortingbox.cpp sortingbox.h
- LIBRARIES
- Qt::Widgets
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(tooltips "tooltips" FILES
- images/circle.png
- images/square.png
- images/triangle.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(tooltips WIN32 MACOSX_BUNDLE
+ main.cpp
+ shapeitem.cpp shapeitem.h
+ sortingbox.cpp sortingbox.h
+ tooltips.qrc
+)
+target_link_libraries(tooltips PUBLIC
+ Qt::Widgets
+)
+
+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 ef981d9eb7..b09d10dd9a 100644
--- a/examples/widgets/widgets/validators/CMakeLists.txt
+++ b/examples/widgets/widgets/validators/CMakeLists.txt
@@ -1,27 +1,30 @@
# Generated from validators.pro.
-#####################################################################
-## validators Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(validators LANGUAGES CXX)
-add_qt_executable(validators
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators"
- SOURCES
- ledwidget.cpp ledwidget.h
- localeselector.cpp localeselector.h
- main.cpp
- validators.ui
- validatorwidget.cpp validatorwidget.h
- PUBLIC_LIBRARIES
- Qt::Widgets
- ENABLE_AUTOGEN_TOOLS
- uic
-)
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
-# Resources:
-add_qt_resource(validators "validators" PREFIX "/" FILES
- ledoff.png
- ledon.png)
+set(INSTALL_EXAMPLEDIR "examples")
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(validators WIN32 MACOSX_BUNDLE
+ ledwidget.cpp ledwidget.h
+ localeselector.cpp localeselector.h
+ main.cpp
+ validators.qrc validators.ui
+ validatorwidget.cpp validatorwidget.h
+)
+target_link_libraries(validators PUBLIC
+ Qt::Widgets
+)
+
+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 cc8c0befbf..2fabcafb0e 100644
--- a/examples/widgets/widgets/wiggly/CMakeLists.txt
+++ b/examples/widgets/widgets/wiggly/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from wiggly.pro.
-#####################################################################
-## wiggly Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(wiggly LANGUAGES CXX)
-add_qt_executable(wiggly
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly"
- SOURCES
- dialog.cpp dialog.h
- main.cpp
- wigglywidget.cpp wigglywidget.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(wiggly WIN32 MACOSX_BUNDLE
+ dialog.cpp dialog.h
+ main.cpp
+ wigglywidget.cpp wigglywidget.h
+)
+target_link_libraries(wiggly PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS wiggly
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt
index aa2eff0088..0eab6f6452 100644
--- a/examples/widgets/widgets/windowflags/CMakeLists.txt
+++ b/examples/widgets/widgets/windowflags/CMakeLists.txt
@@ -1,17 +1,28 @@
# Generated from windowflags.pro.
-#####################################################################
-## windowflags Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(windowflags LANGUAGES CXX)
-add_qt_executable(windowflags
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags"
- SOURCES
- controllerwindow.cpp controllerwindow.h
- main.cpp
- previewwindow.cpp previewwindow.h
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(windowflags WIN32 MACOSX_BUNDLE
+ controllerwindow.cpp controllerwindow.h
+ main.cpp
+ previewwindow.cpp previewwindow.h
+)
+target_link_libraries(windowflags PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS windowflags
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/widgets/windowcontainer/CMakeLists.txt b/examples/widgets/windowcontainer/CMakeLists.txt
index 88dc37ea5e..f67a6515bd 100644
--- a/examples/widgets/windowcontainer/CMakeLists.txt
+++ b/examples/widgets/windowcontainer/CMakeLists.txt
@@ -1,18 +1,30 @@
# Generated from windowcontainer.pro.
-#####################################################################
-## windowcontainer Binary:
-#####################################################################
+cmake_minimum_required(VERSION 3.14)
+project(windowcontainer LANGUAGES CXX)
-add_qt_executable(windowcontainer
- GUI
- OUTPUT_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer"
- INSTALL_DIRECTORY "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer"
- SOURCES
- ../../gui/openglwindow/openglwindow.cpp ../../gui/openglwindow/openglwindow.h
- windowcontainer.cpp
- INCLUDE_DIRECTORIES
- ../../gui/openglwindow
- LIBRARIES
- Qt::Widgets
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(windowcontainer WIN32 MACOSX_BUNDLE
+ ../../gui/openglwindow/openglwindow.cpp ../../gui/openglwindow/openglwindow.h
+ windowcontainer.cpp
+)
+target_include_directories(windowcontainer PUBLIC
+ ../../gui/openglwindow
+)
+target_link_libraries(windowcontainer PUBLIC
+ Qt::Widgets
+)
+
+install(TARGETS windowcontainer
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
)
diff --git a/examples/xml/CMakeLists.txt b/examples/xml/CMakeLists.txt
new file mode 100644
index 0000000000..af7f096d19
--- /dev/null
+++ b/examples/xml/CMakeLists.txt
@@ -0,0 +1,14 @@
+# Generated from xml.pro.
+
+add_subdirectory(htmlinfo)
+add_subdirectory(xmlstreamlint)
+
+if(TARGET Qt::Widgets)
+ add_subdirectory(dombookmarks)
+ add_subdirectory(saxbookmarks)
+ add_subdirectory(streambookmarks)
+
+ if(TARGET Qt::Network)
+ add_subdirectory(rsslisting)
+ endif()
+endif()
diff --git a/examples/xml/dombookmarks/CMakeLists.txt b/examples/xml/dombookmarks/CMakeLists.txt
new file mode 100644
index 0000000000..e7d5577b0e
--- /dev/null
+++ b/examples/xml/dombookmarks/CMakeLists.txt
@@ -0,0 +1,29 @@
+# Generated from dombookmarks.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(dombookmarks LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Xml)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(dombookmarks WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ xbeltree.cpp xbeltree.h
+)
+target_link_libraries(dombookmarks PUBLIC
+ Qt::Widgets
+ Qt::Xml
+)
+install(TARGETS dombookmarks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/htmlinfo/CMakeLists.txt b/examples/xml/htmlinfo/CMakeLists.txt
new file mode 100644
index 0000000000..00ecced0c5
--- /dev/null
+++ b/examples/xml/htmlinfo/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Generated from htmlinfo.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(htmlinfo LANGUAGES CXX)
+
+find_package(Qt5 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")
+
+add_executable(htmlinfo
+ main.cpp
+)
+target_link_libraries(htmlinfo PUBLIC
+ Qt::Core
+)
+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
new file mode 100644
index 0000000000..f8c3a67c7f
--- /dev/null
+++ b/examples/xml/rsslisting/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from rsslisting.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(rsslisting LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Network)
+find_package(Qt5 COMPONENTS Xml)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(rsslisting WIN32 MACOSX_BUNDLE
+ main.cpp
+ rsslisting.cpp rsslisting.h
+)
+target_link_libraries(rsslisting PUBLIC
+ Qt::Network
+ Qt::Widgets
+ Qt::Xml
+)
+install(TARGETS rsslisting
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/saxbookmarks/CMakeLists.txt b/examples/xml/saxbookmarks/CMakeLists.txt
new file mode 100644
index 0000000000..8d003a95a5
--- /dev/null
+++ b/examples/xml/saxbookmarks/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from saxbookmarks.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(saxbookmarks LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Xml)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(saxbookmarks WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ xbelgenerator.cpp xbelgenerator.h
+ xbelhandler.cpp xbelhandler.h
+)
+target_link_libraries(saxbookmarks PUBLIC
+ Qt::Widgets
+ Qt::Xml
+)
+install(TARGETS saxbookmarks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/streambookmarks/CMakeLists.txt b/examples/xml/streambookmarks/CMakeLists.txt
new file mode 100644
index 0000000000..442e46ffd1
--- /dev/null
+++ b/examples/xml/streambookmarks/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Generated from streambookmarks.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(streambookmarks LANGUAGES CXX)
+
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(INSTALL_EXAMPLEDIR "examples")
+
+find_package(Qt5 COMPONENTS Xml)
+find_package(Qt5 COMPONENTS Widgets)
+
+add_executable(streambookmarks WIN32 MACOSX_BUNDLE
+ main.cpp
+ mainwindow.cpp mainwindow.h
+ xbelreader.cpp xbelreader.h
+ xbelwriter.cpp xbelwriter.h
+)
+target_link_libraries(streambookmarks PUBLIC
+ Qt::Widgets
+ Qt::Xml
+)
+install(TARGETS streambookmarks
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/xml/xmlstreamlint/CMakeLists.txt b/examples/xml/xmlstreamlint/CMakeLists.txt
new file mode 100644
index 0000000000..a3677a2c81
--- /dev/null
+++ b/examples/xml/xmlstreamlint/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Generated from xmlstreamlint.pro.
+
+cmake_minimum_required(VERSION 3.14)
+project(xmlstreamlint LANGUAGES CXX)
+
+find_package(Qt5 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")
+
+add_executable(xmlstreamlint
+ main.cpp
+)
+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/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in
index 3775fc64b9..81d89ccd68 100644
--- a/src/corelib/Qt5CoreConfigExtras.cmake.in
+++ b/src/corelib/Qt5CoreConfigExtras.cmake.in
@@ -1,8 +1,3 @@
-set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_MAJOR_VERSION @PROJECT_MAJOR_VERSION@)
-set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE)
-set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY
- COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
-)
# include(\"${CMAKE_CURRENT_LIST_DIR}/Qt5CoreConfigExtrasMkspecDir.cmake\")
#
@@ -14,19 +9,27 @@ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY
# set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${_qt5_corelib_extra_includes})
# set(_qt5_corelib_extra_includes)
-# On x86 and x86-64 systems with ELF binaries (especially Linux), due to
-# a new optimization in GCC 5.x in combination with a recent version of
-# GNU binutils, compiling Qt applications with -fPIE is no longer
-# enough.
-# Applications now need to be compiled with the -fPIC option if the Qt option
-# \"reduce relocations\" is active. For backward compatibility only, Qt accepts
-# the use of -fPIE for GCC 4.x versions.
-if (CMAKE_CXX_COMPILER MATCHES "icc.*$" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fPIC")
-endif()
+if (NOT QT_NO_CREATE_TARGETS)
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_MAJOR_VERSION @PROJECT_MAJOR_VERSION@)
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_QT_COORD_TYPE $$QT_COORD_TYPE)
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY
+ COMPATIBLE_INTERFACE_STRING QT_MAJOR_VERSION QT_COORD_TYPE
+ )
+
+ # On x86 and x86-64 systems with ELF binaries (especially Linux), due to
+ # a new optimization in GCC 5.x in combination with a recent version of
+ # GNU binutils, compiling Qt applications with -fPIE is no longer
+ # enough.
+ # Applications now need to be compiled with the -fPIC option if the Qt option
+ # \"reduce relocations\" is active. For backward compatibility only, Qt accepts
+ # the use of -fPIE for GCC 4.x versions.
+ if (CMAKE_CXX_COMPILER MATCHES "icc.*$" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_OPTIONS "-fPIC")
+ endif()
-if (NOT "@QT_NAMESPACE@" STREQUAL "")
- set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=@QT_NAMESPACE@)
+ if (NOT "@QT_NAMESPACE@" STREQUAL "")
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS QT_NAMESPACE=@QT_NAMESPACE@)
+ endif()
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
+ set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)
endif()
-set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS $<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG>)
-set_property(TARGET @QT_CMAKE_EXPORT_NAMESPACE@::Core PROPERTY INTERFACE_COMPILE_FEATURES cxx_decltype)