aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols
diff options
context:
space:
mode:
authorKai Köhne <[email protected]>2023-04-28 13:21:38 +0200
committerKai Köhne <[email protected]>2023-05-02 12:12:35 +0200
commit2e6403f8bf950cf3e4802319e41ac1ae368c0586 (patch)
tree732b271752f4b5840c4e485bb1dc9521542b4421 /examples/quickcontrols
parent8db22d191f6d153cfe950697e89f535062410b83 (diff)
Examples: Use versioned CMake targets for Qt modules
Use e.g. Qt6::Core instead of Qt::Core. This is better matching the find_package(Qt6 ...) call, and also avoids issues that the versionless targets have. Pick-to: 6.5 Task-number: QTBUG-113277 Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07 Reviewed-by: Alexey Edelev <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'examples/quickcontrols')
-rw-r--r--examples/quickcontrols/CMakeLists.txt6
-rw-r--r--examples/quickcontrols/attachedstyleproperties/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/chattutorial/CMakeLists.txt2
-rw-r--r--examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt10
-rw-r--r--examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt10
-rw-r--r--examples/quickcontrols/contactlist/CMakeLists.txt6
-rw-r--r--examples/quickcontrols/eventcalendar/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/flatstyle/CMakeLists.txt10
-rw-r--r--examples/quickcontrols/gallery/CMakeLists.txt10
-rw-r--r--examples/quickcontrols/imagine/automotive/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/imagine/musicplayer/CMakeLists.txt8
-rw-r--r--examples/quickcontrols/texteditor/CMakeLists.txt12
-rw-r--r--examples/quickcontrols/wearable/CMakeLists.txt10
17 files changed, 70 insertions, 70 deletions
diff --git a/examples/quickcontrols/CMakeLists.txt b/examples/quickcontrols/CMakeLists.txt
index 6a57993511..b25eebc651 100644
--- a/examples/quickcontrols/CMakeLists.txt
+++ b/examples/quickcontrols/CMakeLists.txt
@@ -3,10 +3,10 @@
qt_internal_add_example(attachedstyleproperties)
qt_internal_add_example(gallery)
-if (TARGET Qt::Sql)
+if (TARGET Qt6::Sql)
add_subdirectory(chattutorial)
endif()
-if (QT_FEATURE_quicktemplates2_calendar AND TARGET Qt::Sql)
+if (QT_FEATURE_quicktemplates2_calendar AND TARGET Qt6::Sql)
qt_internal_add_example(eventcalendar)
endif()
qt_internal_add_example(texteditor)
@@ -15,6 +15,6 @@ qt_internal_add_example(wearable)
qt_internal_add_example(imagine/automotive)
qt_internal_add_example(imagine/musicplayer)
qt_internal_add_example(filesystemexplorer)
-if(TARGET Qt::Widgets)
+if(TARGET Qt6::Widgets)
qt_internal_add_example(flatstyle)
endif()
diff --git a/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt b/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
index d08d238e46..5c5536aace 100644
--- a/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
+++ b/examples/quickcontrols/attachedstyleproperties/CMakeLists.txt
@@ -29,10 +29,10 @@ qt_add_qml_module(attachedstylepropertiesexample
)
target_link_libraries(attachedstylepropertiesexample PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::QuickControls2
)
add_dependencies(attachedstylepropertiesexample MyStyle)
diff --git a/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt b/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
index 9cb00a81e7..f57aacdd41 100644
--- a/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
+++ b/examples/quickcontrols/attachedstyleproperties/MyStyle/CMakeLists.txt
@@ -28,10 +28,10 @@ generate_export_header(MyStyle)
find_package(Qt6 REQUIRED COMPONENTS Core Gui Qml QuickControls2)
target_link_libraries(MyStyle PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::QuickControls2
)
install(TARGETS MyStyle
diff --git a/examples/quickcontrols/chattutorial/CMakeLists.txt b/examples/quickcontrols/chattutorial/CMakeLists.txt
index 3a73a7380b..12f6ecfd11 100644
--- a/examples/quickcontrols/chattutorial/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/CMakeLists.txt
@@ -4,7 +4,7 @@
qt_internal_add_example(chapter1)
qt_internal_add_example(chapter2)
qt_internal_add_example(chapter3)
-if (TARGET Qt::Sql)
+if (TARGET Qt6::Sql)
qt_internal_add_example(chapter4)
if(TARGET chattutorial-chapter4)
set_target_properties(chattutorial-chapter4 PROPERTIES UNITY_BUILD OFF)
diff --git a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
index 549790b9e8..80be9d275e 100644
--- a/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter1/CMakeLists.txt
@@ -19,10 +19,10 @@ qt_add_executable(chattutorial-chapter1 WIN32 MACOSX_BUNDLE
)
target_link_libraries(chattutorial-chapter1 PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
qt_policy(SET QTP0001 NEW)
diff --git a/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
index 561861afc0..bc531ef529 100644
--- a/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter2/CMakeLists.txt
@@ -19,10 +19,10 @@ qt_add_executable(chattutorial-chapter2 WIN32 MACOSX_BUNDLE
)
target_link_libraries(chattutorial-chapter2 PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
qt_policy(SET QTP0001 NEW)
diff --git a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
index 92ac5683fd..ad853842f2 100644
--- a/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter3/CMakeLists.txt
@@ -19,10 +19,10 @@ qt_add_executable(chattutorial-chapter3 WIN32 MACOSX_BUNDLE
)
target_link_libraries(chattutorial-chapter3 PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
)
qt_policy(SET QTP0001 NEW)
diff --git a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
index cc56b319e7..a962c10a53 100644
--- a/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter4/CMakeLists.txt
@@ -21,11 +21,11 @@ qt_add_executable(chattutorial-chapter4 WIN32 MACOSX_BUNDLE
)
target_link_libraries(chattutorial-chapter4 PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
- Qt::Sql
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::Sql
)
qt_policy(SET QTP0001 NEW)
diff --git a/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt b/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
index dfffa0f6de..72afb7888b 100644
--- a/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
+++ b/examples/quickcontrols/chattutorial/chapter5/CMakeLists.txt
@@ -21,11 +21,11 @@ qt_add_executable(chattutorial-chapter5 WIN32 MACOSX_BUNDLE
)
target_link_libraries(chattutorial-chapter5 PRIVATE
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Quick
- Qt::Sql
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Quick
+ Qt6::Sql
)
qt_policy(SET QTP0001 NEW)
diff --git a/examples/quickcontrols/contactlist/CMakeLists.txt b/examples/quickcontrols/contactlist/CMakeLists.txt
index d353e3374f..2024157a9c 100644
--- a/examples/quickcontrols/contactlist/CMakeLists.txt
+++ b/examples/quickcontrols/contactlist/CMakeLists.txt
@@ -33,9 +33,9 @@ qt_add_qml_module(contactlistexample
)
target_link_libraries(contactlistexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
)
install(TARGETS contactlistexample
diff --git a/examples/quickcontrols/eventcalendar/CMakeLists.txt b/examples/quickcontrols/eventcalendar/CMakeLists.txt
index 92299b1870..a88982b05f 100644
--- a/examples/quickcontrols/eventcalendar/CMakeLists.txt
+++ b/examples/quickcontrols/eventcalendar/CMakeLists.txt
@@ -27,10 +27,10 @@ set_target_properties(eventcalendar PROPERTIES
)
target_link_libraries(eventcalendar PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Qml
- Qt::Sql
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Qml
+ Qt6::Sql
)
qt_add_qml_module(eventcalendar
diff --git a/examples/quickcontrols/flatstyle/CMakeLists.txt b/examples/quickcontrols/flatstyle/CMakeLists.txt
index c505c03bca..00b35ec980 100644
--- a/examples/quickcontrols/flatstyle/CMakeLists.txt
+++ b/examples/quickcontrols/flatstyle/CMakeLists.txt
@@ -35,11 +35,11 @@ qt_add_qml_module(flatstyleexample
)
target_link_libraries(flatstyleexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
- Qt::Widgets
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
+ Qt6::Widgets
)
install(TARGETS flatstyleexample
diff --git a/examples/quickcontrols/gallery/CMakeLists.txt b/examples/quickcontrols/gallery/CMakeLists.txt
index baa7d948f1..fc5d14078c 100644
--- a/examples/quickcontrols/gallery/CMakeLists.txt
+++ b/examples/quickcontrols/gallery/CMakeLists.txt
@@ -83,17 +83,17 @@ qt_add_qml_module(galleryexample
)
target_link_libraries(galleryexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
)
if(UNIX AND NOT APPLE AND CMAKE_CROSSCOMPILING)
find_package(Qt6 REQUIRED COMPONENTS QuickTemplates2)
# Work around QTBUG-86533
- target_link_libraries(galleryexample PRIVATE Qt::QuickTemplates2)
+ target_link_libraries(galleryexample PRIVATE Qt6::QuickTemplates2)
endif()
install(TARGETS galleryexample
diff --git a/examples/quickcontrols/imagine/automotive/CMakeLists.txt b/examples/quickcontrols/imagine/automotive/CMakeLists.txt
index 94e79a10a8..c5cf8e9885 100644
--- a/examples/quickcontrols/imagine/automotive/CMakeLists.txt
+++ b/examples/quickcontrols/imagine/automotive/CMakeLists.txt
@@ -132,10 +132,10 @@ qt_add_qml_module(automotiveexample
)
target_link_libraries(automotiveexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
)
install(TARGETS automotiveexample
diff --git a/examples/quickcontrols/imagine/musicplayer/CMakeLists.txt b/examples/quickcontrols/imagine/musicplayer/CMakeLists.txt
index cc3d5b27b0..9adc56f86e 100644
--- a/examples/quickcontrols/imagine/musicplayer/CMakeLists.txt
+++ b/examples/quickcontrols/imagine/musicplayer/CMakeLists.txt
@@ -174,10 +174,10 @@ qt_add_qml_module(musicplayerexample
)
target_link_libraries(musicplayerexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
)
install(TARGETS musicplayerexample
diff --git a/examples/quickcontrols/texteditor/CMakeLists.txt b/examples/quickcontrols/texteditor/CMakeLists.txt
index 37c86142da..2736881e68 100644
--- a/examples/quickcontrols/texteditor/CMakeLists.txt
+++ b/examples/quickcontrols/texteditor/CMakeLists.txt
@@ -33,15 +33,15 @@ qt_add_qml_module(texteditorexample
)
target_link_libraries(texteditorexample PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
)
-if(TARGET Qt::Widgets)
+if(TARGET Qt6::Widgets)
target_link_libraries(texteditorexample PUBLIC
- Qt::Widgets
+ Qt6::Widgets
)
endif()
diff --git a/examples/quickcontrols/wearable/CMakeLists.txt b/examples/quickcontrols/wearable/CMakeLists.txt
index 2963040b79..8b264ef1c4 100644
--- a/examples/quickcontrols/wearable/CMakeLists.txt
+++ b/examples/quickcontrols/wearable/CMakeLists.txt
@@ -24,17 +24,17 @@ set_target_properties(wearable PROPERTIES
)
target_link_libraries(wearable PUBLIC
- Qt::Core
- Qt::Gui
- Qt::Quick
- Qt::QuickControls2
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+ Qt6::QuickControls2
)
if(UNIX AND NOT APPLE AND CMAKE_CROSSCOMPILING)
find_package(Qt6 REQUIRED COMPONENTS QuickTemplates2)
# Work around QTBUG-86533
- target_link_libraries(wearable PRIVATE Qt::QuickTemplates2)
+ target_link_libraries(wearable PRIVATE Qt6::QuickTemplates2)
endif()
# Resources: