flex: fix include

verilator-cmake
star9029 3 weeks ago
parent c86ead806d
commit 65b9e34921
  1. 9
      packages/f/flex/xmake.lua

@ -15,6 +15,15 @@ package("flex")
add_urls("https://github.com/westes/flex/releases/download/v$(version)/flex-$(version).tar.gz")
end
on_fetch(function (package)
-- If pacman::flex already installed
if is_subhost("msys") and package:is_library() then
local msys_dir = os.getenv("MINGW_PREFIX")
local header = path.join(path.directory(msys_dir), "usr/include/FlexLexer.h")
os.trycp(header, package:installdir("include"))
end
end)
on_load("macosx", "linux", "bsd", "windows", "@msys", function (package)
if package:is_plat("windows") then
package:add("deps", "winflexbison", {private = true})

Loading…
Cancel
Save