path: root/src/dbus
diff options
authorKai Koehne <>2020-11-25 17:21:09 +0100
committerKai Koehne <>2020-11-30 05:39:21 +0100
commit130b2090147e0d28e35fd736fbefcd588c0014f6 (patch)
treeb5b26a11b44809aa31d02c01d3d6bcc516348c06 /src/dbus
parentbac73a36e25076a5929c7feac0675860772e7270 (diff)
Doc: Use explicit linkage with target_link_libraries
The Professional CMake book suggests always using explicit linkage with target_link_libraries, so let's use that. Whether to use PUBLIC or PRIVATE depends on the context. But let's be conservative and advise on using PRIVATE by default. Task-number: QTBUG-88935 Pick-to: 6.0 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <> Reviewed-by: Alexandru Croitor <>
Diffstat (limited to 'src/dbus')
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dbus/doc/snippets/CMakeLists.txt b/src/dbus/doc/snippets/CMakeLists.txt
index 87c7990972..825a088019 100644
--- a/src/dbus/doc/snippets/CMakeLists.txt
+++ b/src/dbus/doc/snippets/CMakeLists.txt
@@ -1,4 +1,4 @@
#! [cmake_use]
find_package(Qt6 COMPONENTS DBus REQUIRED)
-target_link_libraries(mytarget Qt6::DBus)
+target_link_libraries(mytarget PRIVATE Qt6::DBus)
#! [cmake_use]