From 4b41440f6b16cbd3244d4b250d19d5cba94f108f Mon Sep 17 00:00:00 2001 From: oy Date: Sat, 21 Jun 2014 19:59:43 +0200 Subject: [PATCH] fixed building with mingw --- bam.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bam.lua b/bam.lua index d31113a6b..62fa45098 100644 --- a/bam.lua +++ b/bam.lua @@ -48,13 +48,13 @@ function CHash(output, ...) return output end -function ResCompile(scriptfile) +function ResCompile(scriptfile, compiler) scriptfile = Path(scriptfile) local output = nil - if config.compiler.driver == "cl" then + if compiler == "cl" then output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".res") AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile) - elseif config.compiler.driver == "gcc" or config.compiler.driver == "clang" then + elseif compiler == "gcc" or compiler == "clang" then output = PathJoin(generated_icon_dir, PathBase(PathFilename(scriptfile)) .. ".coff") AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output) end @@ -299,8 +299,8 @@ end shared_icons = {} function SharedIcons(compiler) if not shared_icons[compiler] then - local server_icon = ResCompile("other/icons/teeworlds_srv_" .. compiler .. ".rc") - local client_icon = ResCompile("other/icons/teeworlds_" .. compiler .. ".rc") + local server_icon = ResCompile("other/icons/teeworlds_srv_" .. compiler .. ".rc", compiler) + local client_icon = ResCompile("other/icons/teeworlds_" .. compiler .. ".rc", compiler) shared_icons[compiler] = {server=server_icon, client=client_icon} end return shared_icons[compiler]