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.

Task-number: QTBUG-113277
Change-Id: Ib80f885e9f73fb9ad54b9e9b22cae2318877dc07
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 2e6403f8bf)
This commit is contained in:
Kai Köhne 2023-04-28 13:21:38 +02:00
parent 76372d0d0b
commit 222a5601a9
108 changed files with 417 additions and 417 deletions

View File

@ -4,13 +4,13 @@
qt_examples_build_begin(EXTERNAL_BUILD)
add_subdirectory(qml)
if(TARGET Qt::QuickTest)
if(TARGET Qt6::QuickTest)
add_subdirectory(qmltest)
endif()
if(TARGET Qt::Quick)
if(TARGET Qt6::Quick)
add_subdirectory(quick)
endif()
if(TARGET Qt::QuickTemplates2)
if(TARGET Qt6::QuickTemplates2)
add_subdirectory(quickcontrols)
endif()

View File

@ -2,9 +2,9 @@
# SPDX-License-Identifier: BSD-3-Clause
add_subdirectory(tutorials)
if(TARGET Qt::Quick)
if(TARGET Qt6::Quick)
qt_internal_add_example(qmlextensionplugins)
if (TARGET Qt::lupdate)
if (TARGET Qt6::lupdate)
qt_internal_add_example(qml-i18n)
endif()
qt_internal_add_example(dynamicscene)

View File

@ -20,10 +20,10 @@ qt_standard_project_setup(REQUIRES 6.5)
qt_add_executable(dynamicsceneexample WIN32 MACOSX_BUNDLE main.cpp)
target_link_libraries(dynamicsceneexample PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(dynamicsceneexample

View File

@ -18,10 +18,10 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Quick Qml LinguistTools)
qt_add_executable(qmli18n WIN32 MACOSX_BUNDLE main.cpp)
target_link_libraries(qmli18n PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(qmli18n

View File

@ -25,8 +25,8 @@ qt_add_executable(qmldomloadeditwrite
)
target_link_libraries(qmldomloadeditwrite PUBLIC
Qt::Core
Qt::Qml
Qt6::Core
Qt6::Qml
qmldomlib
)

View File

@ -50,9 +50,9 @@ set_target_properties(qmlqtimeexample PROPERTIES
)
target_link_libraries(qmlqtimeexample PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt6::Core
Qt6::Gui
Qt6::Qml
)
install(TARGETS qmlqtimeexample

View File

@ -1,6 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
if(TARGET Qt::Quick)
if(TARGET Qt6::Quick)
add_subdirectory(extending-qml)
endif()

View File

@ -27,8 +27,8 @@ set_target_properties(baseproject PROPERTIES
)
target_link_libraries(baseproject PUBLIC
Qt::Core
Qt::Qml
Qt6::Core
Qt6::Qml
)
qt_add_qml_module(baseproject

View File

@ -27,8 +27,8 @@ set_target_properties(coercion PROPERTIES
)
target_link_libraries(coercion PUBLIC
Qt::Core
Qt::Qml
Qt6::Core
Qt6::Qml
)
qt_add_qml_module(coercion

View File

@ -27,8 +27,8 @@ set_target_properties(default PROPERTIES
)
target_link_libraries(default PUBLIC
Qt::Core
Qt::Qml
Qt6::Core
Qt6::Qml
)
qt_add_qml_module(default

View File

@ -27,9 +27,9 @@ set_target_properties(grouped PROPERTIES
)
target_link_libraries(grouped PUBLIC
Qt::Core
Qt::Qml
Qt::Gui
Qt6::Core
Qt6::Qml
Qt6::Gui
)
qt_add_qml_module(grouped

View File

@ -27,9 +27,9 @@ set_target_properties(attached PROPERTIES
)
target_link_libraries(attached PUBLIC
Qt::Core
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(attached

View File

@ -28,9 +28,9 @@ set_target_properties(valuesource PROPERTIES
)
target_link_libraries(valuesource PUBLIC
Qt::Core
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(valuesource

View File

@ -29,9 +29,9 @@ qt_add_executable(foreign
)
target_link_libraries(foreign PUBLIC
Qt::Core
Qt::Qml
Qt::Gui
Qt6::Core
Qt6::Qml
Qt6::Gui
library
)

View File

@ -10,8 +10,8 @@ add_library(library ThirdPartyDisplay.cpp ThirdPartyDisplay.h)
qt_extract_metatypes(library)
target_link_libraries(library PUBLIC
Qt::Core
Qt::Qml
Qt::Quick
Qt::Gui
Qt6::Core
Qt6::Qml
Qt6::Quick
Qt6::Gui
)

View File

@ -25,10 +25,10 @@ set_target_properties(chapter1-basics PROPERTIES
)
target_link_libraries(chapter1-basics PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
#![0]
qt_add_qml_module(chapter1-basics

View File

@ -25,10 +25,10 @@ set_target_properties(chapter2-methods PROPERTIES
)
target_link_libraries(chapter2-methods PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(chapter2-methods

View File

@ -25,10 +25,10 @@ set_target_properties(chapter3-bindings PROPERTIES
)
target_link_libraries(chapter3-bindings PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(chapter3-bindings

View File

@ -26,10 +26,10 @@ set_target_properties(chapter4-customPropertyTypes PROPERTIES
)
target_link_libraries(chapter4-customPropertyTypes PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
#![1]
qt_add_qml_module(chapter4-customPropertyTypes

View File

@ -26,10 +26,10 @@ set_target_properties(chapter5-listproperties PROPERTIES
)
target_link_libraries(chapter5-listproperties PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(chapter5-listproperties

View File

@ -24,8 +24,8 @@ set_target_properties(chapter6-plugins PROPERTIES
)
target_link_libraries(chapter6-plugins PRIVATE
Qt::Qml
Qt::Quick
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(chapter6-plugins

View File

@ -14,10 +14,10 @@ target_sources(chartsplugin PRIVATE
)
target_link_libraries(chartsplugin PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
if(QT6_IS_SHARED_LIBS_BUILD AND APPLE)

View File

@ -25,18 +25,18 @@ set_target_properties(tst_qmltestexample PROPERTIES
)
target_link_libraries(tst_qmltestexample PUBLIC
Qt::Core
Qt::Gui
Qt6::Core
Qt6::Gui
Qt::QuickTest
Qt6::QuickTest
)
# This line get added, but does not make sense
#if(QT_BUILDING_QT)
# target_link_libraries(tst_qmltestexample PUBLIC
# Qt::Qml
# Qt::QuickTest
# Qt6::Qml
# Qt6::QuickTest
# )
#endif()

View File

@ -34,10 +34,10 @@ add_subdirectory(multieffect)
if(QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
add_subdirectory(rendercontrol)
endif()
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_internal_add_example(embeddedinwidgets)
endif()
if(TARGET Qt::QuickWidgets AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
if(TARGET Qt6::QuickWidgets AND TARGET Qt6::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
add_subdirectory(quickwidgets)
endif()
@ -70,7 +70,7 @@ set(reused_dir_targets
foreach(target IN LISTS reused_dir_targets)
if(TARGET ${target})
qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS moc rcc)
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_autogen_tools(${target} ENABLE_AUTOGEN_TOOLS uic)
endif()
endif()

View File

@ -23,10 +23,10 @@ qt_add_executable(animationexample
)
target_link_libraries(animationexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(animationexample animation_shared)

View File

@ -23,10 +23,10 @@ qt_add_executable(canvasexample
)
target_link_libraries(canvasexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(canvasexample

View File

@ -26,10 +26,10 @@ set_target_properties(dialcontrolexample PROPERTIES
)
target_link_libraries(dialcontrolexample PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(dialcontrolexample

View File

@ -24,10 +24,10 @@ qt_add_executable(flipableexample
)
target_link_libraries(flipableexample PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(flipableexample

View File

@ -25,10 +25,10 @@ set_target_properties(maskedmousearea PROPERTIES
)
target_link_libraries(maskedmousearea PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(maskedmousearea

View File

@ -28,10 +28,10 @@ qt_add_qml_module(painteditemexample
)
target_link_libraries(painteditemexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(painteditemexample qmltextballoon)

View File

@ -15,10 +15,10 @@ qt_add_qml_module(qmltextballoon
)
target_link_libraries(qmltextballoon PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS qmltextballoon

View File

@ -19,10 +19,10 @@ add_subdirectory("../shared" "shared")
qt_add_executable(delegatechooserexample WIN32 MACOSX_BUNDLE main.cpp)
target_link_libraries(delegatechooserexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(delegatechooserexample delegatechooser_shared)

View File

@ -34,10 +34,10 @@ qt_add_qml_module(draganddropexample
)
target_link_libraries(draganddropexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(draganddropexample draganddrop_shared)

View File

@ -19,10 +19,10 @@ qt_add_executable(embeddedinwidgetsexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(embeddedinwidgetsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Quick
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Quick
Qt6::Widgets
)
# Resources:

View File

@ -28,10 +28,10 @@ qt_add_qml_module(externaldraganddropexample
)
target_link_libraries(externaldraganddropexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS externaldraganddropexample

View File

@ -23,10 +23,10 @@ qt_add_executable(imageelementsexample
)
target_link_libraries(imageelementsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(imageelementsexample

View File

@ -35,10 +35,10 @@ set_target_properties(qmlimageproviderplugin PROPERTIES
)
target_link_libraries(qmlimageproviderplugin PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS qmlimageproviderplugin

View File

@ -35,10 +35,10 @@ set_target_properties(qmlimageresponseproviderplugin PROPERTIES
)
target_link_libraries(qmlimageresponseproviderplugin PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS qmlimageresponseproviderplugin

View File

@ -21,10 +21,10 @@ qt_add_executable(itemvariablerefreshrateexample
)
target_link_libraries(itemvariablerefreshrateexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(itemvariablerefreshrateexample

View File

@ -19,10 +19,10 @@ qt_add_executable(keyinteractionexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(keyinteractionexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -27,10 +27,10 @@ qt_add_qml_module(layoutsexample
)
target_link_libraries(layoutsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS layoutsexample

View File

@ -31,10 +31,10 @@ qt_add_qml_module(localstorageexample
)
target_link_libraries(localstorageexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS localstorageexample

View File

@ -20,10 +20,10 @@ qt_add_executable(abstractitemmodelexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(abstractitemmodelexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -20,10 +20,10 @@ qt_add_executable(objectlistmodelexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(objectlistmodelexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -19,10 +19,10 @@ qt_add_executable(stringlistmodelexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(stringlistmodelexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -19,10 +19,10 @@ qt_add_executable(mouseareaexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(mouseareaexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -21,11 +21,11 @@ qt_add_executable(itemswitcherexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(itemswitcherexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt::QuickControls2
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::QuickControls2
)
add_dependencies(itemswitcherexample itemswitcher_shared)

View File

@ -21,11 +21,11 @@ qt_add_executable(testbedexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(testbedexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt::QuickControls2
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::QuickControls2
)
add_dependencies(testbedexample testbed_shared)

View File

@ -21,10 +21,10 @@ qt_add_executable(affectorsexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(affectorsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(affectorsexample affectors_shared)

View File

@ -21,10 +21,10 @@ qt_add_executable(emittersexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(emittersexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(emittersexample emitters_shared)

View File

@ -21,10 +21,10 @@ qt_add_executable(imageparticleexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(imageparticleexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(imageparticleexample imageparticle_shared)

View File

@ -21,10 +21,10 @@ qt_add_executable(itemparticleexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(itemparticleexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(itemparticleexample itemparticle_shared)

View File

@ -21,10 +21,10 @@ qt_add_executable(systemexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(systemexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(systemexample system_shared)

View File

@ -19,11 +19,11 @@ add_subdirectory("../shared" "shared")
qt_add_executable(pointerhandlersexample WIN32 MACOSX_BUNDLE main.cpp)
target_link_libraries(pointerhandlersexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt::Svg
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
Qt6::Svg
)
add_dependencies(pointerhandlersexample pointerhandlers_shared)

View File

@ -31,10 +31,10 @@ qt_add_qml_module(positionersexample
)
target_link_libraries(positionersexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS positionersexample

View File

@ -23,10 +23,10 @@ qt_add_executable(quick-accessibility
)
target_link_libraries(quick-accessibility PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(quick-accessibility

View File

@ -24,11 +24,11 @@ qt_add_executable(qquickwidgetversuswindow_opengl
)
target_link_libraries(qquickwidgetversuswindow_opengl PRIVATE
Qt::Core
Qt::Gui
Qt::Quick
Qt::QuickWidgets
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Quick
Qt6::QuickWidgets
Qt6::Widgets
)
qt_add_qml_module(qquickwidgetversuswindow_opengl

View File

@ -21,11 +21,11 @@ qt_add_executable(quickwidget
)
target_link_libraries(quickwidget PRIVATE
Qt::Core
Qt::Gui
Qt::Quick
Qt::QuickWidgets
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Quick
Qt6::QuickWidgets
Qt6::Widgets
)
qt_add_qml_module(quickwidget

View File

@ -23,10 +23,10 @@ qt_add_executable(rendercontrol_d3d11example WIN32 MACOSX_BUNDLE
)
target_link_libraries(rendercontrol_d3d11example PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
d3d11
dxgi
dxguid

View File

@ -21,11 +21,11 @@ qt_add_executable(rendercontrol_openglexample WIN32 MACOSX_BUNDLE
)
target_link_libraries(rendercontrol_openglexample PRIVATE
Qt::Core
Qt::Gui
Qt::OpenGL
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::OpenGL
Qt6::Qml
Qt6::Quick
)
# Resources:

View File

@ -32,10 +32,10 @@ qt_add_qml_module(righttoleftexample
)
target_link_libraries(righttoleftexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS righttoleftexample

View File

@ -20,9 +20,9 @@ qt_add_executable(customgeometry_declarative WIN32 MACOSX_BUNDLE
)
target_link_libraries(customgeometry_declarative PRIVATE
Qt::Core
Qt::Gui
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Quick
)
qt_add_qml_module(customgeometry_declarative

View File

@ -20,10 +20,10 @@ qt_add_executable(custommaterial_declarative WIN32 MACOSX_BUNDLE
)
target_link_libraries(custommaterial_declarative PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(custommaterial_declarative

View File

@ -20,10 +20,10 @@ qt_add_executable(customrendernode WIN32 MACOSX_BUNDLE
)
target_link_libraries(customrendernode PRIVATE
Qt::Core
Qt::GuiPrivate
Qt::Qml
Qt::QuickPrivate
Qt6::Core
Qt6::GuiPrivate
Qt6::Qml
Qt6::QuickPrivate
)
qt_add_qml_module(customrendernode

View File

@ -25,10 +25,10 @@ set_target_properties(d3d11underqml PROPERTIES
)
target_link_libraries(d3d11underqml PUBLIC
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
d3d11
d3dcompiler
)

View File

@ -25,10 +25,10 @@ target_include_directories(fboitem PUBLIC
)
target_link_libraries(fboitem PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(fboitem

View File

@ -28,9 +28,9 @@ set_target_properties(graph PROPERTIES
)
target_link_libraries(graph PRIVATE
Qt::Core
Qt::Gui
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Quick
)
qt_add_qml_module(graph

View File

@ -29,10 +29,10 @@ set_target_properties(metaltextureimport PROPERTIES
target_link_libraries(metaltextureimport PUBLIC
"-framework Metal"
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
if(MACOS)

View File

@ -26,10 +26,10 @@ set_target_properties(metalunderqml PROPERTIES
target_link_libraries(metalunderqml PUBLIC
"-framework Metal"
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
if(MACOS)

View File

@ -26,10 +26,10 @@ set_target_properties(openglunderqml PROPERTIES
)
target_link_libraries(openglunderqml PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(openglunderqml

View File

@ -20,10 +20,10 @@ qt_add_executable(threadedanimation WIN32 MACOSX_BUNDLE
)
target_link_libraries(threadedanimation PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(threadedanimation

View File

@ -20,10 +20,10 @@ qt_add_executable(twotextureproviders WIN32 MACOSX_BUNDLE
)
target_link_libraries(twotextureproviders PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(twotextureproviders

View File

@ -25,10 +25,10 @@ set_target_properties(vulkantextureimport PROPERTIES
)
target_link_libraries(vulkantextureimport PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(vulkantextureimport

View File

@ -25,10 +25,10 @@ set_target_properties(vulkanunderqml PROPERTIES
)
target_link_libraries(vulkanunderqml PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(vulkanunderqml

View File

@ -21,10 +21,10 @@ qt_add_executable(shadereffectsexample
)
target_link_libraries(shadereffectsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(shadereffectsexample

View File

@ -23,10 +23,10 @@ qt_add_executable(shapesexample
)
target_link_libraries(shapesexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(shapesexample shapes_shared)

View File

@ -24,10 +24,10 @@ qt_add_executable(gameoflife
)
target_link_libraries(gameoflife PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(gameoflife

View File

@ -24,10 +24,10 @@ qt_add_executable(qml_pixelator
)
target_link_libraries(qml_pixelator PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(qml_pixelator

View File

@ -23,10 +23,10 @@ qt_add_executable(textexample
)
target_link_libraries(textexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(textexample text_shared)

View File

@ -23,10 +23,10 @@ qt_add_executable(threadingexample
)
target_link_libraries(threadingexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(threadingexample threading_shared)

View File

@ -23,10 +23,10 @@ qt_add_executable(touchinteractionexample
)
target_link_libraries(touchinteractionexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(touchinteractionexample touchinteraction_shared)

View File

@ -33,10 +33,10 @@ qt_add_qml_module(dynamicview1
)
target_link_libraries(dynamicview1 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS dynamicview1

View File

@ -33,10 +33,10 @@ qt_add_qml_module(dynamicview2
)
target_link_libraries(dynamicview2 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS dynamicview2

View File

@ -33,10 +33,10 @@ qt_add_qml_module(dynamicview3
)
target_link_libraries(dynamicview3 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS dynamicview3

View File

@ -34,10 +34,10 @@ qt_add_qml_module(dynamicview4
)
target_link_libraries(dynamicview4 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS dynamicview4

View File

@ -37,10 +37,10 @@ qt_add_qml_module(samegame1
)
target_link_libraries(samegame1 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS samegame1

View File

@ -38,10 +38,10 @@ qt_add_qml_module(samegame2
)
target_link_libraries(samegame2 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS samegame2

View File

@ -41,10 +41,10 @@ qt_add_qml_module(samegame3
)
target_link_libraries(samegame3 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS samegame3

View File

@ -48,10 +48,10 @@ qt_add_qml_module(samegame4
)
target_link_libraries(samegame4 PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
install(TARGETS samegame4

View File

@ -28,10 +28,10 @@ set_target_properties(viewsexample PROPERTIES
)
target_link_libraries(viewsexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
add_dependencies(viewsexample views_shared)

View File

@ -23,10 +23,10 @@ qt_add_executable(windowexample
)
target_link_libraries(windowexample PRIVATE
Qt::Core
Qt::Gui
Qt::Qml
Qt::Quick
Qt6::Core
Qt6::Gui
Qt6::Qml
Qt6::Quick
)
qt_add_qml_module(windowexample

View File

@ -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)
@ -16,6 +16,6 @@ qt_internal_add_example(swipetoremove)
qt_internal_add_example(wearable)
qt_internal_add_example(imagine/automotive)
qt_internal_add_example(imagine/musicplayer)
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_internal_add_example(flatstyle)
endif()

View File

@ -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)

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

Some files were not shown because too many files have changed in this diff Show More