summaryrefslogtreecommitdiff
path: root/xmake/modules/detect/tools/find_flex.lua
diff options
context:
space:
mode:
author西风逍遥游 <[email protected]>2023-07-30 21:50:32 -0700
committer西风逍遥游 <[email protected]>2023-07-30 21:50:32 -0700
commit160dedcc8bad127a35150f54d94005b30f18fff2 (patch)
treef201570c856e132f76dfaa36377975f6fcfbe984 /xmake/modules/detect/tools/find_flex.lua
parent05b62d2a23b5ad1cc8cf5df357f8c8cd0229e8c2 (diff)
Add win_flex and win_bison searching on windows
Diffstat (limited to 'xmake/modules/detect/tools/find_flex.lua')
-rw-r--r--xmake/modules/detect/tools/find_flex.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/xmake/modules/detect/tools/find_flex.lua b/xmake/modules/detect/tools/find_flex.lua
index 3d127f9ab..6276000c1 100644
--- a/xmake/modules/detect/tools/find_flex.lua
+++ b/xmake/modules/detect/tools/find_flex.lua
@@ -43,6 +43,11 @@ function main(opt)
-- find program
local program = find_program(opt.program or "flex", opt)
+ -- try win_flex if flex is not found on windows
+ if not program and not opt.program and os.host() == "windows" then
+ program = find_program("win_flex", opt)
+ end
+
-- find program version
local version = nil
if program and opt and opt.version then