aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek.chauhan@gmail.com>2016-07-19 02:28:48 +0530
committerJussi Pakkanen <jpakkane@gmail.com>2016-07-18 23:58:48 +0300
commit201f2aebed6cbdf067240bd229fc4062d418e6cf (patch)
tree4cd9bdc9abdc4c70a73560efa15bae19792d110f
parentc527e4a658a5fda8a13e0da82375ffeba58c703a (diff)
downloadmeson-201f2aebed6cbdf067240bd229fc4062d418e6cf.zip
meson-201f2aebed6cbdf067240bd229fc4062d418e6cf.tar.gz
meson-201f2aebed6cbdf067240bd229fc4062d418e6cf.tar.bz2
Also read WINDRES envvar to find windres (#645)
This is, of course, only used when building with MinGW
-rw-r--r--mesonbuild/modules/windows.py5
1 files changed, 4 insertions, 1 deletions
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)