Skip to content

Commit

Permalink
CMake: Do not use versionless targets in examples (Qt Core)
Browse files Browse the repository at this point in the history
This is confusing, especially because it's not used in the whole snippet.

Pick-to: 5.15
Change-Id: Ibd59646da2c77ac19a38441021c5e99f52015c95
Reviewed-by: Alexandru Croitor <[email protected]>
  • Loading branch information
kkoehne committed Oct 9, 2020
1 parent c2fde55 commit 4de9790
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/corelib/doc/snippets/cmake-macros/examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ qt5_import_plugins(myapp

#! [qt_import_plugins]
add_executable(myapp main.cpp)
target_link_libraries(myapp Qt::Gui Qt::Sql)
target_link_libraries(myapp Qt5::Gui Qt5::Sql)
qt_import_plugins(myapp
INCLUDE Qt::QCocoaIntegrationPlugin
EXCLUDE Qt::QMinimalIntegrationPlugin
INCLUDE Qt5::QCocoaIntegrationPlugin
EXCLUDE Qt5::QMinimalIntegrationPlugin
INCLUDE_BY_TYPE imageformats Qt5::QGifPlugin Qt5::QJpegPlugin
EXCLUDE_BY_TYPE sqldrivers
)
Expand Down
6 changes: 3 additions & 3 deletions src/corelib/doc/src/cmake-macros.qdoc
Original file line number Diff line number Diff line change
Expand Up @@ -406,11 +406,11 @@ This command was introduced in Qt 5.15. You can use \l qt5_import_plugins in old
In the snippet above, the following occurs with the executable \c myapp:

\list
\li The \c Qt::QCocoaIntegrationPlugin is imported into myapp.
\li The \c Qt::QMinimalIntegrationPlugin plugin is
\li The \c Qt5::QCocoaIntegrationPlugin is imported into myapp.
\li The \c Qt5::QMinimalIntegrationPlugin plugin is
excluded from being automatically imported into myapp.
\li The default list of plugins for \c imageformats is
overridden to only include Qt::QGifPlugin and Qt::QJpegPlugin.
overridden to only include Qt5::QGifPlugin and Qt5::QJpegPlugin.
\li All \c sqldrivers plugins are excluded from automatic importing.
\endlist
*/

0 comments on commit 4de9790

Please sign in to comment.