summaryrefslogtreecommitdiffstats
path: root/src/corelib/doc
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-08-11 10:29:18 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-08-23 12:06:14 +0000
commit469ab6fb956e26771da0cbe2850a72983c206d74 (patch)
tree24586f1d45ccea95343351854a301bdb1fce7578 /src/corelib/doc
parent4356de3dc38edafd614e4627ada971ac36c38576 (diff)
Doc: Add global \versionlessCMakeCommandsNote qdoc macro
When documenting a CMake command, document the unversioned command 'qt_foo' and use '\versionlessCMakeCommandNote qt6_foo' to refer to the versioned command. This avoids duplicating the command signature. Use the new macro where applicable. Task-number: QTBUG-95796 Change-Id: I2e4180fbda0b89acf3d8c036459f591eb2f46475 Reviewed-by: Craig Scott <craig.scott@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit c3308b13ca1d21eb6119297341588d8df1242637) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r--src/corelib/doc/src/cmake-macros.qdoc66
1 files changed, 24 insertions, 42 deletions
diff --git a/src/corelib/doc/src/cmake-macros.qdoc b/src/corelib/doc/src/cmake-macros.qdoc
index 9b486712f7..02d33dc445 100644
--- a/src/corelib/doc/src/cmake-macros.qdoc
+++ b/src/corelib/doc/src/cmake-macros.qdoc
@@ -42,12 +42,10 @@ qt_wrap_cpp(<VAR> src_file1 [src_file2 ...]
[OPTIONS ...]
[DEPENDS ...])
-qt6_wrap_cpp(<VAR> src_file1 [src_file2 ...]
- [TARGET target]
- [OPTIONS ...]
- [DEPENDS ...])
\endcode
+\versionlessCMakeCommandsNote qt6_wrap_cpp()
+
\section1 Description
Creates rules for calling the \l{moc}{Meta-Object Compiler (moc)} on the given
@@ -90,11 +88,10 @@ Q_PLUGIN_METADATA() macro.
\badcode
qt_add_resources(<VAR> file1.qrc [file2.qrc ...]
[OPTIONS ...])
-
-qt6_add_resources(<VAR> file1.qrc [file2.qrc ...]
- [OPTIONS ...])
\endcode
+\versionlessCMakeCommandsNote qt6_add_resources()
+
Since 6.0:
\badcode
@@ -103,14 +100,10 @@ qt_add_resources(<TARGET> <RESOURCE_NAME>
[LANG <LANGUAGE>]
[BASE <PATH>]
[FILES ...] [OPTIONS ...])
-
-qt6_add_resources(<TARGET> <RESOURCE_NAME>
- [PREFIX <PATH>]
- [LANG <LANGUAGE>]
- [BASE <PATH>]
- [FILES ...] [OPTIONS ...])
\endcode
+\versionlessCMakeCommandsNote qt6_add_resources()
+
\section1 Description
To add resources, you can pass either a variable name or a target as the first
@@ -182,11 +175,10 @@ different static libraries conflict in the consuming target.
\badcode
qt_add_big_resources(<VAR> file1.qrc [file2.qrc ...]
[OPTIONS ...])
-
-qt6_add_big_resources(<VAR> file1.qrc [file2.qrc ...]
- [OPTIONS ...])
\endcode
+\versionlessCMakeCommandsNote qt6_add_big_resources()
+
\section1 Description
Creates compiled object files from Qt resource files using the
@@ -225,12 +217,10 @@ You can find possible options in the \l{rcc}{rcc documentation}.
qt_add_binary_resources(target file1.qrc [file2.qrc ...]
[DESTINATION ...]
[OPTIONS ...])
-
-qt6_add_binary_resources(target file1.qrc [file2.qrc ...]
- [DESTINATION ...]
- [OPTIONS ...])
\endcode
+\versionlessCMakeCommandsNote qt6_add_binary_resources()
+
\section1 Description
Adds a custom \c target that compiles Qt resource files into a binary \c{.rcc}
@@ -263,11 +253,10 @@ You can find possible options in the \l{rcc}{rcc documentation}.
\badcode
qt_generate_moc(src_file dest_file
[TARGET target])
-
-qt6_generate_moc(src_file dest_file
- [TARGET target])
\endcode
+\versionlessCMakeCommandsNote qt6_generate_moc()
+
\section1 Description
Creates a rule to call the \l{moc}{Meta-Object Compiler (moc)} on \c src_file
@@ -306,14 +295,10 @@ qt_import_plugins(target
[EXCLUDE plugin ...]
[INCLUDE_BY_TYPE plugin_type plugin ...]
[EXCLUDE_BY_TYPE plugin_type])
-
-qt6_import_plugins(target
- [INCLUDE plugin ...]
- [EXCLUDE plugin ...]
- [INCLUDE_BY_TYPE plugin_type plugin ...]
- [EXCLUDE_BY_TYPE plugin_type])
\endcode
+\versionlessCMakeCommandsNote qt6_import_plugins()
+
\section1 Description
Specifies a custom set of plugins to import. The optional arguments:
@@ -378,13 +363,10 @@ qt_add_executable(target
[WIN32] [MACOSX_BUNDLE]
[MANUAL_FINALIZATION]
sources...)
-
-qt6_add_executable(target
- [WIN32] [MACOSX_BUNDLE]
- [MANUAL_FINALIZATION]
- sources...)
\endcode
+\versionlessCMakeCommandsNote qt6_add_executable()
+
\section1 Description
This command performs the following tasks:
@@ -471,10 +453,10 @@ for finalizing the target by adding the \c{MANUAL_FINALIZATION} keyword.
\badcode
qt_finalize_target(target)
-
-qt6_finalize_target(target)
\endcode
+\versionlessCMakeCommandsNote qt6_finalize_target()
+
\section1 Description
After a target is created, further processing or \e{finalization} steps are
@@ -513,10 +495,10 @@ in the documentation of that command.
\badcode
qt_android_apply_arch_suffix(target)
-
-qt6_android_apply_arch_suffix(target)
\endcode
+\versionlessCMakeCommandsNote qt6_android_apply_arch_suffix()
+
\section1 Description
The CMake \c{SUFFIX} target property controls the suffix used on the file name
@@ -543,10 +525,10 @@ overwriting each other.
\badcode
qt_android_generate_deployment_settings(target)
-
-qt6_android_generate_deployment_settings(target)
\endcode
+\versionlessCMakeCommandsNote qt6_android_generate_deployment_settings()
+
\section1 Description
The \c{androiddeployqt} tool expects a deployment settings file as input. This
@@ -620,10 +602,10 @@ contain the location of the generated deployment settings file.
\badcode
qt_android_add_apk_target(target)
-
-qt6_android_add_apk_target(target)
\endcode
+\versionlessCMakeCommandsNote qt6_android_add_apk_target()
+
\section1 Description
The \c{<target>_make_apk} custom target created by this command takes an Android