summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2023-08-01 12:14:31 +0800
committerGitHub <[email protected]>2023-08-01 12:14:31 +0800
commit0ad563bb85cc3875a4ebdf5c742696d00a25e451 (patch)
treedf01ada4aabc75c9342526b79a646c397bf333d4 /xmake/modules
parentcb552e88c55f64f8beccfb1b2612998eb6dbde7c (diff)
Update find_flex.lua
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/detect/tools/find_flex.lua6
1 files changed, 1 insertions, 5 deletions
diff --git a/xmake/modules/detect/tools/find_flex.lua b/xmake/modules/detect/tools/find_flex.lua
index 12ee4365a..640e606d0 100644
--- a/xmake/modules/detect/tools/find_flex.lua
+++ b/xmake/modules/detect/tools/find_flex.lua
@@ -38,13 +38,9 @@ import("lib.detect.find_programver")
function main(opt)
opt = opt or {}
local program = find_program(opt.program or "flex", opt)
-
- -- try win_flex if flex is not found on windows
- if not program and is_host("windows") then
+ if not program and not opt.program and is_host("windows") then
program = find_program("win_flex", opt)
end
-
- -- find program version
local version = nil
if program and opt and opt.version then
version = find_programver(program, opt)