aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2023-03-06 11:24:30 +0100
committerUlf Hermann <ulf.hermann@qt.io>2023-03-16 15:19:30 +0100
commit759a2ecc6655e4bacbf5c09cfde99be34b66ae6f (patch)
treef14e1d0b4dddd64e689ba74ba28ce4d15e4d9155
parentd8a1e5cdbddacc9a5b00f40d8e860b8c8644bfc2 (diff)
CMake: Add docs for NO_PLUGIN and clarify NO_GENERATE_PLUGIN_SOURCE
Fixes: QTBUG-111577 Change-Id: I7f259c3b710d0be16844d159e3204ee2e51f2a06 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com> (cherry picked from commit f0f274e354820affbad5331868191824c834a99d)
-rw-r--r--src/qml/doc/src/cmake/qt_add_qml_module.qdoc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
index d0f9a9deff..b81a0c80ea 100644
--- a/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
+++ b/src/qml/doc/src/cmake/qt_add_qml_module.qdoc
@@ -59,6 +59,7 @@ qt_add_qml_module(
[RESOURCES ...]
[OUTPUT_TARGETS out_targets_var]
[DESIGNER_SUPPORTED]
+ [NO_PLUGIN]
[NO_PLUGIN_OPTIONAL]
[NO_CREATE_PLUGIN_TARGET]
[NO_GENERATE_PLUGIN_SOURCE]
@@ -416,7 +417,21 @@ plugin class, the \c NO_GENERATE_PLUGIN_SOURCE option should be given. Where no
\c CLASS_NAME is provided, it defaults to the \c URI with dots replaced by
underscores, then \c Plugin appended. Unless the QML module has no plugin, the
class name will be recorded as a \c classname line in the generated
-\l{Module Definition qmldir Files}{qmldir} file.
+\l{Module Definition qmldir Files}{qmldir} file. You need to add any C++ files
+with custom plugin code to the plugin target. Since the plugin then likely
+contains functionality that goes beyond simply loading the backing library, you
+will probably want to add \l{NO_PLUGIN_OPTIONAL}, too. Otherwise the QML engine
+may skip loading the plugin if it detects that the backing library is already
+linked.
+
+\target NO_PLUGIN
+If the \c NO_PLUGIN keyword is given, then no plugin will be built. This
+keyword is thus incompatible with all the options that customize the plugin
+target, in particular \l{NO_GENERATE_PLUGIN_SOURCE}, \l{NO_PLUGIN_OPTIONAL},
+\l{PLUGIN_TARGET}, \l{NO_CREATE_PLUGIN_TARGET}, and \l{CLASS_NAME}. If you do
+not provide a plugin for your module, it will only be fully usable if its
+backing library has been linked into the executable. It is generally hard to
+guarantee that a linker preserves the linkage to a library it considers unused.
\target NO_PLUGIN_OPTIONAL
If the \c NO_PLUGIN_OPTIONAL keyword is given, then the plugin is recorded in