Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing committed Sep 18, 2024
1 parent ad84f02 commit b7d425d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/l/lief/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ package("lief")
add_deps("nlohmann_json", {configs = {cmake = true}})
add_deps("tl_expected", "utfcpp", "mbedtls <3.6.0", "tcb-span", "frozen")

if on_check then
on_check(function (package)
if package:is_plat("windows") then
local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
if vs_toolset then
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
assert(minor and minor >= 30, "package(lief) require vs_toolset >= 14.3")
end
end
if package:is_arch("arm.*") then
raise("package(lief) dep(mbedtls <3.6.0) unsupported arm arch")
end
end)
end

on_install(function (package)
if package:config("shared") then
package:add("defines", "LIEF_IMPORT")
Expand Down

0 comments on commit b7d425d

Please sign in to comment.