summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/cmake-macros/examples.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-08-06 12:43:43 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-08-12 18:24:02 +0200
commita1609d1603bfaeaa54f691f994c458a6a27e5229 (patch)
tree14f33e198b740b70443dc9c423d83cf00aa869ce /src/corelib/doc/snippets/cmake-macros/examples.cmake
parent63d9cd17d01765f02ede5050c40a554cefa50744 (diff)
CMake: Add documentation for qt5_import_plugins()
Task-number: QTBUG-38913 Change-Id: If4a51e695864ab658fb5223fd8c2162b14a267c8 Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
Diffstat (limited to 'src/corelib/doc/snippets/cmake-macros/examples.cmake')
-rw-r--r--src/corelib/doc/snippets/cmake-macros/examples.cmake11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/cmake-macros/examples.cmake b/src/corelib/doc/snippets/cmake-macros/examples.cmake
index bba082586f..ea7da56ec7 100644
--- a/src/corelib/doc/snippets/cmake-macros/examples.cmake
+++ b/src/corelib/doc/snippets/cmake-macros/examples.cmake
@@ -24,3 +24,14 @@ add_dependencies(myapp resources)
#! [qt5_generate_moc]
qt5_generate_moc(main.cpp main.moc TARGET myapp)
#! [qt5_generate_moc]
+
+#! [qt5_import_plugins]
+add_executable(myapp main.cpp)
+target_link_libraries(myapp Qt5::Gui Qt5::Sql)
+qt5_import_plugins(myapp
+ INCLUDE Qt5::QCocoaIntegrationPlugin
+ EXCLUDE Qt5::QMinimalIntegrationPlugin
+ INCLUDE_BY_TYPE imageformats Qt5::QGifPlugin Qt5::QJpegPlugin
+ EXCLUDE_BY_TYPE sqldrivers
+)
+#! [qt5_import_plugins]