summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/find_windres.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2023-07-09 22:23:50 +0800
committerruki <[email protected]>2023-07-09 22:23:50 +0800
commitb7a82a2e449133752cca5cee2349180371999373 (patch)
tree8aaafd1fa09a9d59de7d13b84f64609cfb2b0299 /xmake/modules/detect/tools/find_windres.lua
parent710f14b26f29c5d6eaccdf9af197eeca4789ae35 (diff)
fix find windres #3942
Diffstat (limited to 'xmake/modules/detect/tools/find_windres.lua')
-rw-r--r--xmake/modules/detect/tools/find_windres.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/modules/detect/tools/find_windres.lua b/xmake/modules/detect/tools/find_windres.lua
index 36c860c16..fab820ec2 100644
--- a/xmake/modules/detect/tools/find_windres.lua
+++ b/xmake/modules/detect/tools/find_windres.lua
@@ -22,7 +22,8 @@
import("lib.detect.find_program")
-- check
-function _check(program)
+function _check(program, opt)
+ opt = opt or {}
local objectfile = os.tmpfile() .. ".o"
local resourcefile = os.tmpfile() .. ".rc"
io.writefile(resourcefile, [[
@@ -45,7 +46,7 @@ BEGIN
END
]])
- os.runv(program, {"-i", resourcefile, "-o", objectfile})
+ os.runv(program, {"-i", resourcefile, "-o", objectfile}, {envs = opt.envs})
os.rm(resourcefile)
os.rm(objectfile)
end