aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Kosmale <[email protected]>2024-07-02 11:51:21 +0200
committerFabian Kosmale <[email protected]>2024-07-03 08:44:01 +0200
commit15a49ef0c1746f331635ebf51bb235e2b5c7df25 (patch)
tree8da2fa6eefd25c00fd82680e8cca2b11dc6f5158
parent5b0f6b513102c483356df03602817add115c10c1 (diff)
Examples: use qt_standard_project_setup in more places
And remove the redundant AUTOMOC lines. This also avoids a few policy related warnings. Task-number: QTBUG-126201 Pick-to: 6.8 Change-Id: Idaa58d7fbc0236aa2091ead43d5a0e6f396647e1 Reviewed-by: Ulf Hermann <[email protected]> Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Olivier De Cannière <[email protected]>
-rw-r--r--examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/flatstyle/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/gallery/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/imagine/automotive/CMakeLists.txt4
-rw-r--r--examples/quickcontrols/texteditor/CMakeLists.txt4
9 files changed, 18 insertions, 18 deletions
diff --git a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
index c17c054418..fd96e383c0 100644
--- a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(chapter1 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(chattutorial-chapter1 WIN32 MACOSX_BUNDLE
main.cpp
)
diff --git a/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
index b6e37b4449..7610f9abf1 100644
--- a/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(chapter2 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(chattutorial-chapter2 WIN32 MACOSX_BUNDLE
main.cpp
)
diff --git a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
index a101f3ebb3..68ad3a7c8d 100644
--- a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(chapter3 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(chattutorial-chapter3 WIN32 MACOSX_BUNDLE
main.cpp
)
diff --git a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
index 2d5b930e45..5052cdc0a2 100644
--- a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(chapter4 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Sql)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(chattutorial-chapter4 WIN32 MACOSX_BUNDLE
main.cpp
sqlcontactmodel.cpp sqlcontactmodel.h
diff --git a/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
index fa20c96d2d..1bc4ba6134 100644
--- a/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(chapter5 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml Quick Sql)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(chattutorial-chapter5 WIN32 MACOSX_BUNDLE
main.cpp
sqlcontactmodel.cpp sqlcontactmodel.h
diff --git a/examples/quickcontrols/flatstyle/CMakeLists.txt b/examples/quickcontrols/flatstyle/CMakeLists.txt
index 8c78720a58..93fb0c3e15 100644
--- a/examples/quickcontrols/flatstyle/CMakeLists.txt
+++ b/examples/quickcontrols/flatstyle/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(flatstyle LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2 Widgets)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(flatstyleexample WIN32 MACOSX_BUNDLE
main.cpp
)
diff --git a/examples/quickcontrols/gallery/CMakeLists.txt b/examples/quickcontrols/gallery/CMakeLists.txt
index 40f393d6d2..ddfee5e9fe 100644
--- a/examples/quickcontrols/gallery/CMakeLists.txt
+++ b/examples/quickcontrols/gallery/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(gallery_controls2 LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(galleryexample WIN32 MACOSX_BUNDLE
gallery.cpp
)
diff --git a/examples/quickcontrols/imagine/automotive/CMakeLists.txt b/examples/quickcontrols/imagine/automotive/CMakeLists.txt
index 161d4b92b6..a7642e62e7 100644
--- a/examples/quickcontrols/imagine/automotive/CMakeLists.txt
+++ b/examples/quickcontrols/imagine/automotive/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(automotive LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(automotiveexample WIN32 MACOSX_BUNDLE
automotive.cpp
)
diff --git a/examples/quickcontrols/texteditor/CMakeLists.txt b/examples/quickcontrols/texteditor/CMakeLists.txt
index 6fa24b41c6..dc8423ba9c 100644
--- a/examples/quickcontrols/texteditor/CMakeLists.txt
+++ b/examples/quickcontrols/texteditor/CMakeLists.txt
@@ -4,10 +4,10 @@
cmake_minimum_required(VERSION 3.16)
project(texteditor LANGUAGES CXX)
-set(CMAKE_AUTOMOC ON)
-
find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick QuickControls2)
+qt_standard_project_setup(REQUIRES 6.8)
+
qt_add_executable(texteditorexample WIN32 MACOSX_BUNDLE
texteditor.cpp
)