diff options
author | Andrei Alexeyev <0x416b617269@gmail.com> | 2017-12-21 22:36:30 +0200 |
---|---|---|
committer | Andrei Alexeyev <0x416b617269@gmail.com> | 2018-01-12 23:36:48 +0200 |
commit | ef7cb9f280175d026b16e8e02ecda9ec87d7fd6d (patch) | |
tree | 6688b12076610f9276fc198ee49d39df581dbb52 /mesonbuild/modules/windows.py | |
parent | 81100f0695c595f4c0020034284846cea7e8e6aa (diff) | |
download | meson-ef7cb9f280175d026b16e8e02ecda9ec87d7fd6d.zip meson-ef7cb9f280175d026b16e8e02ecda9ec87d7fd6d.tar.gz meson-ef7cb9f280175d026b16e8e02ecda9ec87d7fd6d.tar.bz2 |
[windows] make compile_resources use custom targets instead of generators
Diffstat (limited to 'mesonbuild/modules/windows.py')
-rw-r--r-- | mesonbuild/modules/windows.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index c16d7a8..22bf49b 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -67,11 +67,16 @@ class WindowsModule(ExtensionModule): suffix = 'o' if not rescomp.found(): raise MesonException('Could not find Windows resource compiler %s.' % ' '.join(rescomp.get_command())) - res_kwargs = {'output': '@BASENAME@.' + suffix, - 'arguments': res_args} - res_gen = build.Generator([rescomp], res_kwargs) - res_output = res_gen.process_files('Windows resource', args, state) - return ModuleReturnValue(res_output, [res_output]) + + res_kwargs = { + 'output': '@BASENAME@.' + suffix, + 'input': args, + 'command': [rescomp] + res_args, + } + + res_target = build.CustomTarget('Windows resource', state.subdir, state.subproject, res_kwargs) + + return ModuleReturnValue(res_target, [res_target]) def initialize(): return WindowsModule() |