Skip to content

Commit

Permalink
fix cross
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing committed Jul 15, 2024
1 parent fddf6ce commit 34b925e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/l/libyuv/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@ package("libyuv")
add_syslinks("m")
end

if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk"):config("ndkver")
assert(ndk and tonumber(ndk) > 22, "package(libyuv/arm64): need ndk version > 22")
end)
end

on_load(function (package)
if package:config("jpeg") then
package:add("deps", "libjpeg")
Expand All @@ -40,12 +47,10 @@ package("libyuv")
end)

on_install(function (package)
if package:is_plat("android") then
io.replace("Android.bp", "-Werror", "", {plain = true})
elseif package:is_plat("iphoneos") then
if package:is_plat("iphoneos", "cross") then
io.replace("CMakeLists.txt",
[[STRING(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" arch_lowercase)]],
[[set(arch_lowercase "arm64")]], {plain = true})
[[set(arch_lowercase "]] .. package:arch() .. [[")]], {plain = true})
end

local configs = {"-DCMAKE_CXX_STANDARD=14"}
Expand Down

0 comments on commit 34b925e

Please sign in to comment.