Commit 8040d3dc authored by Kai Koehne's avatar Kai Koehne

Doc: Prefer versioned CMake library targets

The non-versioned one's do miss some properties. It's therefore best
to not advocate using them.

Change-Id: I53645e65ed4de4e0100e59905c024cdfe40be0c5
Reviewed-by: default avatarAlexandru Croitor <alexandru.croitor@qt.io>
parent bbeca236
#! [cmake_use]
find_package(Qt6 COMPONENTS Concurrent REQUIRED)
target_link_libraries(mytarget Qt::Concurrent)
target_link_libraries(mytarget Qt6::Concurrent)
#! [cmake_use]
find_package(Qt6 COMPONENTS Core REQUIRED)
target_link_libraries(mytarget Qt::Core)
target_link_libraries(mytarget Qt6::Core)
#! [cmake_use]
find_package(Qt6 COMPONENTS DBus REQUIRED)
target_link_libraries(mytarget Qt::DBus)
target_link_libraries(mytarget Qt6::DBus)
#! [cmake_use]
find_package(Qt6 COMPONENTS Gui REQUIRED)
target_link_libraries(mytarget Qt::Gui)
target_link_libraries(mytarget Qt6::Gui)
......@@ -8,5 +8,5 @@ add_executable(mytarget
# ![0]
find_package(Qt6 COMPONENTS Network REQUIRED)
target_link_libraries(mytarget Qt::Network)
target_link_libraries(mytarget Qt6::Network)
# ![0]
#! [cmake_use]
find_package(Qt6 COMPONENTS OpenGL REQUIRED)
target_link_libraries(mytarget Qt::OpenGL)
target_link_libraries(mytarget Qt6::OpenGL)
#! [cmake_use]
#! [cmake_use]
find_package(Qt6 COMPONENTS PrintSupport REQUIRED)
target_link_libraries(mytarget Qt::PrintSupport)
target_link_libraries(mytarget Qt6::PrintSupport)
#! [cmake_use]
#! [cmake_use]
find_package(Qt6 COMPONENTS Sql REQUIRED)
target_link_libraries(mytarget Qt::Sql)
target_link_libraries(mytarget Qt6::Sql)
#! [cmake_use]
#! [cmake_use]
find_package(Qt6 COMPONENTS Test REQUIRED)
target_link_libraries(mytarget Qt::Test)
target_link_libraries(mytarget Qt6::Test)
#! [cmake_use]
#! [cmake_use]
find_package(Qt6 COMPONENTS Widgets REQUIRED)
target_link_libraries(mytarget Qt::Widgets)
target_link_libraries(mytarget Qt6::Widgets)
#! [cmake_use]
#! [cmake_use]
find_package(Qt6 COMPONENTS Xml REQUIRED)
target_link_libraries(mytarget Qt::Xml)
target_link_libraries(mytarget Qt6::Xml)
#! [cmake_use]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment