Skip to content

Commit

Permalink
Examples: Use Qt6:: to qualify Qt CMake packages
Browse files Browse the repository at this point in the history
This is what we promote also in the documentation.

Change-Id: If91aebafe861b0c934acbb2c69afd182abc3345d
Reviewed-by: Jörg Bornemann <[email protected]>
  • Loading branch information
kkoehne committed Nov 17, 2022
1 parent 9e251d4 commit bec264c
Show file tree
Hide file tree
Showing 262 changed files with 849 additions and 849 deletions.
20 changes: 10 additions & 10 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@ qt_examples_build_begin(EXTERNAL_BUILD)
add_subdirectory(corelib)
add_subdirectory(embedded)
add_subdirectory(qpa)
if(TARGET Qt::DBus)
if(TARGET Qt6::DBus)
add_subdirectory(dbus)
endif()
if(TARGET Qt::Network)
if(TARGET Qt6::Network)
add_subdirectory(network)
endif()
if(TARGET Qt::Test)
if(TARGET Qt6::Test)
add_subdirectory(qtestlib)
endif()
if(TARGET Qt::Concurrent)
if(TARGET Qt6::Concurrent)
add_subdirectory(qtconcurrent)
endif()
if(TARGET Qt::Sql)
if(TARGET Qt6::Sql)
add_subdirectory(sql)
endif()
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
add_subdirectory(widgets)
endif()
if(TARGET Qt::Xml)
if(TARGET Qt6::Xml)
add_subdirectory(xml)
endif()
if(TARGET Qt::Gui)
if(TARGET Qt6::Gui)
add_subdirectory(gui)
endif()
if(QT_FEATURE_opengl AND TARGET Qt::Gui)
if(QT_FEATURE_opengl AND TARGET Qt6::Gui)
add_subdirectory(opengl)
endif()
if(QT_FEATURE_vulkan AND TARGET Qt::Gui)
if(QT_FEATURE_vulkan AND TARGET Qt6::Gui)
add_subdirectory(vulkan)
endif()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ qt_add_executable(bindablesubscription
)

target_link_libraries(bindablesubscription PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

# Resources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ qt_add_executable(subscription
)

target_link_libraries(subscription PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

# Resources:
Expand Down
4 changes: 2 additions & 2 deletions examples/corelib/ipc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(NOT TARGET Qt::Widgets)
if(NOT TARGET Qt6::Widgets)
return()
endif()
if(QT_FEATURE_sharedmemory)
qt_internal_add_example(sharedmemory)
endif()
if(QT_FEATURE_localserver AND TARGET Qt::Network)
if(QT_FEATURE_localserver AND TARGET Qt6::Network)
qt_internal_add_example(localfortuneserver)
qt_internal_add_example(localfortuneclient)
endif()
8 changes: 4 additions & 4 deletions examples/corelib/ipc/localfortuneclient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ set_target_properties(localfortuneclient PROPERTIES
)

target_link_libraries(localfortuneclient PUBLIC
Qt::Core
Qt::Gui
Qt::Network
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Network
Qt6::Widgets
)

install(TARGETS localfortuneclient
Expand Down
8 changes: 4 additions & 4 deletions examples/corelib/ipc/localfortuneserver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ set_target_properties(localfortuneserver PROPERTIES
)

target_link_libraries(localfortuneserver PUBLIC
Qt::Core
Qt::Gui
Qt::Network
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Network
Qt6::Widgets
)

install(TARGETS localfortuneserver
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/ipc/sharedmemory/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ set_target_properties(sharedmemory PROPERTIES
)

target_link_libraries(sharedmemory PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS sharedmemory
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/mimetypes/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_internal_add_example(mimetypebrowser)
endif()
6 changes: 3 additions & 3 deletions examples/corelib/mimetypes/mimetypebrowser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ set_target_properties(mimetypebrowser PROPERTIES
)

target_link_libraries(mimetypebrowser PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS mimetypebrowser
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/permissions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ set_target_properties(permissions PROPERTIES
qt_finalize_executable(permissions)

target_link_libraries(permissions PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS permissions
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/cbordump/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ qt_add_executable(cbordump
)

target_link_libraries(cbordump PUBLIC
Qt::Core
Qt6::Core
)

install(TARGETS cbordump
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/convert/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ qt_add_executable(convert
)

target_link_libraries(convert PUBLIC
Qt::Core
Qt6::Core
)

install(TARGETS convert
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/serialization/savegame/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ qt_add_executable(savegame
)

target_link_libraries(savegame PUBLIC
Qt::Core
Qt6::Core
)

install(TARGETS savegame
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

qt_internal_add_example(semaphores)
qt_internal_add_example(waitconditions)
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_internal_add_example(mandelbrot)
qt_internal_add_example(queuedcustomtype)
endif()
6 changes: 3 additions & 3 deletions examples/corelib/threads/mandelbrot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ set_target_properties(mandelbrot PROPERTIES
)

target_link_libraries(mandelbrot PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS mandelbrot
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/threads/queuedcustomtype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ set_target_properties(queuedcustomtype PROPERTIES
)

target_link_libraries(queuedcustomtype PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS queuedcustomtype
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/semaphores/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ qt_add_executable(semaphores
)

target_link_libraries(semaphores PUBLIC
Qt::Core
Qt6::Core
)

install(TARGETS semaphores
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/threads/waitconditions/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ qt_add_executable(waitconditions
)

target_link_libraries(waitconditions PUBLIC
Qt::Core
Qt6::Core
)

install(TARGETS waitconditions
Expand Down
2 changes: 1 addition & 1 deletion examples/corelib/tools/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(NOT TARGET Qt::Widgets)
if(NOT TARGET Qt6::Widgets)
return()
endif()
qt_internal_add_example(contiguouscache)
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/tools/contiguouscache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ set_target_properties(contiguouscache PROPERTIES
)

target_link_libraries(contiguouscache PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS contiguouscache
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/tools/customtype/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ set_target_properties(customtype PROPERTIES
)

target_link_libraries(customtype PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS customtype
Expand Down
6 changes: 3 additions & 3 deletions examples/corelib/tools/customtypesending/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ set_target_properties(customtypesending PROPERTIES
)

target_link_libraries(customtypesending PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS customtypesending
Expand Down
4 changes: 2 additions & 2 deletions examples/dbus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(NOT TARGET Qt::DBus)
if(NOT TARGET Qt6::DBus)
return()
endif()
qt_internal_add_example(listnames)
qt_internal_add_example(pingpong)
if(QT_FEATURE_process)
qt_internal_add_example(complexpingpong)
endif()
if(TARGET Qt::Widgets)
if(TARGET Qt6::Widgets)
qt_internal_add_example(chat)
add_subdirectory(remotecontrolledcar)
endif()
8 changes: 4 additions & 4 deletions examples/dbus/chat/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ set_target_properties(chat PROPERTIES
)

target_link_libraries(chat PUBLIC
Qt::Core
Qt::DBus
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::DBus
Qt6::Gui
Qt6::Widgets
)

install(TARGETS chat
Expand Down
4 changes: 2 additions & 2 deletions examples/dbus/listnames/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ qt_add_executable(listnames
)

target_link_libraries(listnames PUBLIC
Qt::Core
Qt::DBus
Qt6::Core
Qt6::DBus
)

install(TARGETS listnames
Expand Down
8 changes: 4 additions & 4 deletions examples/dbus/remotecontrolledcar/car/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ set_target_properties(car PROPERTIES
)

target_link_libraries(car PUBLIC
Qt::Core
Qt::DBus
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::DBus
Qt6::Gui
Qt6::Widgets
)

install(TARGETS car
Expand Down
8 changes: 4 additions & 4 deletions examples/dbus/remotecontrolledcar/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ set_target_properties(controller PROPERTIES
)

target_link_libraries(controller PUBLIC
Qt::Core
Qt::DBus
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::DBus
Qt6::Gui
Qt6::Widgets
)

install(TARGETS controller
Expand Down
2 changes: 1 addition & 1 deletion examples/embedded/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

if(NOT TARGET Qt::Gui OR (NOT embedded AND NOT x11))
if(NOT TARGET Qt6::Gui OR (NOT embedded AND NOT x11))
return()
endif()
qt_internal_add_example(styleexample)
Expand Down
6 changes: 3 additions & 3 deletions examples/embedded/digiflip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ set_target_properties(digiflip PROPERTIES
)

target_link_libraries(digiflip PUBLIC
Qt::Core
Qt::Gui
Qt::Widgets
Qt6::Core
Qt6::Gui
Qt6::Widgets
)

install(TARGETS digiflip
Expand Down
Loading

0 comments on commit bec264c

Please sign in to comment.