aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/snippets
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-12-01 16:59:08 +0100
committerKai Koehne <kai.koehne@qt.io>2020-12-02 19:00:03 +0100
commit1d53e24760d5857f58b6831f2397dfd7e47c42e5 (patch)
treeebea1166caef46db4dc04cd2de1b2096e5bce67b /src/qml/doc/snippets
parent815b347abe821664b2f8a4db53866826a639d6bc (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. Also prefer the versioned target name over the unversioned one. Task-number: QTBUG-88935 Change-Id: I29a6b07803d7aab10eb93a5348d12b9d1620d132 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Craig Scott <craig.scott@qt.io>
Diffstat (limited to 'src/qml/doc/snippets')
-rw-r--r--src/qml/doc/snippets/code/doc_src_qtqml.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/doc/snippets/code/doc_src_qtqml.cmake b/src/qml/doc/snippets/code/doc_src_qtqml.cmake
index c824b24eb9..c2e5d3d9d2 100644
--- a/src/qml/doc/snippets/code/doc_src_qtqml.cmake
+++ b/src/qml/doc/snippets/code/doc_src_qtqml.cmake
@@ -1,4 +1,4 @@
#! [0]
find_package(Qt6 COMPONENTS Qml REQUIRED)
-target_link_libraries(mytarget Qt::Qml)
+target_link_libraries(mytarget PRIVATE Qt6::Qml)
#! [0]