diff options
author | Kai Köhne <[email protected]> | 2022-11-15 22:00:14 +0100 |
---|---|---|
committer | Kai Köhne <[email protected]> | 2022-11-17 19:59:11 +0100 |
commit | f562711c642cba7bed6c96d452437ffc9b25edc4 (patch) | |
tree | 4fdfc0718caadac4341b295af0132d3310d49fb5 | |
parent | bec264c15fe07382009def3c4bbef3f3b689b6eb (diff) |
Examples: Use qt_standard_project_setup()
Change-Id: I0ceab08108b7e58e4e2ed25db9e3c289f5c0ddac
Reviewed-by: Jörg Bornemann <[email protected]>
239 files changed, 476 insertions, 503 deletions
diff --git a/examples/corelib/bindableproperties/bindablesubscription/CMakeLists.txt b/examples/corelib/bindableproperties/bindablesubscription/CMakeLists.txt index e2c97f3083c..28bf806c4f1 100644 --- a/examples/corelib/bindableproperties/bindablesubscription/CMakeLists.txt +++ b/examples/corelib/bindableproperties/bindablesubscription/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(bindablesubscription LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/bindableproperties/bindab find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(bindablesubscription ../shared/subscriptionwindow.cpp ../shared/subscriptionwindow.h ../shared/subscriptionwindow.ui main.cpp diff --git a/examples/corelib/bindableproperties/subscription/CMakeLists.txt b/examples/corelib/bindableproperties/subscription/CMakeLists.txt index c429493d0ae..116eb2d9eae 100644 --- a/examples/corelib/bindableproperties/subscription/CMakeLists.txt +++ b/examples/corelib/bindableproperties/subscription/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(subscription LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/bindableproperties/subscr find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(subscription ../shared/subscriptionwindow.cpp ../shared/subscriptionwindow.h ../shared/subscriptionwindow.ui main.cpp diff --git a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt index e0102f598ca..e8c434df087 100644 --- a/examples/corelib/ipc/localfortuneclient/CMakeLists.txt +++ b/examples/corelib/ipc/localfortuneclient/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(localfortuneclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(localfortuneclient client.cpp client.h main.cpp diff --git a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt index 85af3ee4109..75ba716c37f 100644 --- a/examples/corelib/ipc/localfortuneserver/CMakeLists.txt +++ b/examples/corelib/ipc/localfortuneserver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(localfortuneserver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/localfortuneserver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(localfortuneserver main.cpp server.cpp server.h diff --git a/examples/corelib/ipc/sharedmemory/CMakeLists.txt b/examples/corelib/ipc/sharedmemory/CMakeLists.txt index 79a70f8bed2..a3d9acee1d2 100644 --- a/examples/corelib/ipc/sharedmemory/CMakeLists.txt +++ b/examples/corelib/ipc/sharedmemory/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(sharedmemory LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/ipc/sharedmemory") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(sharedmemory dialog.cpp dialog.h dialog.ui main.cpp diff --git a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt index 1a54521823e..4865847fb78 100644 --- a/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt +++ b/examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mimetypebrowser LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/mimetypes/mimetypebrowser find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mimetypebrowser main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/corelib/permissions/CMakeLists.txt b/examples/corelib/permissions/CMakeLists.txt index c9cb76487ca..e0e4779097b 100644 --- a/examples/corelib/permissions/CMakeLists.txt +++ b/examples/corelib/permissions/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(permissions LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/permissions") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(permissions MANUAL_FINALIZATION main.cpp diff --git a/examples/corelib/platform/androidnotifier/CMakeLists.txt b/examples/corelib/platform/androidnotifier/CMakeLists.txt index 052b11fa8df..e05afc29014 100644 --- a/examples/corelib/platform/androidnotifier/CMakeLists.txt +++ b/examples/corelib/platform/androidnotifier/CMakeLists.txt @@ -8,14 +8,14 @@ if(NOT ANDROID) message(FATAL_ERROR "Example only works on Android") endif() -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() find_package(Qt6 REQUIRED COMPONENTS Widgets) +qt_standard_project_setup() + set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/platform/androidnotifier") qt_add_executable(androidnotifier diff --git a/examples/corelib/serialization/cbordump/CMakeLists.txt b/examples/corelib/serialization/cbordump/CMakeLists.txt index 29632060bd7..2b175b18056 100644 --- a/examples/corelib/serialization/cbordump/CMakeLists.txt +++ b/examples/corelib/serialization/cbordump/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(cbordump LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/cbordump") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(cbordump main.cpp ) diff --git a/examples/corelib/serialization/convert/CMakeLists.txt b/examples/corelib/serialization/convert/CMakeLists.txt index d6d528b1a47..9d76c589ce6 100644 --- a/examples/corelib/serialization/convert/CMakeLists.txt +++ b/examples/corelib/serialization/convert/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(convert LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/convert") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(convert cborconverter.cpp cborconverter.h converter.h diff --git a/examples/corelib/serialization/savegame/CMakeLists.txt b/examples/corelib/serialization/savegame/CMakeLists.txt index 05a6a494f52..723a9e66f09 100644 --- a/examples/corelib/serialization/savegame/CMakeLists.txt +++ b/examples/corelib/serialization/savegame/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(savegame LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/serialization/savegame") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(savegame character.cpp character.h game.cpp game.h diff --git a/examples/corelib/threads/mandelbrot/CMakeLists.txt b/examples/corelib/threads/mandelbrot/CMakeLists.txt index 8b4b1be4bdb..38028e01889 100644 --- a/examples/corelib/threads/mandelbrot/CMakeLists.txt +++ b/examples/corelib/threads/mandelbrot/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mandelbrot LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/mandelbrot") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mandelbrot main.cpp mandelbrotwidget.cpp mandelbrotwidget.h diff --git a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt index 50504876867..8cdef289e85 100644 --- a/examples/corelib/threads/queuedcustomtype/CMakeLists.txt +++ b/examples/corelib/threads/queuedcustomtype/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(queuedcustomtype LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/queuedcustomtype" find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(queuedcustomtype block.cpp block.h main.cpp diff --git a/examples/corelib/threads/semaphores/CMakeLists.txt b/examples/corelib/threads/semaphores/CMakeLists.txt index 652ab05bcb0..61101ec6c45 100644 --- a/examples/corelib/threads/semaphores/CMakeLists.txt +++ b/examples/corelib/threads/semaphores/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(semaphores LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/semaphores") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(semaphores semaphores.cpp ) diff --git a/examples/corelib/threads/waitconditions/CMakeLists.txt b/examples/corelib/threads/waitconditions/CMakeLists.txt index d8b8ae58622..13622c522ae 100644 --- a/examples/corelib/threads/waitconditions/CMakeLists.txt +++ b/examples/corelib/threads/waitconditions/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(waitconditions LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/threads/waitconditions") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(waitconditions waitconditions.cpp ) diff --git a/examples/corelib/tools/contiguouscache/CMakeLists.txt b/examples/corelib/tools/contiguouscache/CMakeLists.txt index 4c5c8847f71..c2b52f14264 100644 --- a/examples/corelib/tools/contiguouscache/CMakeLists.txt +++ b/examples/corelib/tools/contiguouscache/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(contiguouscache LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/contiguouscache") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(contiguouscache main.cpp randomlistmodel.cpp randomlistmodel.h diff --git a/examples/corelib/tools/customtype/CMakeLists.txt b/examples/corelib/tools/customtype/CMakeLists.txt index 408cc97a14b..d03b961f4cd 100644 --- a/examples/corelib/tools/customtype/CMakeLists.txt +++ b/examples/corelib/tools/customtype/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(customtype LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/customtype") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(customtype main.cpp message.cpp message.h diff --git a/examples/corelib/tools/customtypesending/CMakeLists.txt b/examples/corelib/tools/customtypesending/CMakeLists.txt index c784d302e73..8a72ef091b1 100644 --- a/examples/corelib/tools/customtypesending/CMakeLists.txt +++ b/examples/corelib/tools/customtypesending/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(customtypesending LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/corelib/tools/customtypesending") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(customtypesending main.cpp message.cpp message.h diff --git a/examples/dbus/chat/CMakeLists.txt b/examples/dbus/chat/CMakeLists.txt index b517ff49293..3da97fd268b 100644 --- a/examples/dbus/chat/CMakeLists.txt +++ b/examples/dbus/chat/CMakeLists.txt @@ -6,9 +6,6 @@ project(chat LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/chat") find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) +qt_standard_project_setup() + set(chat_SRCS) qt_add_dbus_interface(chat_SRCS org.example.chat.xml diff --git a/examples/dbus/complexpingpong/CMakeLists.txt b/examples/dbus/complexpingpong/CMakeLists.txt index ed4b19ec979..377b56b1abe 100644 --- a/examples/dbus/complexpingpong/CMakeLists.txt +++ b/examples/dbus/complexpingpong/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(complexpingpong LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/complexpingpong") find_package(Qt6 REQUIRED COMPONENTS Core DBus) +qt_standard_project_setup() + qt_add_executable(complexping complexping.cpp complexping.h ping-common.h diff --git a/examples/dbus/listnames/CMakeLists.txt b/examples/dbus/listnames/CMakeLists.txt index 3b92cafa965..dec2622ebd4 100644 --- a/examples/dbus/listnames/CMakeLists.txt +++ b/examples/dbus/listnames/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(listnames LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/listnames") find_package(Qt6 REQUIRED COMPONENTS Core DBus) +qt_standard_project_setup() + qt_add_executable(listnames listnames.cpp ) diff --git a/examples/dbus/pingpong/CMakeLists.txt b/examples/dbus/pingpong/CMakeLists.txt index de365b3b155..4c87f7249a5 100644 --- a/examples/dbus/pingpong/CMakeLists.txt +++ b/examples/dbus/pingpong/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(pingpong LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/pingpong") find_package(Qt6 REQUIRED COMPONENTS Core DBus) +qt_standard_project_setup() + qt_add_executable(ping ping.cpp ping-common.h diff --git a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt index 5e2cebea377..653d9074344 100644 --- a/examples/dbus/remotecontrolledcar/car/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/car/CMakeLists.txt @@ -6,8 +6,6 @@ project(car LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -16,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/car") find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) +qt_standard_project_setup() + set(car_SRCS) qt_add_dbus_adaptor(car_SRCS car.xml diff --git a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt index 476efb24da9..0d46f00b328 100644 --- a/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt +++ b/examples/dbus/remotecontrolledcar/controller/CMakeLists.txt @@ -6,9 +6,6 @@ project(controller LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/dbus/remotecontrolledcar/controll find_package(Qt6 REQUIRED COMPONENTS Core DBus Gui Widgets) +qt_standard_project_setup() + set(controller_SRCS) qt_add_dbus_interface(controller_SRCS car.xml diff --git a/examples/embedded/digiflip/CMakeLists.txt b/examples/embedded/digiflip/CMakeLists.txt index 8c3864b288b..c54497cf15c 100644 --- a/examples/embedded/digiflip/CMakeLists.txt +++ b/examples/embedded/digiflip/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(digiflip LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/digiflip") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(digiflip digiflip.cpp ) diff --git a/examples/embedded/flickable/CMakeLists.txt b/examples/embedded/flickable/CMakeLists.txt index fdfae20820c..b7a29b38057 100644 --- a/examples/embedded/flickable/CMakeLists.txt +++ b/examples/embedded/flickable/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(flickable LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/flickable") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(flickable flickable.cpp flickable.h main.cpp diff --git a/examples/embedded/flightinfo/CMakeLists.txt b/examples/embedded/flightinfo/CMakeLists.txt index acc66af426c..0406d577301 100644 --- a/examples/embedded/flightinfo/CMakeLists.txt +++ b/examples/embedded/flightinfo/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(flightinfo LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/flightinfo") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(flightinfo flightinfo.cpp form.ui diff --git a/examples/embedded/lightmaps/CMakeLists.txt b/examples/embedded/lightmaps/CMakeLists.txt index d6e1f9bb886..37cc527a6d0 100644 --- a/examples/embedded/lightmaps/CMakeLists.txt +++ b/examples/embedded/lightmaps/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(lightmaps LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/lightmaps") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(lightmaps lightmaps.cpp lightmaps.h main.cpp diff --git a/examples/embedded/raycasting/CMakeLists.txt b/examples/embedded/raycasting/CMakeLists.txt index 1506415e301..f8c8b8c0c15 100644 --- a/examples/embedded/raycasting/CMakeLists.txt +++ b/examples/embedded/raycasting/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(raycasting LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/raycasting") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(raycasting raycasting.cpp ) diff --git a/examples/embedded/styleexample/CMakeLists.txt b/examples/embedded/styleexample/CMakeLists.txt index 89c2e4f02f1..ffc652081f1 100644 --- a/examples/embedded/styleexample/CMakeLists.txt +++ b/examples/embedded/styleexample/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(styleexample LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/embedded/styleexample") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(styleexample main.cpp stylewidget.cpp stylewidget.h stylewidget.ui diff --git a/examples/gui/analogclock/CMakeLists.txt b/examples/gui/analogclock/CMakeLists.txt index e5ee4d0e6ef..ddb1f8f93b2 100644 --- a/examples/gui/analogclock/CMakeLists.txt +++ b/examples/gui/analogclock/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(analogclock LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/gui_analogclock") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(gui_analogclock ../rasterwindow/rasterwindow.cpp ../rasterwindow/rasterwindow.h main.cpp diff --git a/examples/gui/rasterwindow/CMakeLists.txt b/examples/gui/rasterwindow/CMakeLists.txt index 8313c176c62..c09da497793 100644 --- a/examples/gui/rasterwindow/CMakeLists.txt +++ b/examples/gui/rasterwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(rasterwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/gui/rasterwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(rasterwindow main.cpp rasterwindow.cpp rasterwindow.h diff --git a/examples/network/blockingfortuneclient/CMakeLists.txt b/examples/network/blockingfortuneclient/CMakeLists.txt index cd4680c5db3..dd11850c625 100644 --- a/examples/network/blockingfortuneclient/CMakeLists.txt +++ b/examples/network/blockingfortuneclient/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(blockingfortuneclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/blockingfortuneclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(blockingfortuneclient blockingclient.cpp blockingclient.h fortunethread.cpp fortunethread.h diff --git a/examples/network/broadcastreceiver/CMakeLists.txt b/examples/network/broadcastreceiver/CMakeLists.txt index e5a445b4b7e..4d20e762682 100644 --- a/examples/network/broadcastreceiver/CMakeLists.txt +++ b/examples/network/broadcastreceiver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(broadcastreceiver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/broadcastreceiver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(broadcastreceiver main.cpp receiver.cpp receiver.h diff --git a/examples/network/broadcastsender/CMakeLists.txt b/examples/network/broadcastsender/CMakeLists.txt index 34584253558..aff752b574f 100644 --- a/examples/network/broadcastsender/CMakeLists.txt +++ b/examples/network/broadcastsender/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(broadcastsender LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/broadcastsender") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(broadcastsender main.cpp sender.cpp sender.h diff --git a/examples/network/dnslookup/CMakeLists.txt b/examples/network/dnslookup/CMakeLists.txt index 92080dbc3f5..c9668cc251b 100644 --- a/examples/network/dnslookup/CMakeLists.txt +++ b/examples/network/dnslookup/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dnslookup LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/dnslookup") find_package(Qt6 REQUIRED COMPONENTS Core Network) +qt_standard_project_setup() + qt_add_executable(dnslookup dnslookup.cpp dnslookup.h ) diff --git a/examples/network/download/CMakeLists.txt b/examples/network/download/CMakeLists.txt index 12b50ab6a5d..737b95f5528 100644 --- a/examples/network/download/CMakeLists.txt +++ b/examples/network/download/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(download LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/download") find_package(Qt6 REQUIRED COMPONENTS Core Network) +qt_standard_project_setup() + qt_add_executable(download main.cpp ) diff --git a/examples/network/downloadmanager/CMakeLists.txt b/examples/network/downloadmanager/CMakeLists.txt index dfb4cd5c21c..ee246148664 100644 --- a/examples/network/downloadmanager/CMakeLists.txt +++ b/examples/network/downloadmanager/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(downloadmanager LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/downloadmanager") find_package(Qt6 REQUIRED COMPONENTS Core Network) +qt_standard_project_setup() + qt_add_executable(downloadmanager downloadmanager.cpp downloadmanager.h main.cpp diff --git a/examples/network/fortuneclient/CMakeLists.txt b/examples/network/fortuneclient/CMakeLists.txt index 253e529a919..09f5a1b1db5 100644 --- a/examples/network/fortuneclient/CMakeLists.txt +++ b/examples/network/fortuneclient/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fortuneclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/fortuneclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(fortuneclient client.cpp client.h main.cpp diff --git a/examples/network/fortuneserver/CMakeLists.txt b/examples/network/fortuneserver/CMakeLists.txt index d387bd8e9ae..fe7126f39f0 100644 --- a/examples/network/fortuneserver/CMakeLists.txt +++ b/examples/network/fortuneserver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fortuneserver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/fortuneserver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(fortuneserver main.cpp server.cpp server.h diff --git a/examples/network/googlesuggest/CMakeLists.txt b/examples/network/googlesuggest/CMakeLists.txt index 7c6020d54ab..5e1486b99dd 100644 --- a/examples/network/googlesuggest/CMakeLists.txt +++ b/examples/network/googlesuggest/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(googlesuggest LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/googlesuggest") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(googlesuggest googlesuggest.cpp googlesuggest.h main.cpp diff --git a/examples/network/http/CMakeLists.txt b/examples/network/http/CMakeLists.txt index 43a83b7d4a9..7c68d5156c7 100644 --- a/examples/network/http/CMakeLists.txt +++ b/examples/network/http/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(http LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/http") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(http authenticationdialog.ui httpwindow.cpp httpwindow.h diff --git a/examples/network/loopback/CMakeLists.txt b/examples/network/loopback/CMakeLists.txt index 5229430fed6..99ed77e0604 100644 --- a/examples/network/loopback/CMakeLists.txt +++ b/examples/network/loopback/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(loopback LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/loopback") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(loopback dialog.cpp dialog.h main.cpp diff --git a/examples/network/multicastreceiver/CMakeLists.txt b/examples/network/multicastreceiver/CMakeLists.txt index ca80b508e2a..b7ec8308661 100644 --- a/examples/network/multicastreceiver/CMakeLists.txt +++ b/examples/network/multicastreceiver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(multicastreceiver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multicastreceiver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(multicastreceiver main.cpp receiver.cpp receiver.h diff --git a/examples/network/multicastsender/CMakeLists.txt b/examples/network/multicastsender/CMakeLists.txt index 879dc7af207..933f2a9fc89 100644 --- a/examples/network/multicastsender/CMakeLists.txt +++ b/examples/network/multicastsender/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(multicastsender LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multicastsender") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(multicastsender main.cpp sender.cpp sender.h diff --git a/examples/network/multistreamclient/CMakeLists.txt b/examples/network/multistreamclient/CMakeLists.txt index 512c2364ebf..da10f89ecaa 100644 --- a/examples/network/multistreamclient/CMakeLists.txt +++ b/examples/network/multistreamclient/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(multistreamclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multistreamclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(multistreamclient chatconsumer.cpp chatconsumer.h client.cpp client.h diff --git a/examples/network/multistreamserver/CMakeLists.txt b/examples/network/multistreamserver/CMakeLists.txt index 8c0b4327485..fa50c9f7783 100644 --- a/examples/network/multistreamserver/CMakeLists.txt +++ b/examples/network/multistreamserver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(multistreamserver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/multistreamserver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(multistreamserver chatprovider.cpp chatprovider.h main.cpp diff --git a/examples/network/network-chat/CMakeLists.txt b/examples/network/network-chat/CMakeLists.txt index 9ec480926ef..886e54ae4fd 100644 --- a/examples/network/network-chat/CMakeLists.txt +++ b/examples/network/network-chat/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(network-chat LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/network-chat") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(network-chat chatdialog.cpp chatdialog.h chatdialog.ui client.cpp client.h diff --git a/examples/network/securesocketclient/CMakeLists.txt b/examples/network/securesocketclient/CMakeLists.txt index 65b222a7b08..6d101391476 100644 --- a/examples/network/securesocketclient/CMakeLists.txt +++ b/examples/network/securesocketclient/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(securesocketclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/securesocketclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(securesocketclient certificateinfo.cpp certificateinfo.h certificateinfo.ui main.cpp diff --git a/examples/network/secureudpclient/CMakeLists.txt b/examples/network/secureudpclient/CMakeLists.txt index 0098f8665d8..5625759443e 100644 --- a/examples/network/secureudpclient/CMakeLists.txt +++ b/examples/network/secureudpclient/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(secureudpclient LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/secureudpclient") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(secureudpclient addressdialog.cpp addressdialog.h addressdialog.ui association.cpp association.h diff --git a/examples/network/secureudpserver/CMakeLists.txt b/examples/network/secureudpserver/CMakeLists.txt index a2e91f011bf..2e874956256 100644 --- a/examples/network/secureudpserver/CMakeLists.txt +++ b/examples/network/secureudpserver/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(secureudpserver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/secureudpserver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(secureudpserver main.cpp mainwindow.cpp mainwindow.h mainwindow.ui diff --git a/examples/network/threadedfortuneserver/CMakeLists.txt b/examples/network/threadedfortuneserver/CMakeLists.txt index 8cefe0864c6..a016e73f42a 100644 --- a/examples/network/threadedfortuneserver/CMakeLists.txt +++ b/examples/network/threadedfortuneserver/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(threadedfortuneserver LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/threadedfortuneserver") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(threadedfortuneserver dialog.cpp dialog.h fortuneserver.cpp fortuneserver.h diff --git a/examples/network/torrent/CMakeLists.txt b/examples/network/torrent/CMakeLists.txt index cf042c9f677..d3cbc78eb5e 100644 --- a/examples/network/torrent/CMakeLists.txt +++ b/examples/network/torrent/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(torrent LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/network/torrent") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(torrent addtorrentdialog.cpp addtorrentdialog.h addtorrentform.ui diff --git a/examples/opengl/2dpainting/CMakeLists.txt b/examples/opengl/2dpainting/CMakeLists.txt index 8f508090bee..c6f320ffe71 100644 --- a/examples/opengl/2dpainting/CMakeLists.txt +++ b/examples/opengl/2dpainting/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(2dpainting LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/2dpainting") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(2dpainting glwidget.cpp glwidget.h helper.cpp helper.h diff --git a/examples/opengl/computegles31/CMakeLists.txt b/examples/opengl/computegles31/CMakeLists.txt index ea1cc23eb77..ccbf1580369 100644 --- a/examples/opengl/computegles31/CMakeLists.txt +++ b/examples/opengl/computegles31/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(computegles31 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/computegles31") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(computegles31 glwindow.cpp glwindow.h main.cpp diff --git a/examples/opengl/contextinfo/CMakeLists.txt b/examples/opengl/contextinfo/CMakeLists.txt index fbec66adc54..7b49a02a535 100644 --- a/examples/opengl/contextinfo/CMakeLists.txt +++ b/examples/opengl/contextinfo/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(contextinfo LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/contextinfo") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Widgets) +qt_standard_project_setup() + qt_add_executable(contextinfo main.cpp renderwindow.cpp renderwindow.h diff --git a/examples/opengl/cube/CMakeLists.txt b/examples/opengl/cube/CMakeLists.txt index eadfce631af..ea999ed4e5e 100644 --- a/examples/opengl/cube/CMakeLists.txt +++ b/examples/opengl/cube/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(cube LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/cube") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(cube geometryengine.cpp geometryengine.h main.cpp diff --git a/examples/opengl/hellogl2/CMakeLists.txt b/examples/opengl/hellogl2/CMakeLists.txt index 2095c0ebf28..f15c5ffe85d 100644 --- a/examples/opengl/hellogl2/CMakeLists.txt +++ b/examples/opengl/hellogl2/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellogl2 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellogl2") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(hellogl2 glwidget.cpp glwidget.h logo.cpp logo.h diff --git a/examples/opengl/hellogles3/CMakeLists.txt b/examples/opengl/hellogles3/CMakeLists.txt index 230a6da8b09..aa54ec9b934 100644 --- a/examples/opengl/hellogles3/CMakeLists.txt +++ b/examples/opengl/hellogles3/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellogles3 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellogles3") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(hellogles3 ../hellogl2/logo.cpp ../hellogl2/logo.h glwindow.cpp glwindow.h diff --git a/examples/opengl/hellowindow/CMakeLists.txt b/examples/opengl/hellowindow/CMakeLists.txt index 00291e89180..3ac623a99a7 100644 --- a/examples/opengl/hellowindow/CMakeLists.txt +++ b/examples/opengl/hellowindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellowindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/hellowindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(hellowindow hellowindow.cpp hellowindow.h main.cpp diff --git a/examples/opengl/openglwindow/CMakeLists.txt b/examples/opengl/openglwindow/CMakeLists.txt index 250c8f70db9..a22f92dcd8d 100644 --- a/examples/opengl/openglwindow/CMakeLists.txt +++ b/examples/opengl/openglwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(openglwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/openglwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(openglwindow main.cpp openglwindow.cpp openglwindow.h diff --git a/examples/opengl/paintedwindow/CMakeLists.txt b/examples/opengl/paintedwindow/CMakeLists.txt index 782e9f14c70..53ae5a01e26 100644 --- a/examples/opengl/paintedwindow/CMakeLists.txt +++ b/examples/opengl/paintedwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(paintedwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/paintedwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(paintedwindow main.cpp paintedwindow.cpp paintedwindow.h diff --git a/examples/opengl/qopenglwidget/CMakeLists.txt b/examples/opengl/qopenglwidget/CMakeLists.txt index dcb0411a3e9..293d0b5037b 100644 --- a/examples/opengl/qopenglwidget/CMakeLists.txt +++ b/examples/opengl/qopenglwidget/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(qopenglwidget LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/qopenglwidget") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(qopenglwidget bubble.cpp bubble.h glwidget.cpp glwidget.h diff --git a/examples/opengl/qopenglwindow/CMakeLists.txt b/examples/opengl/qopenglwindow/CMakeLists.txt index be03f24f9b0..fd9f59b63ec 100644 --- a/examples/opengl/qopenglwindow/CMakeLists.txt +++ b/examples/opengl/qopenglwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(qopenglwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/qopenglwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL) +qt_standard_project_setup() + qt_add_executable(qopenglwindow background_renderer.cpp background_renderer.h main.cpp diff --git a/examples/opengl/textures/CMakeLists.txt b/examples/opengl/textures/CMakeLists.txt index 08a044c9b7f..bf22cda67fc 100644 --- a/examples/opengl/textures/CMakeLists.txt +++ b/examples/opengl/textures/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(textures LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/textures") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(textures glwidget.cpp glwidget.h main.cpp diff --git a/examples/opengl/threadedqopenglwidget/CMakeLists.txt b/examples/opengl/threadedqopenglwidget/CMakeLists.txt index 0a944ef0b51..23cedd81bd8 100644 --- a/examples/opengl/threadedqopenglwidget/CMakeLists.txt +++ b/examples/opengl/threadedqopenglwidget/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(threadedqopenglwidget LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/threadedqopenglwidget") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets) +qt_standard_project_setup() + qt_add_executable(threadedqopenglwidget renderer.cpp renderer.h glwidget.cpp glwidget.h diff --git a/examples/qpa/qrasterwindow/CMakeLists.txt b/examples/qpa/qrasterwindow/CMakeLists.txt index 1b9d2c41b55..98068e87f81 100644 --- a/examples/qpa/qrasterwindow/CMakeLists.txt +++ b/examples/qpa/qrasterwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(qrasterwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qpa/qrasterwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(qrasterwindow main.cpp ) diff --git a/examples/qpa/windows/CMakeLists.txt b/examples/qpa/windows/CMakeLists.txt index 90ca0c3ee74..fabc8665b05 100644 --- a/examples/qpa/windows/CMakeLists.txt +++ b/examples/qpa/windows/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(windows LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qpa/windows") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(windows main.cpp window.cpp window.h diff --git a/examples/qtconcurrent/imagescaling/CMakeLists.txt b/examples/qtconcurrent/imagescaling/CMakeLists.txt index 24b0999b34b..4ef3d5623eb 100644 --- a/examples/qtconcurrent/imagescaling/CMakeLists.txt +++ b/examples/qtconcurrent/imagescaling/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(imagescaling LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/imagescaling") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Network Widgets) +qt_standard_project_setup() + qt_add_executable(imagescaling downloaddialog.cpp downloaddialog.h downloaddialog.ui imagescaling.cpp imagescaling.h diff --git a/examples/qtconcurrent/map/CMakeLists.txt b/examples/qtconcurrent/map/CMakeLists.txt index c0739ca9af4..58caf882bce 100644 --- a/examples/qtconcurrent/map/CMakeLists.txt +++ b/examples/qtconcurrent/map/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mapdemo LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/map") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui) +qt_standard_project_setup() + qt_add_executable(mapdemo main.cpp ) diff --git a/examples/qtconcurrent/progressdialog/CMakeLists.txt b/examples/qtconcurrent/progressdialog/CMakeLists.txt index a256227e639..c021f801932 100644 --- a/examples/qtconcurrent/progressdialog/CMakeLists.txt +++ b/examples/qtconcurrent/progressdialog/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(progressdialog LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/progressdialog") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(progressdialog main.cpp ) diff --git a/examples/qtconcurrent/runfunction/CMakeLists.txt b/examples/qtconcurrent/runfunction/CMakeLists.txt index c2598a782bd..7793004519a 100644 --- a/examples/qtconcurrent/runfunction/CMakeLists.txt +++ b/examples/qtconcurrent/runfunction/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(runfunction LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/runfunction") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(runfunction main.cpp ) diff --git a/examples/qtconcurrent/wordcount/CMakeLists.txt b/examples/qtconcurrent/wordcount/CMakeLists.txt index 3221fa37ea1..1e62a0e3a27 100644 --- a/examples/qtconcurrent/wordcount/CMakeLists.txt +++ b/examples/qtconcurrent/wordcount/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(wordcount LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtconcurrent/wordcount") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(wordcount main.cpp ) diff --git a/examples/qtestlib/tutorial1/CMakeLists.txt b/examples/qtestlib/tutorial1/CMakeLists.txt index 29b2c5ccd56..76889d878f8 100644 --- a/examples/qtestlib/tutorial1/CMakeLists.txt +++ b/examples/qtestlib/tutorial1/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tutorial1 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial1") find_package(Qt6 REQUIRED COMPONENTS Core Gui Test Widgets) +qt_standard_project_setup() + qt_add_executable(tutorial1 testqstring.cpp ) diff --git a/examples/qtestlib/tutorial2/CMakeLists.txt b/examples/qtestlib/tutorial2/CMakeLists.txt index f178ee39ea2..3fb761f8ee9 100644 --- a/examples/qtestlib/tutorial2/CMakeLists.txt +++ b/examples/qtestlib/tutorial2/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tutorial2 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial2") find_package(Qt6 REQUIRED COMPONENTS Core Gui Test Widgets) +qt_standard_project_setup() + qt_add_executable(tutorial2 testqstring.cpp ) diff --git a/examples/qtestlib/tutorial3/CMakeLists.txt b/examples/qtestlib/tutorial3/CMakeLists.txt index 318923fe98f..6a83c0d00d7 100644 --- a/examples/qtestlib/tutorial3/CMakeLists.txt +++ b/examples/qtestlib/tutorial3/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tutorial3 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial3") find_package(Qt6 REQUIRED COMPONENTS Core Gui Test Widgets) +qt_standard_project_setup() + qt_add_executable(tutorial3 testgui.cpp ) diff --git a/examples/qtestlib/tutorial4/CMakeLists.txt b/examples/qtestlib/tutorial4/CMakeLists.txt index 47f379d6795..61dde45c681 100644 --- a/examples/qtestlib/tutorial4/CMakeLists.txt +++ b/examples/qtestlib/tutorial4/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tutorial4 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial4") find_package(Qt6 REQUIRED COMPONENTS Core Gui Test Widgets) +qt_standard_project_setup() + qt_add_executable(tutorial4 testgui.cpp ) diff --git a/examples/qtestlib/tutorial5/CMakeLists.txt b/examples/qtestlib/tutorial5/CMakeLists.txt index 0ef2c9b33b4..58cf0f61e3f 100644 --- a/examples/qtestlib/tutorial5/CMakeLists.txt +++ b/examples/qtestlib/tutorial5/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tutorial5 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/qtestlib/tutorial5") find_package(Qt6 REQUIRED COMPONENTS Core Gui Test Widgets) +qt_standard_project_setup() + qt_add_executable(tutorial5 benchmarking.cpp ) diff --git a/examples/sql/books/CMakeLists.txt b/examples/sql/books/CMakeLists.txt index 48c7db386c3..928912922c9 100644 --- a/examples/sql/books/CMakeLists.txt +++ b/examples/sql/books/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(books LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/books") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(books bookdelegate.cpp bookdelegate.h bookwindow.cpp bookwindow.h bookwindow.ui diff --git a/examples/sql/cachedtable/CMakeLists.txt b/examples/sql/cachedtable/CMakeLists.txt index 3a76b9677af..806a80ade75 100644 --- a/examples/sql/cachedtable/CMakeLists.txt +++ b/examples/sql/cachedtable/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(cachedtable LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/cachedtable") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(cachedtable ../connection.h main.cpp diff --git a/examples/sql/drilldown/CMakeLists.txt b/examples/sql/drilldown/CMakeLists.txt index 0bbed9d1401..5c0398bb75b 100644 --- a/examples/sql/drilldown/CMakeLists.txt +++ b/examples/sql/drilldown/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(drilldown LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/drilldown") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(drilldown ../connection.h imageitem.cpp imageitem.h diff --git a/examples/sql/masterdetail/CMakeLists.txt b/examples/sql/masterdetail/CMakeLists.txt index 346d7dc2c8d..8e6bfd23672 100644 --- a/examples/sql/masterdetail/CMakeLists.txt +++ b/examples/sql/masterdetail/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(masterdetail LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/masterdetail") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets Xml) +qt_standard_project_setup() + qt_add_executable(masterdetail database.h dialog.cpp dialog.h diff --git a/examples/sql/querymodel/CMakeLists.txt b/examples/sql/querymodel/CMakeLists.txt index 84ea7e58ba9..1682b56f16d 100644 --- a/examples/sql/querymodel/CMakeLists.txt +++ b/examples/sql/querymodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(querymodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/querymodel") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(querymodel ../connection.h customsqlmodel.cpp customsqlmodel.h diff --git a/examples/sql/relationaltablemodel/CMakeLists.txt b/examples/sql/relationaltablemodel/CMakeLists.txt index 45f733c9e52..33e509767e4 100644 --- a/examples/sql/relationaltablemodel/CMakeLists.txt +++ b/examples/sql/relationaltablemodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(relationaltablemodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/relationaltablemodel") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(relationaltablemodel ../connection.h relationaltablemodel.cpp diff --git a/examples/sql/sqlbrowser/CMakeLists.txt b/examples/sql/sqlbrowser/CMakeLists.txt index 615411ab149..52710b20f1f 100644 --- a/examples/sql/sqlbrowser/CMakeLists.txt +++ b/examples/sql/sqlbrowser/CMakeLists.txt @@ -6,9 +6,6 @@ project(sqlbrowser LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/sqlbrowser") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(sqlbrowser browser.cpp browser.h browserwidget.ui diff --git a/examples/sql/sqlwidgetmapper/CMakeLists.txt b/examples/sql/sqlwidgetmapper/CMakeLists.txt index bc154258a7c..4e4ecbc07b6 100644 --- a/examples/sql/sqlwidgetmapper/CMakeLists.txt +++ b/examples/sql/sqlwidgetmapper/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(sqlwidgetmapper LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/sqlwidgetmapper") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(sqlwidgetmapper main.cpp window.cpp window.h diff --git a/examples/sql/tablemodel/CMakeLists.txt b/examples/sql/tablemodel/CMakeLists.txt index f69156f0579..8a2f6234999 100644 --- a/examples/sql/tablemodel/CMakeLists.txt +++ b/examples/sql/tablemodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tablemodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/sql/tablemodel") find_package(Qt6 REQUIRED COMPONENTS Core Gui Sql Widgets) +qt_standard_project_setup() + qt_add_executable(tablemodel ../connection.h tablemodel.cpp diff --git a/examples/vulkan/hellovulkancubes/CMakeLists.txt b/examples/vulkan/hellovulkancubes/CMakeLists.txt index ff187adb8f4..fe23fcc0edf 100644 --- a/examples/vulkan/hellovulkancubes/CMakeLists.txt +++ b/examples/vulkan/hellovulkancubes/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellovulkancubes LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkancubes") find_package(Qt6 REQUIRED COMPONENTS Concurrent Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(hellovulkancubes camera.cpp camera.h main.cpp diff --git a/examples/vulkan/hellovulkantexture/CMakeLists.txt b/examples/vulkan/hellovulkantexture/CMakeLists.txt index b7bd01278a4..b0ff1a16eb0 100644 --- a/examples/vulkan/hellovulkantexture/CMakeLists.txt +++ b/examples/vulkan/hellovulkantexture/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellovulkantexture LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkantexture") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(hellovulkantexture hellovulkantexture.cpp hellovulkantexture.h main.cpp diff --git a/examples/vulkan/hellovulkantriangle/CMakeLists.txt b/examples/vulkan/hellovulkantriangle/CMakeLists.txt index 43bc6652d14..c6b6826c90d 100644 --- a/examples/vulkan/hellovulkantriangle/CMakeLists.txt +++ b/examples/vulkan/hellovulkantriangle/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellovulkantriangle LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkantriangle") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(hellovulkantriangle ../shared/trianglerenderer.cpp ../shared/trianglerenderer.h main.cpp diff --git a/examples/vulkan/hellovulkanwidget/CMakeLists.txt b/examples/vulkan/hellovulkanwidget/CMakeLists.txt index da5dcba97b5..f061686bf38 100644 --- a/examples/vulkan/hellovulkanwidget/CMakeLists.txt +++ b/examples/vulkan/hellovulkanwidget/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellovulkanwidget LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkanwidget") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(hellovulkanwidget ../shared/trianglerenderer.cpp ../shared/trianglerenderer.h hellovulkanwidget.cpp hellovulkanwidget.h diff --git a/examples/vulkan/hellovulkanwindow/CMakeLists.txt b/examples/vulkan/hellovulkanwindow/CMakeLists.txt index 37cc242b537..17e84b73990 100644 --- a/examples/vulkan/hellovulkanwindow/CMakeLists.txt +++ b/examples/vulkan/hellovulkanwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(hellovulkanwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/vulkan/hellovulkanwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui) +qt_standard_project_setup() + qt_add_executable(hellovulkanwindow hellovulkanwindow.cpp hellovulkanwindow.h main.cpp diff --git a/examples/widgets/animation/easing/CMakeLists.txt b/examples/widgets/animation/easing/CMakeLists.txt index ea108ab27ab..69f734d0476 100644 --- a/examples/widgets/animation/easing/CMakeLists.txt +++ b/examples/widgets/animation/easing/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(easing LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/animation/easing") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(easing animation.h form.ui diff --git a/examples/widgets/desktop/screenshot/CMakeLists.txt b/examples/widgets/desktop/screenshot/CMakeLists.txt index 6f830ce98b4..e3417266904 100644 --- a/examples/widgets/desktop/screenshot/CMakeLists.txt +++ b/examples/widgets/desktop/screenshot/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(screenshot LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/desktop/screenshot") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(screenshot main.cpp screenshot.cpp screenshot.h diff --git a/examples/widgets/desktop/systray/CMakeLists.txt b/examples/widgets/desktop/systray/CMakeLists.txt index 69030df07e0..ae059d3f8e4 100644 --- a/examples/widgets/desktop/systray/CMakeLists.txt +++ b/examples/widgets/desktop/systray/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(systray LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/desktop/systray") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(systray main.cpp window.cpp window.h diff --git a/examples/widgets/dialogs/classwizard/CMakeLists.txt b/examples/widgets/dialogs/classwizard/CMakeLists.txt index 153394caa08..9f6a2a37cc6 100644 --- a/examples/widgets/dialogs/classwizard/CMakeLists.txt +++ b/examples/widgets/dialogs/classwizard/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(classwizard LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/classwizard") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(classwizard classwizard.cpp classwizard.h main.cpp diff --git a/examples/widgets/dialogs/extension/CMakeLists.txt b/examples/widgets/dialogs/extension/CMakeLists.txt index 8a3b53781d0..7f34c1343d1 100644 --- a/examples/widgets/dialogs/extension/CMakeLists.txt +++ b/examples/widgets/dialogs/extension/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(extension LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/extension") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(extension finddialog.cpp finddialog.h main.cpp diff --git a/examples/widgets/dialogs/findfiles/CMakeLists.txt b/examples/widgets/dialogs/findfiles/CMakeLists.txt index b4c3ef0f37b..09d01b8dd99 100644 --- a/examples/widgets/dialogs/findfiles/CMakeLists.txt +++ b/examples/widgets/dialogs/findfiles/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(findfiles LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/findfiles") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(findfiles main.cpp window.cpp window.h diff --git a/examples/widgets/dialogs/licensewizard/CMakeLists.txt b/examples/widgets/dialogs/licensewizard/CMakeLists.txt index 8a553b9dc53..d8df8538f48 100644 --- a/examples/widgets/dialogs/licensewizard/CMakeLists.txt +++ b/examples/widgets/dialogs/licensewizard/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(licensewizard LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/licensewizard") find_package(Qt6 REQUIRED COMPONENTS Core Gui PrintSupport Widgets) +qt_standard_project_setup() + qt_add_executable(licensewizard licensewizard.cpp licensewizard.h main.cpp diff --git a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt index 772b22fbc26..33fc0ec28f3 100644 --- a/examples/widgets/dialogs/standarddialogs/CMakeLists.txt +++ b/examples/widgets/dialogs/standarddialogs/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(standarddialogs LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/standarddialogs") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(standarddialogs dialog.cpp dialog.h main.cpp diff --git a/examples/widgets/dialogs/tabdialog/CMakeLists.txt b/examples/widgets/dialogs/tabdialog/CMakeLists.txt index b554c99e77e..570db34c8d5 100644 --- a/examples/widgets/dialogs/tabdialog/CMakeLists.txt +++ b/examples/widgets/dialogs/tabdialog/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tabdialog LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/tabdialog") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(tabdialog main.cpp tabdialog.cpp tabdialog.h diff --git a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt index a127e1ce0d2..9f4a3d3ba8e 100644 --- a/examples/widgets/dialogs/trivialwizard/CMakeLists.txt +++ b/examples/widgets/dialogs/trivialwizard/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(trivialwizard LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/dialogs/trivialwizard") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(trivialwizard trivialwizard.cpp ) diff --git a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt index 1d24d1b6e09..39ed7d760af 100644 --- a/examples/widgets/draganddrop/draggableicons/CMakeLists.txt +++ b/examples/widgets/draganddrop/draggableicons/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(draggableicons LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggableicon find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(draggableicons dragwidget.cpp dragwidget.h main.cpp diff --git a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt index a9781c4045d..5e1514aae5d 100644 --- a/examples/widgets/draganddrop/draggabletext/CMakeLists.txt +++ b/examples/widgets/draganddrop/draggabletext/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(draggabletext LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/draggabletext find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(draggabletext dragwidget.cpp dragwidget.h main.cpp diff --git a/examples/widgets/draganddrop/dropsite/CMakeLists.txt b/examples/widgets/draganddrop/dropsite/CMakeLists.txt index 0cc80219b82..8c8a28ad600 100644 --- a/examples/widgets/draganddrop/dropsite/CMakeLists.txt +++ b/examples/widgets/draganddrop/dropsite/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dropsite LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/dropsite") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(dropsite droparea.cpp droparea.h dropsitewindow.cpp dropsitewindow.h diff --git a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt index afff8848b1c..bee35fcf30e 100644 --- a/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt +++ b/examples/widgets/draganddrop/fridgemagnets/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fridgemagnets LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop/fridgemagnets find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(fridgemagnets draglabel.cpp draglabel.h dragwidget.cpp dragwidget.h diff --git a/examples/widgets/draganddrop/puzzle/CMakeLists.txt b/examples/widgets/draganddrop/puzzle/CMakeLists.txt index b281000776b..0fef5c220f9 100644 --- a/examples/widgets/draganddrop/puzzle/CMakeLists.txt +++ b/examples/widgets/draganddrop/puzzle/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(puzzle LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/draganddrop_puzzle") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(draganddrop_puzzle main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/effects/blurpicker/CMakeLists.txt b/examples/widgets/effects/blurpicker/CMakeLists.txt index 7a51e09c9cc..6cefd92467c 100644 --- a/examples/widgets/effects/blurpicker/CMakeLists.txt +++ b/examples/widgets/effects/blurpicker/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(blurpicker LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/effects/blurpicker") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(blurpicker blureffect.cpp blureffect.h blurpicker.cpp blurpicker.h diff --git a/examples/widgets/effects/fademessage/CMakeLists.txt b/examples/widgets/effects/fademessage/CMakeLists.txt index 5f271505e0c..facf8806e62 100644 --- a/examples/widgets/effects/fademessage/CMakeLists.txt +++ b/examples/widgets/effects/fademessage/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fademessage LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/effects/fademessage") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(fademessage fademessage.cpp fademessage.h main.cpp diff --git a/examples/widgets/gallery/CMakeLists.txt b/examples/widgets/gallery/CMakeLists.txt index 782bdb0f567..a17b1cf08f7 100644 --- a/examples/widgets/gallery/CMakeLists.txt +++ b/examples/widgets/gallery/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(gallery LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/gallery") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(gallery main.cpp widgetgallery.cpp widgetgallery.h diff --git a/examples/widgets/gestures/imagegestures/CMakeLists.txt b/examples/widgets/gestures/imagegestures/CMakeLists.txt index 71109cde100..10c6a6830c2 100644 --- a/examples/widgets/gestures/imagegestures/CMakeLists.txt +++ b/examples/widgets/gestures/imagegestures/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(imagegestures LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/gestures/imagegestures") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(imagegestures imagewidget.cpp imagewidget.h main.cpp diff --git a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt index f6996d1852d..905a6b91ddb 100644 --- a/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/anchorlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(anchorlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/anchorlayout find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(anchorlayout main.cpp ) diff --git a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt index 8e885195f38..e189db9514e 100644 --- a/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt +++ b/examples/widgets/graphicsview/basicgraphicslayouts/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(basicgraphicslayouts LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/basicgraphic find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(basicgraphicslayouts layoutitem.cpp layoutitem.h main.cpp diff --git a/examples/widgets/graphicsview/chip/CMakeLists.txt b/examples/widgets/graphicsview/chip/CMakeLists.txt index 49243f9cabd..b9ad27ae050 100644 --- a/examples/widgets/graphicsview/chip/CMakeLists.txt +++ b/examples/widgets/graphicsview/chip/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(chip LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(chip chip.cpp chip.h main.cpp diff --git a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt index c7c6854f970..aff61c7b6c6 100644 --- a/examples/widgets/graphicsview/collidingmice/CMakeLists.txt +++ b/examples/widgets/graphicsview/collidingmice/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(collidingmice LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/collidingmic find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(collidingmice main.cpp mouse.cpp mouse.h diff --git a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt index 23831cc23ac..1dbd22ad8e1 100644 --- a/examples/widgets/graphicsview/diagramscene/CMakeLists.txt +++ b/examples/widgets/graphicsview/diagramscene/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(diagramscene LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/diagramscene find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(diagramscene arrow.cpp arrow.h diagramitem.cpp diagramitem.h diff --git a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt index bf461ce19e6..91419726d72 100644 --- a/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt +++ b/examples/widgets/graphicsview/dragdroprobot/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dragdroprobot LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/dragdroprobo find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(dragdroprobot coloritem.cpp coloritem.h main.cpp diff --git a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt index 7c625d846cb..d60a6811a0c 100644 --- a/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt +++ b/examples/widgets/graphicsview/elasticnodes/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(elasticnodes LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/elasticnodes find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(elasticnodes edge.cpp edge.h graphwidget.cpp graphwidget.h diff --git a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt index 3e3b2cb83b7..f11dd791026 100644 --- a/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt +++ b/examples/widgets/graphicsview/embeddeddialogs/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(embeddeddialogs LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/embeddeddial find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(embeddeddialogs customproxy.cpp customproxy.h embeddeddialog.cpp embeddeddialog.h embeddeddialog.ui diff --git a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt index f571eb07568..7f25dddb7c7 100644 --- a/examples/widgets/graphicsview/flowlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/flowlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(flowlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview_flowlayout") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(graphicsview_flowlayout flowlayout.cpp flowlayout.h main.cpp diff --git a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt index 4f5434fd275..0cbb857bc78 100644 --- a/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/simpleanchorlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(simpleanchorlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/simpleanchor find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(simpleanchorlayout main.cpp ) diff --git a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt index 8e4737e78b6..8394a4ac20f 100644 --- a/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt +++ b/examples/widgets/graphicsview/weatheranchorlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(weatheranchorlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/graphicsview/weatherancho find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(weatheranchorlayout main.cpp ) diff --git a/examples/widgets/itemviews/addressbook/CMakeLists.txt b/examples/widgets/itemviews/addressbook/CMakeLists.txt index 0a95271745d..00e48aba1bc 100644 --- a/examples/widgets/itemviews/addressbook/CMakeLists.txt +++ b/examples/widgets/itemviews/addressbook/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(addressbook LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/addressbook") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(addressbook adddialog.cpp adddialog.h addresswidget.cpp addresswidget.h diff --git a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt index 5b7ab8107c5..ffc37174358 100644 --- a/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt +++ b/examples/widgets/itemviews/basicsortfiltermodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(basicsortfiltermodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/basicsortfilter find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(basicsortfiltermodel main.cpp window.cpp window.h diff --git a/examples/widgets/itemviews/chart/CMakeLists.txt b/examples/widgets/itemviews/chart/CMakeLists.txt index d8d1f486556..0c639c5b15b 100644 --- a/examples/widgets/itemviews/chart/CMakeLists.txt +++ b/examples/widgets/itemviews/chart/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(chart LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/chart") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(chart main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt index 13ea6cd5f8d..93ed47b9582 100644 --- a/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt +++ b/examples/widgets/itemviews/coloreditorfactory/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(coloreditorfactory LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/coloreditorfact find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(coloreditorfactory colorlisteditor.cpp colorlisteditor.h main.cpp diff --git a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt index 2fe69363f76..83aa298ec16 100644 --- a/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt +++ b/examples/widgets/itemviews/combowidgetmapper/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(combowidgetmapper LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/combowidgetmapp find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(combowidgetmapper main.cpp window.cpp window.h diff --git a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt index 463a46c7316..00643f16086 100644 --- a/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt +++ b/examples/widgets/itemviews/customsortfiltermodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(customsortfiltermodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/customsortfilte find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(customsortfiltermodel filterwidget.cpp filterwidget.h main.cpp diff --git a/examples/widgets/itemviews/dirview/CMakeLists.txt b/examples/widgets/itemviews/dirview/CMakeLists.txt index 6641618339e..6719b2e03d0 100644 --- a/examples/widgets/itemviews/dirview/CMakeLists.txt +++ b/examples/widgets/itemviews/dirview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dirview LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/dirview") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(dirview main.cpp ) diff --git a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt index da030a08012..f94ee6e681c 100644 --- a/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt +++ b/examples/widgets/itemviews/editabletreemodel/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(editabletreemodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/editabletreemod find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(editabletreemodel main.cpp mainwindow.cpp mainwindow.h mainwindow.ui diff --git a/examples/widgets/itemviews/fetchmore/CMakeLists.txt b/examples/widgets/itemviews/fetchmore/CMakeLists.txt index c22c6fab57e..d930c6b7301 100644 --- a/examples/widgets/itemviews/fetchmore/CMakeLists.txt +++ b/examples/widgets/itemviews/fetchmore/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fetchmore LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/fetchmore") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(fetchmore filelistmodel.cpp filelistmodel.h main.cpp diff --git a/examples/widgets/itemviews/flattreeview/CMakeLists.txt b/examples/widgets/itemviews/flattreeview/CMakeLists.txt index e039c2a86e8..8191889790c 100644 --- a/examples/widgets/itemviews/flattreeview/CMakeLists.txt +++ b/examples/widgets/itemviews/flattreeview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(flattreeview LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/flattreeview") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(flattreeview main.cpp ) diff --git a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt index 275b8318e2f..60dfc4cb865 100644 --- a/examples/widgets/itemviews/frozencolumn/CMakeLists.txt +++ b/examples/widgets/itemviews/frozencolumn/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(frozencolumn LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/frozencolumn") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(frozencolumn freezetablewidget.cpp freezetablewidget.h main.cpp diff --git a/examples/widgets/itemviews/interview/CMakeLists.txt b/examples/widgets/itemviews/interview/CMakeLists.txt index ad2353b756b..2a9afc3aa54 100644 --- a/examples/widgets/itemviews/interview/CMakeLists.txt +++ b/examples/widgets/itemviews/interview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(interview LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/interview") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(interview main.cpp model.cpp model.h diff --git a/examples/widgets/itemviews/pixelator/CMakeLists.txt b/examples/widgets/itemviews/pixelator/CMakeLists.txt index ac01daef08e..52dd6b74e57 100644 --- a/examples/widgets/itemviews/pixelator/CMakeLists.txt +++ b/examples/widgets/itemviews/pixelator/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(pixelator LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(pixelator imagemodel.cpp imagemodel.h main.cpp diff --git a/examples/widgets/itemviews/puzzle/CMakeLists.txt b/examples/widgets/itemviews/puzzle/CMakeLists.txt index b8bfb623077..7d341d3ce72 100644 --- a/examples/widgets/itemviews/puzzle/CMakeLists.txt +++ b/examples/widgets/itemviews/puzzle/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(puzzle LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/puzzle") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(itemviews_puzzle main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt index 37708d6960f..5c732870e8e 100644 --- a/examples/widgets/itemviews/simpledommodel/CMakeLists.txt +++ b/examples/widgets/itemviews/simpledommodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(simpledommodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpledommodel" find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Xml) +qt_standard_project_setup() + qt_add_executable(simpledommodel domitem.cpp domitem.h dommodel.cpp dommodel.h diff --git a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt index 23354358882..c4c7a141999 100644 --- a/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt +++ b/examples/widgets/itemviews/simpletreemodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(simpletreemodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simpletreemodel find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(simpletreemodel main.cpp treeitem.cpp treeitem.h diff --git a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt index 64ad79c1556..eb8d3ee4801 100644 --- a/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt +++ b/examples/widgets/itemviews/simplewidgetmapper/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(simplewidgetmapper LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/simplewidgetmap find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(simplewidgetmapper main.cpp window.cpp window.h diff --git a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt index 45ce8eebb13..f42feac10a6 100644 --- a/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt +++ b/examples/widgets/itemviews/spinboxdelegate/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(spinboxdelegate LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/spinboxdelegate find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(spinboxdelegate delegate.cpp delegate.h main.cpp diff --git a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt index 1a340a4c443..1481533dca5 100644 --- a/examples/widgets/itemviews/spreadsheet/CMakeLists.txt +++ b/examples/widgets/itemviews/spreadsheet/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(spreadsheet LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(spreadsheet main.cpp printview.cpp printview.h diff --git a/examples/widgets/itemviews/stardelegate/CMakeLists.txt b/examples/widgets/itemviews/stardelegate/CMakeLists.txt index ab5a77b1be5..717ac29733a 100644 --- a/examples/widgets/itemviews/stardelegate/CMakeLists.txt +++ b/examples/widgets/itemviews/stardelegate/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(stardelegate LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/stardelegate") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(stardelegate main.cpp stardelegate.cpp stardelegate.h diff --git a/examples/widgets/itemviews/storageview/CMakeLists.txt b/examples/widgets/itemviews/storageview/CMakeLists.txt index 81090f8ae51..6cf427e068e 100644 --- a/examples/widgets/itemviews/storageview/CMakeLists.txt +++ b/examples/widgets/itemviews/storageview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(storageview LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/itemviews/storageview") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(storageview main.cpp storagemodel.cpp storagemodel.h diff --git a/examples/widgets/layouts/basiclayouts/CMakeLists.txt b/examples/widgets/layouts/basiclayouts/CMakeLists.txt index b3c36cd4c52..ff1fd30f8c3 100644 --- a/examples/widgets/layouts/basiclayouts/CMakeLists.txt +++ b/examples/widgets/layouts/basiclayouts/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(basiclayouts LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/basiclayouts") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(basiclayouts dialog.cpp dialog.h main.cpp diff --git a/examples/widgets/layouts/borderlayout/CMakeLists.txt b/examples/widgets/layouts/borderlayout/CMakeLists.txt index 0ca57e55753..cb138a457a0 100644 --- a/examples/widgets/layouts/borderlayout/CMakeLists.txt +++ b/examples/widgets/layouts/borderlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(borderlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/borderlayout") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(borderlayout borderlayout.cpp borderlayout.h main.cpp diff --git a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt index 005b7640357..bf31fa811c5 100644 --- a/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt +++ b/examples/widgets/layouts/dynamiclayouts/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dynamiclayouts LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/dynamiclayouts") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(dynamiclayouts dialog.cpp dialog.h main.cpp diff --git a/examples/widgets/layouts/flowlayout/CMakeLists.txt b/examples/widgets/layouts/flowlayout/CMakeLists.txt index 3eab12a7ebd..85d0e0821e2 100644 --- a/examples/widgets/layouts/flowlayout/CMakeLists.txt +++ b/examples/widgets/layouts/flowlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(flowlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/layouts/flowlayout") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(flowlayout flowlayout.cpp flowlayout.h main.cpp diff --git a/examples/widgets/mainwindows/application/CMakeLists.txt b/examples/widgets/mainwindows/application/CMakeLists.txt index 551794651cb..c721aea2f0e 100644 --- a/examples/widgets/mainwindows/application/CMakeLists.txt +++ b/examples/widgets/mainwindows/application/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(application LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/application") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(application main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt index 51b9d35da94..7d9c111bf90 100644 --- a/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt +++ b/examples/widgets/mainwindows/dockwidgets/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dockwidgets LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(dockwidgets main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt index fadb55b9b72..1962c9399c0 100644 --- a/examples/widgets/mainwindows/mainwindow/CMakeLists.txt +++ b/examples/widgets/mainwindows/mainwindow/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mainwindow LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mainwindow") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mainwindow colorswatch.cpp colorswatch.h main.cpp diff --git a/examples/widgets/mainwindows/mdi/CMakeLists.txt b/examples/widgets/mainwindows/mdi/CMakeLists.txt index 3efefae48e4..08c2f49a39c 100644 --- a/examples/widgets/mainwindows/mdi/CMakeLists.txt +++ b/examples/widgets/mainwindows/mdi/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mdi LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/mdi") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mdi main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/mainwindows/menus/CMakeLists.txt b/examples/widgets/mainwindows/menus/CMakeLists.txt index 84224561a6f..1c498b95c5e 100644 --- a/examples/widgets/mainwindows/menus/CMakeLists.txt +++ b/examples/widgets/mainwindows/menus/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(menus LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/menus") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(menus main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/mainwindows/sdi/CMakeLists.txt b/examples/widgets/mainwindows/sdi/CMakeLists.txt index 196d5a2876e..01fc7b15cf6 100644 --- a/examples/widgets/mainwindows/sdi/CMakeLists.txt +++ b/examples/widgets/mainwindows/sdi/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(sdi LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/mainwindows/sdi") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(sdi main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/painting/affine/CMakeLists.txt b/examples/widgets/painting/affine/CMakeLists.txt index 7fa9b58f789..4c9b0f6ac03 100644 --- a/examples/widgets/painting/affine/CMakeLists.txt +++ b/examples/widgets/painting/affine/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(affine LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/affine") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(affine # remove files from ../shared #../shared/arthurstyle.cpp ../shared/arthurstyle.h diff --git a/examples/widgets/painting/basicdrawing/CMakeLists.txt b/examples/widgets/painting/basicdrawing/CMakeLists.txt index d960627da3f..6d8558fb4d0 100644 --- a/examples/widgets/painting/basicdrawing/CMakeLists.txt +++ b/examples/widgets/painting/basicdrawing/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(basicdrawing LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/basicdrawing") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(basicdrawing main.cpp renderarea.cpp renderarea.h diff --git a/examples/widgets/painting/composition/CMakeLists.txt b/examples/widgets/painting/composition/CMakeLists.txt index 9ce249f0869..76896b1089a 100644 --- a/examples/widgets/painting/composition/CMakeLists.txt +++ b/examples/widgets/painting/composition/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(composition LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/composition") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(composition # remove files from ../shared #../shared/arthurstyle.cpp ../shared/arthurstyle.h diff --git a/examples/widgets/painting/concentriccircles/CMakeLists.txt b/examples/widgets/painting/concentriccircles/CMakeLists.txt index eb9631e9223..f16db7ee9f3 100644 --- a/examples/widgets/painting/concentriccircles/CMakeLists.txt +++ b/examples/widgets/painting/concentriccircles/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(concentriccircles LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/concentriccircle find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(concentriccircles circlewidget.cpp circlewidget.h main.cpp diff --git a/examples/widgets/painting/deform/CMakeLists.txt b/examples/widgets/painting/deform/CMakeLists.txt index 4202cf27b0c..a4468c66997 100644 --- a/examples/widgets/painting/deform/CMakeLists.txt +++ b/examples/widgets/painting/deform/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(deform LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/deform") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(deform # remove files from ../shared #../shared/arthurstyle.cpp ../shared/arthurstyle.h diff --git a/examples/widgets/painting/fontsampler/CMakeLists.txt b/examples/widgets/painting/fontsampler/CMakeLists.txt index e60c0061b6c..23f2bb4c29b 100644 --- a/examples/widgets/painting/fontsampler/CMakeLists.txt +++ b/examples/widgets/painting/fontsampler/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fontsampler LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -18,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(fontsampler main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/painting/gradients/CMakeLists.txt b/examples/widgets/painting/gradients/CMakeLists.txt index 2b972471656..ade0fc3b255 100644 --- a/examples/widgets/painting/gradients/CMakeLists.txt +++ b/examples/widgets/painting/gradients/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(gradients LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/gradients") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(gradients # remove files from ../shared #../shared/arthurstyle.cpp ../shared/arthurstyle.h diff --git a/examples/widgets/painting/imagecomposition/CMakeLists.txt b/examples/widgets/painting/imagecomposition/CMakeLists.txt index e32ecc9ee5a..944f2303c8b 100644 --- a/examples/widgets/painting/imagecomposition/CMakeLists.txt +++ b/examples/widgets/painting/imagecomposition/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(imagecomposition LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/imagecomposition find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(imagecomposition imagecomposer.cpp imagecomposer.h main.cpp diff --git a/examples/widgets/painting/painterpaths/CMakeLists.txt b/examples/widgets/painting/painterpaths/CMakeLists.txt index 2ab2e3ac359..280953d503d 100644 --- a/examples/widgets/painting/painterpaths/CMakeLists.txt +++ b/examples/widgets/painting/painterpaths/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(painterpaths LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/painterpaths") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(painterpaths main.cpp renderarea.cpp renderarea.h diff --git a/examples/widgets/painting/pathstroke/CMakeLists.txt b/examples/widgets/painting/pathstroke/CMakeLists.txt index a7fc3177727..1b8d42535f3 100644 --- a/examples/widgets/painting/pathstroke/CMakeLists.txt +++ b/examples/widgets/painting/pathstroke/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(pathstroke LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/pathstroke") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(pathstroke # remove files from ../shared #../shared/arthurstyle.cpp ../shared/arthurstyle.h diff --git a/examples/widgets/painting/transformations/CMakeLists.txt b/examples/widgets/painting/transformations/CMakeLists.txt index 5f308f739d2..0914537dc97 100644 --- a/examples/widgets/painting/transformations/CMakeLists.txt +++ b/examples/widgets/painting/transformations/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(transformations LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/painting/transformations" find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(transformations main.cpp renderarea.cpp renderarea.h diff --git a/examples/widgets/richtext/calendar/CMakeLists.txt b/examples/widgets/richtext/calendar/CMakeLists.txt index 602b585cfbe..1aeedf11e9c 100644 --- a/examples/widgets/richtext/calendar/CMakeLists.txt +++ b/examples/widgets/richtext/calendar/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(calendar LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/calendar") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(calendar main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/richtext/orderform/CMakeLists.txt b/examples/widgets/richtext/orderform/CMakeLists.txt index 9a6500d240c..4a0d0be66b0 100644 --- a/examples/widgets/richtext/orderform/CMakeLists.txt +++ b/examples/widgets/richtext/orderform/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(orderform LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/orderform") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(orderform detailsdialog.cpp detailsdialog.h main.cpp diff --git a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt index 9f96fc83689..cdfca402de5 100644 --- a/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt +++ b/examples/widgets/richtext/syntaxhighlighter/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(syntaxhighlighter LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/richtext/syntaxhighlighte find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(syntaxhighlighter highlighter.cpp highlighter.h main.cpp diff --git a/examples/widgets/richtext/textedit/CMakeLists.txt b/examples/widgets/richtext/textedit/CMakeLists.txt index 2fa3f7c7a36..66cdeafd242 100644 --- a/examples/widgets/richtext/textedit/CMakeLists.txt +++ b/examples/widgets/richtext/textedit/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(textedit LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() diff --git a/examples/widgets/scroller/graphicsview/CMakeLists.txt b/examples/widgets/scroller/graphicsview/CMakeLists.txt index 6d8d41a8b28..8e6d23b89dd 100644 --- a/examples/widgets/scroller/graphicsview/CMakeLists.txt +++ b/examples/widgets/scroller/graphicsview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(graphicsview LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/scroller/graphicsview") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(graphicsview main.cpp ) diff --git a/examples/widgets/tools/completer/CMakeLists.txt b/examples/widgets/tools/completer/CMakeLists.txt index 5f7c03f1048..0cf49b519bb 100644 --- a/examples/widgets/tools/completer/CMakeLists.txt +++ b/examples/widgets/tools/completer/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(completer LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/completer") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(completer fsmodel.cpp fsmodel.h main.cpp diff --git a/examples/widgets/tools/customcompleter/CMakeLists.txt b/examples/widgets/tools/customcompleter/CMakeLists.txt index 37b8d18c323..58fba2b75da 100644 --- a/examples/widgets/tools/customcompleter/CMakeLists.txt +++ b/examples/widgets/tools/customcompleter/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(customcompleter LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/customcompleter") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(customcompleter main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tools/echoplugin/CMakeLists.txt b/examples/widgets/tools/echoplugin/CMakeLists.txt index f4b97aa3573..cfe76f4a73e 100644 --- a/examples/widgets/tools/echoplugin/CMakeLists.txt +++ b/examples/widgets/tools/echoplugin/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/echoplugin") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + add_subdirectory(plugin) add_subdirectory(echowindow) diff --git a/examples/widgets/tools/plugandpaint/CMakeLists.txt b/examples/widgets/tools/plugandpaint/CMakeLists.txt index e94c2164d8e..61b7ad728e8 100644 --- a/examples/widgets/tools/plugandpaint/CMakeLists.txt +++ b/examples/widgets/tools/plugandpaint/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(plugandpaint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/plugandpaint") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + add_subdirectory(plugins) add_subdirectory(app) diff --git a/examples/widgets/tools/regularexpression/CMakeLists.txt b/examples/widgets/tools/regularexpression/CMakeLists.txt index 7049949ef7a..03a095ad6ba 100644 --- a/examples/widgets/tools/regularexpression/CMakeLists.txt +++ b/examples/widgets/tools/regularexpression/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(regularexpression LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/regularexpression") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(regularexpression main.cpp regularexpressiondialog.cpp regularexpressiondialog.h diff --git a/examples/widgets/tools/settingseditor/CMakeLists.txt b/examples/widgets/tools/settingseditor/CMakeLists.txt index e44395361db..652111c8f14 100644 --- a/examples/widgets/tools/settingseditor/CMakeLists.txt +++ b/examples/widgets/tools/settingseditor/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(settingseditor LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/settingseditor") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(settingseditor locationdialog.cpp locationdialog.h main.cpp diff --git a/examples/widgets/tools/styleplugin/CMakeLists.txt b/examples/widgets/tools/styleplugin/CMakeLists.txt index 3cd2d9b78cf..7e46a7b2afb 100644 --- a/examples/widgets/tools/styleplugin/CMakeLists.txt +++ b/examples/widgets/tools/styleplugin/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(styleplugin LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,5 +12,7 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/styleplugin") find_package(Qt6 REQUIRED COMPONENTS Widgets) +qt_standard_project_setup() + add_subdirectory(stylewindow) add_subdirectory(plugin) diff --git a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt index 54ef9aac948..36ab9a5ebb2 100644 --- a/examples/widgets/tools/treemodelcompleter/CMakeLists.txt +++ b/examples/widgets/tools/treemodelcompleter/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(treemodelcompleter LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/treemodelcompleter" find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(treemodelcompleter main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tools/undo/CMakeLists.txt b/examples/widgets/tools/undo/CMakeLists.txt index 17b6ee7931a..4a925ba0068 100644 --- a/examples/widgets/tools/undo/CMakeLists.txt +++ b/examples/widgets/tools/undo/CMakeLists.txt @@ -6,9 +6,6 @@ project(undo LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undo") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(undo commands.cpp commands.h document.cpp document.h diff --git a/examples/widgets/tools/undoframework/CMakeLists.txt b/examples/widgets/tools/undoframework/CMakeLists.txt index 0dca360cb87..1d6d59e39b9 100644 --- a/examples/widgets/tools/undoframework/CMakeLists.txt +++ b/examples/widgets/tools/undoframework/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(undoframework LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tools/undoframework") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(undoframework commands.cpp commands.h diagramitem.cpp diagramitem.h diff --git a/examples/widgets/touch/dials/CMakeLists.txt b/examples/widgets/touch/dials/CMakeLists.txt index 736a69e6dad..ff81297a887 100644 --- a/examples/widgets/touch/dials/CMakeLists.txt +++ b/examples/widgets/touch/dials/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dials LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/dials") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(dials dials.ui main.cpp diff --git a/examples/widgets/touch/fingerpaint/CMakeLists.txt b/examples/widgets/touch/fingerpaint/CMakeLists.txt index 96bd4ff4f95..77467ea1aa4 100644 --- a/examples/widgets/touch/fingerpaint/CMakeLists.txt +++ b/examples/widgets/touch/fingerpaint/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(fingerpaint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(fingerpaint main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/touch/knobs/CMakeLists.txt b/examples/widgets/touch/knobs/CMakeLists.txt index a471ee971b2..ac630253b69 100644 --- a/examples/widgets/touch/knobs/CMakeLists.txt +++ b/examples/widgets/touch/knobs/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(knobs LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/knobs") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(knobs knob.cpp knob.h main.cpp diff --git a/examples/widgets/touch/pinchzoom/CMakeLists.txt b/examples/widgets/touch/pinchzoom/CMakeLists.txt index 2bbc2dcd920..b4e6e426ba4 100644 --- a/examples/widgets/touch/pinchzoom/CMakeLists.txt +++ b/examples/widgets/touch/pinchzoom/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(pinchzoom LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/touch/pinchzoom") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(pinchzoom graphicsview.cpp graphicsview.h main.cpp diff --git a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt index 3ca908fae40..8a3791e65a3 100644 --- a/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part1/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part1 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part1 addressbook.cpp addressbook.h main.cpp diff --git a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt index e5105cce9ff..934e1265e40 100644 --- a/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part2/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part2 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part2 addressbook.cpp addressbook.h main.cpp diff --git a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt index 3ade538fdcc..c8a4a9c207b 100644 --- a/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part3/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part3 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part3 addressbook.cpp addressbook.h main.cpp diff --git a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt index 03719a6b3e2..5fe21cd692d 100644 --- a/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part4/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part4 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part4 addressbook.cpp addressbook.h main.cpp diff --git a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt index be337be0e5e..4670f63f5ac 100644 --- a/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part5/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part5 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part5 addressbook.cpp addressbook.h finddialog.cpp finddialog.h diff --git a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt index 1d377c7d8e2..1b61157328d 100644 --- a/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part6/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part6 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part6 addressbook.cpp addressbook.h finddialog.cpp finddialog.h diff --git a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt index f2800933bb6..e68ae1b4451 100644 --- a/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt +++ b/examples/widgets/tutorials/addressbook/part7/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(part7 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/addressbook/par find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(part7 addressbook.cpp addressbook.h finddialog.cpp finddialog.h diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt index d256bd217d9..dcc437d3c92 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part1/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(getting_started_part1 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(getting_started_part1 main.cpp ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt index 369ee1d2cd2..dbb33ca4180 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part2/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(getting_started_part2 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(getting_started_part2 main.cpp ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt index f927040bf29..5851e5a3653 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part3/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(getting_started_part3 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(getting_started_part3 main.cpp ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt index 8dd418c16ed..5a7979e9bc4 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part4/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(getting_started_part4 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(getting_started_part4 main.cpp ) diff --git a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt index a1d2fe64a67..d2dd23410c4 100644 --- a/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt +++ b/examples/widgets/tutorials/gettingStarted/gsQt/part5/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(getting_started_part5 LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/gettingStarted/ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(getting_started_part5 main.cpp ) diff --git a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt index d8c0399a996..880ad6f45c7 100644 --- a/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/1_readonly/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_readonly LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/1_rea find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_readonly main.cpp mymodel.cpp mymodel.h diff --git a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt index 187eace0477..cec89b37233 100644 --- a/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/2_formatting/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_formatting LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/2_for find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_formatting main.cpp mymodel.cpp mymodel.h diff --git a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt index 50c7f0ee6be..e314ad20e28 100644 --- a/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/3_changingmodel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_changingmodel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/3_cha find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_changingmodel main.cpp mymodel.cpp mymodel.h diff --git a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt index 7829e80847a..01535cefb13 100644 --- a/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/4_headers/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_headers LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/4_hea find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_headers main.cpp mymodel.cpp mymodel.h diff --git a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt index 81bd5d9c033..17c6c057e7e 100644 --- a/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/5_edit/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_edit LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/5_edi find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_edit main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt index d36e69bbc9b..ac1527263cc 100644 --- a/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/6_treeview/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_tree LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/6_tre find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_tree main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt index 31223b9198f..66d69cd8da6 100644 --- a/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt +++ b/examples/widgets/tutorials/modelview/7_selections/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mv_selections LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/modelview/7_sel find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mv_selections main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/tutorials/notepad/CMakeLists.txt b/examples/widgets/tutorials/notepad/CMakeLists.txt index e3bc886ae54..a334176b9a6 100644 --- a/examples/widgets/tutorials/notepad/CMakeLists.txt +++ b/examples/widgets/tutorials/notepad/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(notepad LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -18,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(notepad main.cpp notepad.cpp notepad.h notepad.ui diff --git a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt index 4525e8abc1f..0754d0d1124 100644 --- a/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/childwidget/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(childwidget LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/childwi find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(childwidget main.cpp ) diff --git a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt index 663f846d1da..ff8c0ac9ace 100644 --- a/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/nestedlayouts/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(nestedlayouts LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/nestedl find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(nestedlayouts main.cpp ) diff --git a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt index 0ccffd5a2c3..41b9fca42c8 100644 --- a/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/toplevel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(toplevel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/topleve find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(toplevel main.cpp ) diff --git a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt index 4a4c85ccc58..065a43c7dbe 100644 --- a/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt +++ b/examples/widgets/tutorials/widgets/windowlayout/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(windowlayout LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/tutorials/widgets/windowl find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(windowlayout main.cpp ) diff --git a/examples/widgets/widgets/analogclock/CMakeLists.txt b/examples/widgets/widgets/analogclock/CMakeLists.txt index 1dd9a5b5e51..7033b8bc0e2 100644 --- a/examples/widgets/widgets/analogclock/CMakeLists.txt +++ b/examples/widgets/widgets/analogclock/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(analogclock LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/analogclock") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(analogclock analogclock.cpp analogclock.h main.cpp diff --git a/examples/widgets/widgets/calculator/CMakeLists.txt b/examples/widgets/widgets/calculator/CMakeLists.txt index 809a15ebd1e..280438d574e 100644 --- a/examples/widgets/widgets/calculator/CMakeLists.txt +++ b/examples/widgets/widgets/calculator/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(calculator LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/calculator") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(calculator button.cpp button.h calculator.cpp calculator.h diff --git a/examples/widgets/widgets/calendarwidget/CMakeLists.txt b/examples/widgets/widgets/calendarwidget/CMakeLists.txt index 433ff7ccf0b..6ed5744ebcd 100644 --- a/examples/widgets/widgets/calendarwidget/CMakeLists.txt +++ b/examples/widgets/widgets/calendarwidget/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(calendarwidget LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/calendarwidget") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(calendarwidget main.cpp window.cpp window.h diff --git a/examples/widgets/widgets/charactermap/CMakeLists.txt b/examples/widgets/widgets/charactermap/CMakeLists.txt index ae151fa6037..d14cdb983cc 100644 --- a/examples/widgets/widgets/charactermap/CMakeLists.txt +++ b/examples/widgets/widgets/charactermap/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(charactermap LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/charactermap") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(charactermap characterwidget.cpp characterwidget.h main.cpp diff --git a/examples/widgets/widgets/codeeditor/CMakeLists.txt b/examples/widgets/widgets/codeeditor/CMakeLists.txt index 5d4c17905f8..6aa8ce0f007 100644 --- a/examples/widgets/widgets/codeeditor/CMakeLists.txt +++ b/examples/widgets/widgets/codeeditor/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(codeeditor LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/codeeditor") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(codeeditor codeeditor.cpp codeeditor.h main.cpp diff --git a/examples/widgets/widgets/digitalclock/CMakeLists.txt b/examples/widgets/widgets/digitalclock/CMakeLists.txt index fec6895f137..6b2311319f4 100644 --- a/examples/widgets/widgets/digitalclock/CMakeLists.txt +++ b/examples/widgets/widgets/digitalclock/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(digitalclock LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/digitalclock") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(digitalclock digitalclock.cpp digitalclock.h main.cpp diff --git a/examples/widgets/widgets/elidedlabel/CMakeLists.txt b/examples/widgets/widgets/elidedlabel/CMakeLists.txt index 28b950b4928..135d1667281 100644 --- a/examples/widgets/widgets/elidedlabel/CMakeLists.txt +++ b/examples/widgets/widgets/elidedlabel/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(elidedlabel LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/elidedlabel") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(elidedlabel elidedlabel.cpp elidedlabel.h main.cpp diff --git a/examples/widgets/widgets/groupbox/CMakeLists.txt b/examples/widgets/widgets/groupbox/CMakeLists.txt index b08e869a33e..aa6e6cb4205 100644 --- a/examples/widgets/widgets/groupbox/CMakeLists.txt +++ b/examples/widgets/widgets/groupbox/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(groupbox LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/groupbox") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(groupbox main.cpp window.cpp window.h diff --git a/examples/widgets/widgets/icons/CMakeLists.txt b/examples/widgets/widgets/icons/CMakeLists.txt index 5a30b75a5a4..1047fc6757b 100644 --- a/examples/widgets/widgets/icons/CMakeLists.txt +++ b/examples/widgets/widgets/icons/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(icons LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/icons") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(icons iconpreviewarea.cpp iconpreviewarea.h iconsizespinbox.cpp iconsizespinbox.h diff --git a/examples/widgets/widgets/imageviewer/CMakeLists.txt b/examples/widgets/widgets/imageviewer/CMakeLists.txt index 30009e3710d..00e78fcdd59 100644 --- a/examples/widgets/widgets/imageviewer/CMakeLists.txt +++ b/examples/widgets/widgets/imageviewer/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(imageviewer LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(imageviewer imageviewer.cpp imageviewer.h main.cpp diff --git a/examples/widgets/widgets/lineedits/CMakeLists.txt b/examples/widgets/widgets/lineedits/CMakeLists.txt index 97a79f2fe65..2ade89ee729 100644 --- a/examples/widgets/widgets/lineedits/CMakeLists.txt +++ b/examples/widgets/widgets/lineedits/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(lineedits LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/lineedits") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(lineedits main.cpp window.cpp window.h diff --git a/examples/widgets/widgets/mousebuttons/CMakeLists.txt b/examples/widgets/widgets/mousebuttons/CMakeLists.txt index 07c7ec1254c..e72075a2aa1 100644 --- a/examples/widgets/widgets/mousebuttons/CMakeLists.txt +++ b/examples/widgets/widgets/mousebuttons/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(mousebuttons LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/mousebuttons") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(mousebuttons buttontester.cpp buttontester.h main.cpp diff --git a/examples/widgets/widgets/movie/CMakeLists.txt b/examples/widgets/widgets/movie/CMakeLists.txt index 3e67f9403a5..092eee3d285 100644 --- a/examples/widgets/widgets/movie/CMakeLists.txt +++ b/examples/widgets/widgets/movie/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(movie LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/movie") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(movie main.cpp movieplayer.cpp movieplayer.h diff --git a/examples/widgets/widgets/scribble/CMakeLists.txt b/examples/widgets/widgets/scribble/CMakeLists.txt index 3cf6bc9351b..506c2a3b7c5 100644 --- a/examples/widgets/widgets/scribble/CMakeLists.txt +++ b/examples/widgets/widgets/scribble/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(scribble LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +15,8 @@ find_package(Qt6 OPTIONAL_COMPONENTS PrintSupport ) +qt_standard_project_setup() + qt_add_executable(scribble main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/widgets/shapedclock/CMakeLists.txt b/examples/widgets/widgets/shapedclock/CMakeLists.txt index 2d594598a2a..9f77bb6a630 100644 --- a/examples/widgets/widgets/shapedclock/CMakeLists.txt +++ b/examples/widgets/widgets/shapedclock/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(shapedclock LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/shapedclock") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(shapedclock main.cpp shapedclock.cpp shapedclock.h diff --git a/examples/widgets/widgets/shortcuteditor/CMakeLists.txt b/examples/widgets/widgets/shortcuteditor/CMakeLists.txt index a3bc135b32e..8d063cd59af 100644 --- a/examples/widgets/widgets/shortcuteditor/CMakeLists.txt +++ b/examples/widgets/widgets/shortcuteditor/CMakeLists.txt @@ -1,8 +1,6 @@ cmake_minimum_required(VERSION 3.16) project(shortcuteditor LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -11,6 +9,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/shortcuteditor") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(shortcuteditor actionmanager.cpp actionmanager.h application.cpp application.h diff --git a/examples/widgets/widgets/sliders/CMakeLists.txt b/examples/widgets/widgets/sliders/CMakeLists.txt index fb0373aa95a..9ba160de4b2 100644 --- a/examples/widgets/widgets/sliders/CMakeLists.txt +++ b/examples/widgets/widgets/sliders/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(sliders LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/sliders") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(sliders main.cpp slidersgroup.cpp slidersgroup.h diff --git a/examples/widgets/widgets/spinboxes/CMakeLists.txt b/examples/widgets/widgets/spinboxes/CMakeLists.txt index 21209b854ec..1bdd89c692e 100644 --- a/examples/widgets/widgets/spinboxes/CMakeLists.txt +++ b/examples/widgets/widgets/spinboxes/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(spinboxes LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/spinboxes") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(spinboxes main.cpp window.cpp window.h diff --git a/examples/widgets/widgets/styles/CMakeLists.txt b/examples/widgets/widgets/styles/CMakeLists.txt index 8dbcc28e6f8..0f6c415dba4 100644 --- a/examples/widgets/widgets/styles/CMakeLists.txt +++ b/examples/widgets/widgets/styles/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(styles LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/styles") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(styles main.cpp norwegianwoodstyle.cpp norwegianwoodstyle.h diff --git a/examples/widgets/widgets/stylesheet/CMakeLists.txt b/examples/widgets/widgets/stylesheet/CMakeLists.txt index 5c817461d56..9ece28037bb 100644 --- a/examples/widgets/widgets/stylesheet/CMakeLists.txt +++ b/examples/widgets/widgets/stylesheet/CMakeLists.txt @@ -4,9 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(stylesheet LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -15,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/stylesheet") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(stylesheet main.cpp mainwindow.cpp mainwindow.h mainwindow.ui diff --git a/examples/widgets/widgets/tablet/CMakeLists.txt b/examples/widgets/widgets/tablet/CMakeLists.txt index cb02137856d..55daa61142a 100644 --- a/examples/widgets/widgets/tablet/CMakeLists.txt +++ b/examples/widgets/widgets/tablet/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(qttablet LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tablet") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(qttablet main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/widgets/widgets/tetrix/CMakeLists.txt b/examples/widgets/widgets/tetrix/CMakeLists.txt index 378b99a90e2..de1a4e82d1b 100644 --- a/examples/widgets/widgets/tetrix/CMakeLists.txt +++ b/examples/widgets/widgets/tetrix/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tetrix LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tetrix") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(tetrix main.cpp tetrixboard.cpp tetrixboard.h diff --git a/examples/widgets/widgets/tooltips/CMakeLists.txt b/examples/widgets/widgets/tooltips/CMakeLists.txt index d9129824704..b1c357dce4d 100644 --- a/examples/widgets/widgets/tooltips/CMakeLists.txt +++ b/examples/widgets/widgets/tooltips/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(tooltips LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/tooltips") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(tooltips main.cpp shapeitem.cpp shapeitem.h diff --git a/examples/widgets/widgets/validators/CMakeLists.txt b/examples/widgets/widgets/validators/CMakeLists.txt index e4c80ef7a72..7575e5e3081 100644 --- a/examples/widgets/widgets/validators/CMakeLists.txt +++ b/examples/widgets/widgets/validators/CMakeLists.txt @@ -6,9 +6,6 @@ project(validators LANGUAGES CXX) set(CMAKE_INCLUDE_CURRENT_DIR ON) -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTOUIC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -17,6 +14,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/validators") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(validators ledwidget.cpp ledwidget.h localeselector.cpp localeselector.h diff --git a/examples/widgets/widgets/wiggly/CMakeLists.txt b/examples/widgets/widgets/wiggly/CMakeLists.txt index 6f62eafd7aa..d9bcdb69362 100644 --- a/examples/widgets/widgets/wiggly/CMakeLists.txt +++ b/examples/widgets/widgets/wiggly/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(wiggly LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/wiggly") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(wiggly dialog.cpp dialog.h main.cpp diff --git a/examples/widgets/widgets/windowflags/CMakeLists.txt b/examples/widgets/widgets/windowflags/CMakeLists.txt index 6b7c6afc34e..99fa127aeca 100644 --- a/examples/widgets/widgets/windowflags/CMakeLists.txt +++ b/examples/widgets/widgets/windowflags/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(windowflags LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/widgets/windowflags") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets) +qt_standard_project_setup() + qt_add_executable(windowflags controllerwindow.cpp controllerwindow.h main.cpp diff --git a/examples/widgets/windowcontainer/CMakeLists.txt b/examples/widgets/windowcontainer/CMakeLists.txt index fc2a020c111..cd79a9a9b2e 100644 --- a/examples/widgets/windowcontainer/CMakeLists.txt +++ b/examples/widgets/windowcontainer/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(windowcontainer LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/widgets/windowcontainer") find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Widgets) +qt_standard_project_setup() + qt_add_executable(windowcontainer ../../opengl/openglwindow/openglwindow.cpp ../../opengl/openglwindow/openglwindow.h windowcontainer.cpp diff --git a/examples/xml/dombookmarks/CMakeLists.txt b/examples/xml/dombookmarks/CMakeLists.txt index 38398bbaa5c..159567a67a0 100644 --- a/examples/xml/dombookmarks/CMakeLists.txt +++ b/examples/xml/dombookmarks/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(dombookmarks LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/dombookmarks") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Xml) +qt_standard_project_setup() + qt_add_executable(dombookmarks main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/xml/htmlinfo/CMakeLists.txt b/examples/xml/htmlinfo/CMakeLists.txt index 2a9925f4d83..62b354c346f 100644 --- a/examples/xml/htmlinfo/CMakeLists.txt +++ b/examples/xml/htmlinfo/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(htmlinfo LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/htmlinfo") find_package(Qt6 REQUIRED COMPONENTS Core) +qt_standard_project_setup() + qt_add_executable(htmlinfo main.cpp ) diff --git a/examples/xml/rsslisting/CMakeLists.txt b/examples/xml/rsslisting/CMakeLists.txt index 6a6ea973e56..2e02ef2752a 100644 --- a/examples/xml/rsslisting/CMakeLists.txt +++ b/examples/xml/rsslisting/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(rsslisting LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/rsslisting") find_package(Qt6 REQUIRED COMPONENTS Core Gui Network Widgets Xml) +qt_standard_project_setup() + qt_add_executable(rsslisting main.cpp rsslisting.cpp rsslisting.h diff --git a/examples/xml/streambookmarks/CMakeLists.txt b/examples/xml/streambookmarks/CMakeLists.txt index bea45d766c5..c9033c509aa 100644 --- a/examples/xml/streambookmarks/CMakeLists.txt +++ b/examples/xml/streambookmarks/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(streambookmarks LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/streambookmarks") find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets Xml) +qt_standard_project_setup() + qt_add_executable(streambookmarks main.cpp mainwindow.cpp mainwindow.h diff --git a/examples/xml/xmlstreamlint/CMakeLists.txt b/examples/xml/xmlstreamlint/CMakeLists.txt index 2b0a2a908f6..3b83b240376 100644 --- a/examples/xml/xmlstreamlint/CMakeLists.txt +++ b/examples/xml/xmlstreamlint/CMakeLists.txt @@ -4,8 +4,6 @@ cmake_minimum_required(VERSION 3.16) project(xmlstreamlint LANGUAGES CXX) -set(CMAKE_AUTOMOC ON) - if(NOT DEFINED INSTALL_EXAMPLESDIR) set(INSTALL_EXAMPLESDIR "examples") endif() @@ -14,6 +12,8 @@ set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/xml/xmlstreamlint") find_package(Qt6 REQUIRED COMPONENTS Core Xml) +qt_standard_project_setup() + qt_add_executable(xmlstreamlint main.cpp ) |