mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 12:15:34 +08:00
OpenH264 supports Windows platform
This commit is contained in:
31
thirdparty/openh264/xmake.lua
vendored
Normal file
31
thirdparty/openh264/xmake.lua
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
package("openh264")
|
||||
|
||||
set_homepage("http://www.openh264.org/")
|
||||
set_description("OpenH264 is a codec library which supports H.264 encoding and decoding.")
|
||||
set_license("BSD-2-Clause")
|
||||
|
||||
add_urls("https://github.com/cisco/openh264/archive/refs/tags/$(version).tar.gz")
|
||||
add_versions("v2.3.1", "453afa66dacb560bc5fd0468aabee90c483741571bca820a39a1c07f0362dc32")
|
||||
|
||||
add_deps("meson", "ninja", "nasm")
|
||||
if is_plat("linux") then
|
||||
add_syslinks("pthread", "rt")
|
||||
end
|
||||
on_install("windows", "linux", function (package)
|
||||
import("package.tools.meson").build(package, {"-Dtests=disabled"}, {buildir = "out"})
|
||||
import("package.tools.ninja").install(package, {}, {buildir = "out"})
|
||||
-- if package:config("shared") then
|
||||
-- os.tryrm(path.join(package:installdir("lib"), "libopenh264.a"))
|
||||
-- else
|
||||
-- os.tryrm(path.join(package:installdir("lib"), "libopenh264.so*"))
|
||||
-- os.tryrm(path.join(package:installdir("lib"), "openh264.lib"))
|
||||
-- os.tryrm(path.join(package:installdir("bin"), "openh264-*.dll"))
|
||||
-- end
|
||||
-- if package:is_plat("windows") then
|
||||
-- os.trymv(path.join(package:installdir("lib"), "libopenh264.a"), path.join(package:installdir("lib"), "openh264.lib"))
|
||||
-- end
|
||||
end)
|
||||
|
||||
on_test(function (package)
|
||||
assert(package:has_cxxfuncs("WelsGetCodecVersion", {includes = "wels/codec_api.h"}))
|
||||
end)
|
||||
1
thirdparty/xmake.lua
vendored
1
thirdparty/xmake.lua
vendored
@@ -1,3 +1,4 @@
|
||||
includes("openh264")
|
||||
if is_plat("windows") then
|
||||
elseif is_plat("linux") then
|
||||
includes("ffmpeg")
|
||||
|
||||
Reference in New Issue
Block a user