From 632115ecff3bd7f9cb519098e04e0467b0cfd3a1 Mon Sep 17 00:00:00 2001 From: Charles Brunet Date: Fri, 29 Aug 2025 08:28:22 -0400 Subject: Detect dependency changes in Windows rc compiler The `rc.exe` resource compiler neither provides *depfile* support nor allows showing includes, as is possible with C or C++ compilers. Therefore, changes to files included by the `.rc` file did not trigger recompilation of the resource file. A workaround was added to *meson* by calling the preprocessor on the `.rc` file to detect the included headers and adding the result as a dependency to the resource compilation. --- docs/markdown/Windows-module.md | 7 +++++-- docs/markdown/snippets/windows_rc_depfile.md | 10 ++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 docs/markdown/snippets/windows_rc_depfile.md (limited to 'docs') diff --git a/docs/markdown/Windows-module.md b/docs/markdown/Windows-module.md index 025f046cc..5ae828109 100644 --- a/docs/markdown/Windows-module.md +++ b/docs/markdown/Windows-module.md @@ -20,8 +20,11 @@ Compiles Windows `rc` files specified in the positional arguments. 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* CustomTargetIndexes and CustomTargets with more than out output -*may be used as positional arguments. +*Since 0.61.0* `CustomTargetIndexes` and `CustomTargets` with more than one output +may be used as positional arguments. + +*Since 1.10.0* Changes to included header files are now detected when using +`rc.exe` resource compiler. This method has the following keyword arguments: diff --git a/docs/markdown/snippets/windows_rc_depfile.md b/docs/markdown/snippets/windows_rc_depfile.md new file mode 100644 index 000000000..8a2c9ac6f --- /dev/null +++ b/docs/markdown/snippets/windows_rc_depfile.md @@ -0,0 +1,10 @@ +## windows.compile_resources now detects header changes with rc.exe + +The `rc.exe` resource compiler neither provides *depfile* support nor +allows showing includes, as is possible with C or C++ compilers. +Therefore, changes to files included by the `.rc` file did not trigger +recompilation of the resource file. + +A workaround was added to *meson* by calling the preprocessor on the +`.rc` file to detect the included headers and adding the result as a +dependency to the resource compilation. -- cgit v1.2.3