|
@@ -7,6 +7,8 @@ package("lz4")
|
|
"https://github.com/lz4/lz4.git")
|
|
"https://github.com/lz4/lz4.git")
|
|
add_versions("v1.9.3", "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1")
|
|
add_versions("v1.9.3", "030644df4611007ff7dc962d981f390361e6c97a34e5cbc393ddfbe019ffe2c1")
|
|
|
|
|
|
|
|
+ add_deps("xxhash")
|
|
|
|
+
|
|
on_load("windows", function (package)
|
|
on_load("windows", function (package)
|
|
if package:config("shared") then
|
|
if package:config("shared") then
|
|
package:add("defines", "LZ4_DLL_IMPORT")
|
|
package:add("defines", "LZ4_DLL_IMPORT")
|
|
@@ -16,10 +18,12 @@ package("lz4")
|
|
on_install(function (package)
|
|
on_install(function (package)
|
|
io.writefile("xmake.lua", [[
|
|
io.writefile("xmake.lua", [[
|
|
add_rules("mode.debug", "mode.release")
|
|
add_rules("mode.debug", "mode.release")
|
|
|
|
+ add_requires("xxhash")
|
|
target("lz4")
|
|
target("lz4")
|
|
set_kind("$(kind)")
|
|
set_kind("$(kind)")
|
|
- add_files("lib/*.c")
|
|
|
|
|
|
+ add_files("lib/*.c|xxhash.c")
|
|
add_headerfiles("lib/lz4.h", "lib/lz4hc.h", "lib/lz4frame.h")
|
|
add_headerfiles("lib/lz4.h", "lib/lz4hc.h", "lib/lz4frame.h")
|
|
|
|
+ add_packages("xxhash")
|
|
if is_kind("shared") and is_plat("windows") then
|
|
if is_kind("shared") and is_plat("windows") then
|
|
add_defines("LZ4_DLL_EXPORT")
|
|
add_defines("LZ4_DLL_EXPORT")
|
|
end
|
|
end
|