aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2021-10-08 14:48:07 -0700
committerDylan Baker <dylan@pnwbakers.com>2021-10-09 21:34:54 -0700
commit6849baa47633d2986c049cd68916bc9ce95ba2d0 (patch)
tree7084800f0fb1f42c58f01a8aae13d11304f1c30b /docs
parent0d52a6161a7572b6132643d16f8a16ab7ba6cf66 (diff)
downloadmeson-6849baa47633d2986c049cd68916bc9ce95ba2d0.zip
meson-6849baa47633d2986c049cd68916bc9ce95ba2d0.tar.gz
meson-6849baa47633d2986c049cd68916bc9ce95ba2d0.tar.bz2
modules/windows: allow CustomTargets with more than one output for compile_resources
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Windows-module.md18
-rw-r--r--docs/markdown/snippets/windows_custom_targets.md22
2 files changed, 37 insertions, 3 deletions
diff --git a/docs/markdown/Windows-module.md b/docs/markdown/Windows-module.md
index a7131a7..06b3eb2 100644
--- a/docs/markdown/Windows-module.md
+++ b/docs/markdown/Windows-module.md
@@ -7,10 +7,22 @@ Windows.
### compile_resources
+```
+ windows.compile_resources(...(string | File | CustomTarget | CustomTargetIndex),
+ args: []string,
+ depend_files: [](string | File),
+ depends: [](BuildTarget | CustomTarget)
+ include_directories: [](IncludeDirectories | string)): []CustomTarget
+```
+
Compiles Windows `rc` files specified in the positional arguments.
-Returns an opaque object that you put in the list of sources for the
-target you want to have the resources in. This method has the
-following keyword argument.
+Returns a list of `CustomTarget` objects that you put in the list of sources for
+the target you want to have the resources in.
+
+*Since 0.61.0* CustomTargetIndexs and CustomTargets with more than out output
+*may be used as positional arguments.
+
+This method has the following keyword arguments:
- `args` lists extra arguments to pass to the resource compiler
- `depend_files` lists resource files that the resource script depends on
diff --git a/docs/markdown/snippets/windows_custom_targets.md b/docs/markdown/snippets/windows_custom_targets.md
new file mode 100644
index 0000000..cbc2f9d
--- /dev/null
+++ b/docs/markdown/snippets/windows_custom_targets.md
@@ -0,0 +1,22 @@
+## Windows.compile_resources CustomTarget
+
+Previously the Windows module only accepted CustomTargets with one output, it
+now accepts them with more than one output, and creates a windows resource
+target for each output. Additionally it now accepts indexes of CustomTargets
+
+```meson
+
+ct = custom_target(
+ 'multiple',
+ output : ['resource', 'another resource'],
+ ...
+)
+
+ct2 = custom_target(
+ 'slice',
+ output : ['resource', 'not a resource'],
+ ...
+)
+
+resources = windows.compile_resources(ct, ct2[0])
+```