summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc/snippets/cmake-macros
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2020-04-22 16:49:34 +0200
committerKai Koehne <kai.koehne@qt.io>2020-05-06 09:19:39 +0200
commit55b470e41120a5878a7cdbb792f12e63e603ea68 (patch)
treef7aaa0798b5c8f775d371dacafb62e2ea84f69e7 /src/corelib/doc/snippets/cmake-macros
parent0daf258e32572b69972946b12c78361a41200162 (diff)
CMake: Document versionless commands
Pick-to: 5.15 Change-Id: I249c10bf3338b08477ce04f7c2d5098390a6f9a0 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'src/corelib/doc/snippets/cmake-macros')
-rw-r--r--src/corelib/doc/snippets/cmake-macros/examples.cmake38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/cmake-macros/examples.cmake b/src/corelib/doc/snippets/cmake-macros/examples.cmake
index ea7da56ec7..913b39cb4f 100644
--- a/src/corelib/doc/snippets/cmake-macros/examples.cmake
+++ b/src/corelib/doc/snippets/cmake-macros/examples.cmake
@@ -4,27 +4,54 @@ qt5_wrap_cpp(SOURCES myapp.h)
add_executable(myapp ${SOURCES})
#! [qt5_wrap_cpp]
+#! [qt_wrap_cpp]
+set(SOURCES myapp.cpp main.cpp)
+qt_wrap_cpp(SOURCES myapp.h)
+add_executable(myapp ${SOURCES})
+#! [qt_wrap_cpp]
+
#! [qt5_add_resources]
set(SOURCES main.cpp)
qt5_add_resources(SOURCES example.qrc)
add_executable(myapp ${SOURCES})
#! [qt5_add_resources]
+#! [qt_add_resources]
+set(SOURCES main.cpp)
+qt_add_resources(SOURCES example.qrc)
+add_executable(myapp ${SOURCES})
+#! [qt_add_resources]
+
#! [qt5_add_big_resources]
set(SOURCES main.cpp)
qt5_add_big_resources(SOURCES big_resource.qrc)
add_executable(myapp ${SOURCES})
#! [qt5_add_big_resources]
+#! [qt_add_big_resources]
+set(SOURCES main.cpp)
+qt_add_big_resources(SOURCES big_resource.qrc)
+add_executable(myapp ${SOURCES})
+#! [qt_add_big_resources]
+
#! [qt5_add_binary_resources]
qt5_add_binary_resources(resources project.qrc OPTIONS -no-compress)
add_dependencies(myapp resources)
#! [qt5_add_binary_resources]
+#! [qt_add_binary_resources]
+qt_add_binary_resources(resources project.qrc OPTIONS -no-compress)
+add_dependencies(myapp resources)
+#! [qt_add_binary_resources]
+
#! [qt5_generate_moc]
qt5_generate_moc(main.cpp main.moc TARGET myapp)
#! [qt5_generate_moc]
+#! [qt_generate_moc]
+qt_generate_moc(main.cpp main.moc TARGET myapp)
+#! [qt_generate_moc]
+
#! [qt5_import_plugins]
add_executable(myapp main.cpp)
target_link_libraries(myapp Qt5::Gui Qt5::Sql)
@@ -35,3 +62,14 @@ qt5_import_plugins(myapp
EXCLUDE_BY_TYPE sqldrivers
)
#! [qt5_import_plugins]
+
+#! [qt_import_plugins]
+add_executable(myapp main.cpp)
+target_link_libraries(myapp Qt::Gui Qt::Sql)
+qt_import_plugins(myapp
+ INCLUDE Qt::QCocoaIntegrationPlugin
+ EXCLUDE Qt::QMinimalIntegrationPlugin
+ INCLUDE_BY_TYPE imageformats Qt5::QGifPlugin Qt5::QJpegPlugin
+ EXCLUDE_BY_TYPE sqldrivers
+)
+#! [qt_import_plugins]