zstd: version 1.5.2 (#1070)

* zstd: version 1.5.2

* zstd: detect arch and compiler in xmake code.

* zstd: fix indentation.
pull/1073/head
Chen Yufei 3 years ago committed by GitHub
parent c314773d84
commit d0d18a56fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      packages/z/zstd/xmake.lua

@ -7,10 +7,11 @@ package("zstd")
"https://github.com/facebook/zstd.git")
add_versions("v1.4.5", "734d1f565c42f691f8420c8d06783ad818060fc390dee43ae0a89f86d0a4f8c2")
add_versions("v1.5.0", "0d9ade222c64e912d6957b11c923e214e2e010a18f39bec102f572e693ba2867")
add_versions("v1.5.2", "f7de13462f7a82c29ab865820149e778cbfe01087b3a55b5332707abf9db4a6e")
on_install(function (package)
io.writefile("xmake.lua", [[
add_rules("mode.debug", "mode.release")
add_rules("mode.debug", "mode.release", "asm")
target("zstd")
set_kind("$(kind)")
add_files("lib/common/*.c")
@ -21,7 +22,15 @@ package("zstd")
if is_kind("shared") and is_plat("windows") then
add_defines("ZSTD_DLL_EXPORT")
end
on_config(function (target)
if target:is_arch("x64", "x86_64") and target:has_tool("cc", "clang", "gcc") then
target:add("files", "lib/decompress/*.S")
else
target:add("defines", "ZSTD_DISABLE_ASM")
end
end)
]])
import("package.tools.xmake").install(package)
end)

Loading…
Cancel
Save