From 201f2aebed6cbdf067240bd229fc4062d418e6cf Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 19 Jul 2016 02:28:48 +0530 Subject: Also read WINDRES envvar to find windres (#645) This is, of course, only used when building with MinGW --- mesonbuild/modules/windows.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mesonbuild/modules') diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index 29d6236..7bf0319 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -32,7 +32,10 @@ class WindowsModule: res_args = extra_args + ['/nologo', '/fo@OUTPUT@', '@INPUT@'] suffix = 'res' else: - rescomp = dependencies.ExternalProgram('windres', silent=True) + # Pick-up env var WINDRES if set. This is often used for specifying + # an arch-specific windres. + rescomp_name = os.environ.get('WINDRES', 'windres') + rescomp = dependencies.ExternalProgram(rescomp_name, silent=True) res_args = extra_args + ['@INPUT@', '@OUTPUT@'] suffix = 'o' res_files = mesonlib.stringlistify(args) -- cgit v1.1