aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/markdown/Windows-module.md2
-rw-r--r--docs/markdown/snippets/windows-resources-dependencies.md2
-rw-r--r--mesonbuild/modules/windows.py10
3 files changed, 9 insertions, 5 deletions
diff --git a/docs/markdown/Windows-module.md b/docs/markdown/Windows-module.md
index 8098c11..39f1ba6 100644
--- a/docs/markdown/Windows-module.md
+++ b/docs/markdown/Windows-module.md
@@ -16,6 +16,8 @@ has the following keyword argument.
- `depend_files` lists resource files that the resource script depends on
(e.g. bitmap, cursor, font, html, icon, message table, binary data or manifest
files referenced by the resource script) (*since 0.47.0*)
+- `depends` lists target(s) that this target depends on, even though it does not
+ take them as an argument (e.g. as above, but generated) (*since 0.47.0*)
- `include_directories` lists directories to be both searched by the resource
compiler for referenced resource files, and added to the preprocessor include
search path.
diff --git a/docs/markdown/snippets/windows-resources-dependencies.md b/docs/markdown/snippets/windows-resources-dependencies.md
index e30e18c..e061778 100644
--- a/docs/markdown/snippets/windows-resources-dependencies.md
+++ b/docs/markdown/snippets/windows-resources-dependencies.md
@@ -1,7 +1,7 @@
## Windows resource files dependencies
The `compile_resources()` function of the `windows` module now takes
-the `depend_files:` keyword.
+the `depend_files:` and `depends:` keywords.
When using binutils's `windres`, dependencies on files `#include`'d by the
preprocessor are now automatically tracked.
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py
index 7dd87f2..8a1fade 100644
--- a/mesonbuild/modules/windows.py
+++ b/mesonbuild/modules/windows.py
@@ -30,13 +30,14 @@ class WindowsModule(ExtensionModule):
return compilers[l]
raise MesonException('Resource compilation requires a C or C++ compiler.')
- @FeatureNewKwargs('windows.compile_resources', '0.47.0', ['depend_files'])
- @permittedKwargs({'args', 'include_directories', 'depend_files'})
+ @FeatureNewKwargs('windows.compile_resources', '0.47.0', ['depend_files', 'depends'])
+ @permittedKwargs({'args', 'include_directories', 'depend_files', 'depends'})
def compile_resources(self, state, args, kwargs):
comp = self.detect_compiler(state.compilers)
extra_args = mesonlib.stringlistify(kwargs.get('args', []))
- wrc_deps = extract_as_list(kwargs, 'depend_files', pop = True)
+ wrc_depend_files = extract_as_list(kwargs, 'depend_files', pop = True)
+ wrc_depends = extract_as_list(kwargs, 'depends', pop = True)
inc_dirs = extract_as_list(kwargs, 'include_directories', pop = True)
for incd in inc_dirs:
if not isinstance(incd.held_object, (str, build.IncludeDirs)):
@@ -85,7 +86,8 @@ class WindowsModule(ExtensionModule):
'output': '@BASENAME@.' + suffix,
'input': [src],
'command': [rescomp] + res_args,
- 'depend_files': wrc_deps,
+ 'depend_files': wrc_depend_files,
+ 'depends': wrc_depends,
}
if isinstance(src, str):