From f159735c3b82849d0c5d33345b7b07a5f5024428 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Fri, 11 May 2018 09:07:34 -0700 Subject: modules/windows: Allow getting windres from native file --- mesonbuild/modules/windows.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/modules/windows.py b/mesonbuild/modules/windows.py index 85cc3bc..96f3a7e 100644 --- a/mesonbuild/modules/windows.py +++ b/mesonbuild/modules/windows.py @@ -59,6 +59,14 @@ class WindowsModule(ExtensionModule): rescomp = ExternalProgram('windres', command=os.environ.get('WINDRES'), silent=True) if not rescomp or not rescomp.found(): + # Take windres from the config file after the environment, which is + # in keeping with the expectations on unix-like OSes that + # environment variables trump config files. + _win = state.environment.config_info.binaries.get('windres') + if _win: + rescomp = ExternalProgram('windres', command=_win, silent=True) + + if not rescomp or not rescomp.found(): comp = self.detect_compiler(state.compilers) if comp.id == 'msvc' or comp.id == 'clang-cl': rescomp = ExternalProgram('rc', silent=True) -- cgit v1.1