summaryrefslogtreecommitdiffstats
path: root/src/network
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-11-25 17:21:09 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2020-12-01 15:57:30 +0000
commit9f8d8ea91bf4b5748e13c6b344e4e8ca78257de2 (patch)
tree1ff629aa9327507a85f04bc59d4e88c11b2c4a33 /src/network
parentc967ed95a720e210dff398624b97810703815874 (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 Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit 130b2090147e0d28e35fd736fbefcd588c0014f6) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/network')
-rw-r--r--src/network/doc/snippets/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/doc/snippets/CMakeLists.txt b/src/network/doc/snippets/CMakeLists.txt
index 2936484f19..2ae4c75a1b 100644
--- a/src/network/doc/snippets/CMakeLists.txt
+++ b/src/network/doc/snippets/CMakeLists.txt
@@ -8,5 +8,5 @@ add_executable(mytarget
# ![0]
find_package(Qt6 COMPONENTS Network REQUIRED)
-target_link_libraries(mytarget Qt6::Network)
+target_link_libraries(mytarget PRIVATE Qt6::Network)
# ![0]