diff options
| -rw-r--r-- | xmake/modules/detect/tools/find_bison.lua | 11 | ||||
| -rw-r--r-- | xmake/modules/detect/tools/find_flex.lua | 11 |
2 files changed, 6 insertions, 16 deletions
diff --git a/xmake/modules/detect/tools/find_bison.lua b/xmake/modules/detect/tools/find_bison.lua index 6fafe1dc7..fcea71574 100644 --- a/xmake/modules/detect/tools/find_bison.lua +++ b/xmake/modules/detect/tools/find_bison.lua @@ -36,19 +36,14 @@ import("lib.detect.find_programver") -- @endcode -- function main(opt) - - -- init options opt = opt or {} - - -- find program local program = find_program(opt.program or "bison", opt) - - -- find program version + if not program and not opt.program and is_host("windows") then + program = find_program("win_bison", opt) + end local version = nil if program and opt and opt.version then version = find_programver(program, opt) end - - -- ok? return program, version end diff --git a/xmake/modules/detect/tools/find_flex.lua b/xmake/modules/detect/tools/find_flex.lua index 3d127f9ab..640e606d0 100644 --- a/xmake/modules/detect/tools/find_flex.lua +++ b/xmake/modules/detect/tools/find_flex.lua @@ -36,19 +36,14 @@ import("lib.detect.find_programver") -- @endcode -- function main(opt) - - -- init options opt = opt or {} - - -- find program local program = find_program(opt.program or "flex", opt) - - -- find program version + if not program and not opt.program and is_host("windows") then + program = find_program("win_flex", opt) + end local version = nil if program and opt and opt.version then version = find_programver(program, opt) end - - -- ok? return program, version end |
