diff options
| -rw-r--r-- | xmake/modules/detect/tools/find_windres.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/modules/detect/tools/find_windres.lua b/xmake/modules/detect/tools/find_windres.lua index fab820ec2..df2562ee3 100644 --- a/xmake/modules/detect/tools/find_windres.lua +++ b/xmake/modules/detect/tools/find_windres.lua @@ -21,9 +21,8 @@ -- imports import("lib.detect.find_program") --- check +-- we cannot run `windres --version` to check it, because llvm-mingw/windres always return non-zero function _check(program, opt) - opt = opt or {} local objectfile = os.tmpfile() .. ".o" local resourcefile = os.tmpfile() .. ".rc" io.writefile(resourcefile, [[ @@ -66,6 +65,8 @@ end -- function main(opt) opt = opt or {} - opt.check = _check -- we cannot run `windres --version` to check it, because llvm-mingw/windres always return non-zero + opt.check = function (program) + _check(program, opt) + end return find_program(opt.program or "windres", opt) end |
