summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorPierre Lamot <pierre@videolabs.io>2024-06-12 12:03:24 +0200
committerDylan Baker <dylan@pnwbakers.com>2024-09-24 10:24:47 -0700
commit6797f9bc1502609783a8fc465e2960819ab4f38f (patch)
treef60013d9f2d82742d4548e2959c843b64c060890 /docs/markdown
parentc572879bc90e098678c4a1a408ba43ea74ed8595 (diff)
downloadmeson-6797f9bc1502609783a8fc465e2960819ab4f38f.tar.gz
qt module: allow has_tools to specify which tools to check
This allows checking for tools that may not be available in older version of qt or avoiding requesting tools that may not be necessary for a given project Co-authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Qt6-module.md3
-rw-r--r--docs/markdown/snippets/qt_has_tools_ignore.md12
2 files changed, 15 insertions, 0 deletions
diff --git a/docs/markdown/Qt6-module.md b/docs/markdown/Qt6-module.md
index 673b49996..7b6f94715 100644
--- a/docs/markdown/Qt6-module.md
+++ b/docs/markdown/Qt6-module.md
@@ -156,6 +156,9 @@ This method takes the following keyword arguments:
`true` or an enabled [`feature`](Build-options.md#features) and some tools are
missing Meson will abort.
- `method` string: The method to use to detect Qt, see [[dependency]]
+- `tools`: string[]: *Since 1.6.0*. List of tools to check. Testable tools
+ are `moc`, `uic`, `rcc` and `lrelease`. By default `tools` is set to `['moc',
+ 'uic', 'rcc', 'lrelease']`
## Dependencies
diff --git a/docs/markdown/snippets/qt_has_tools_ignore.md b/docs/markdown/snippets/qt_has_tools_ignore.md
new file mode 100644
index 000000000..4def48db2
--- /dev/null
+++ b/docs/markdown/snippets/qt_has_tools_ignore.md
@@ -0,0 +1,12 @@
+## Tools can be selected when calling `has_tools()` on the Qt modules
+
+When checking for the presence of Qt tools, you can now explictly ask Meson
+which tools you need. This is particularly useful when you do not need
+`lrelease` because you are not shipping any translations. For example:
+
+```meson
+qt6_mod = import('qt6')
+qt6_mod.has_tools(required: true, tools: ['moc', 'uic', 'rcc'])
+```
+
+valid tools are `moc`, `uic`, `rcc` and `lrelease`.