Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Aug 10, 2024
1 parent 29275e7 commit 1d18ce7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/d/daw_json_link/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ package("daw_json_link")

add_deps("cmake")

on_install("windows", "linux", "macosx", "bsd", "mingw", "msys", "android@linux,macosx", "iphoneos", "cross", function (package)
if package:is_plat("android") then
import("core.tool.toolchain")
local ndk = toolchain.load("ndk", {plat = package:plat(), arch = package:arch()})
if on_check then
on_check("android", function (package)
local ndk = package:toolchain("ndk")
local ndk_sdkver = ndk:config("ndk_sdkver")
assert(ndk_sdkver and tonumber(ndk_sdkver) > 21, "package(daw_json_link): need ndk api level > 21 for android")
end
import("package.tools.cmake").install(package, configs)
end)
end

on_install("windows", "linux", "macosx", "bsd", "mingw", "msys", "android@linux,macosx", "iphoneos", "cross", function (package)
import("package.tools.cmake").install(package)
end)

on_test(function (package)
Expand Down

0 comments on commit 1d18ce7

Please sign in to comment.