Skip to content

Commit

Permalink
Fix cross-compilation with windows plat
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing committed Dec 31, 2024
1 parent 5ff68a6 commit b82c713
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/f/ffmpeg/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@ package("ffmpeg")
if path.cygwin then -- xmake 2.8.9
import("package.tools.autoconf")
local envs = autoconf.buildenvs(package, {packagedeps = "libiconv"})
if not envs.PATH then -- Fix in xmake 2.9.8
local msvc = package:toolchain("msvc") or toolchain.load("msvc", {plat = package:plat(), arch = package:arch()})
envs.PATH = os.getenv("PATH") -- we need to reserve PATH on msys2
envs = os.joinenvs(envs, msvc:runenvs())
end
-- add gas-preprocessor to PATH
if package:is_arch("arm", "arm64") then
envs.PATH = path.join(os.programdir(), "scripts") .. path.envsep() .. envs.PATH
Expand Down

0 comments on commit b82c713

Please sign in to comment.