From c2ff310ff74593bfbea019b684fb3495a0f585fd Mon Sep 17 00:00:00 2001 From: star9029 Date: Wed, 1 Jan 2025 21:47:18 +0800 Subject: [PATCH] Fix windows cross-compilation --- packages/f/ffmpeg/xmake.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/f/ffmpeg/xmake.lua b/packages/f/ffmpeg/xmake.lua index 0d3df9efff0..91944229576 100644 --- a/packages/f/ffmpeg/xmake.lua +++ b/packages/f/ffmpeg/xmake.lua @@ -225,6 +225,11 @@ package("ffmpeg") if package:is_arch("arm", "arm64") then envs.PATH = path.join(os.programdir(), "scripts") .. path.envsep() .. envs.PATH end + if package:is_cross() then + -- The makedef script always assumes that the AR environment variable is gnu ar + -- @see https://github.com/microsoft/vcpkg/issues/42365 + envs.AR = nil + end autoconf.install(package, configs, {envs = envs}) else import("core.base.option")