Add extsources to ffmpeg (#1350)

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua

* Update xmake.lua
pull/1359/head
ImperatorS79 2 years ago committed by GitHub
parent 2ee023a6bb
commit 5a1f1d7130
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 27
      packages/f/ffmpeg/xmake.lua

@ -45,6 +45,33 @@ package("ffmpeg")
add_deps("yasm")
end
if on_fetch then
on_fetch("mingw", "linux", "macosx", function (package, opt)
import("lib.detect.find_tool")
if opt.system then
local result
for _, name in ipairs({"libavcodec", "libavdevice", "libavfilter", "libavformat", "libavutil", "libpostproc", "libswresample", "libswscale"}) do
local pkginfo = package:find_package("pkgconfig::" .. name, opt)
if pkginfo then
pkginfo.version = nil
if not result then
result = pkginfo
else
result = result .. pkginfo
end
else
return
end
end
local ffmpeg = find_tool("ffmpeg", {check = "-help", version = true, command = "-version", parse = "%d+%.?%d+%.?%d+", force = true})
if ffmpeg then
result.version = ffmpeg.version
end
return result
end
end)
end
on_load("linux", "macos", "android", function (package)
local configdeps = {zlib = "zlib",
bzlib = "bzip2",

Loading…
Cancel
Save