[VFS] Add support for loading ZArchive files
This commit is contained in:
committed by
Radosław Gliński
parent
e191f2d8d0
commit
2cd2d1d620
21
third_party/zarchive.lua
vendored
Normal file
21
third_party/zarchive.lua
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
group("third_party")
|
||||
project("zarchive")
|
||||
uuid("d32f03aa-f0c9-11ed-a05b-0242ac120003")
|
||||
kind("StaticLib")
|
||||
language("C++")
|
||||
links({
|
||||
})
|
||||
defines({
|
||||
"_LIB",
|
||||
})
|
||||
includedirs({
|
||||
"zarchive/include",
|
||||
"zstd/lib",
|
||||
})
|
||||
files({
|
||||
"zarchive/include/zarchive/zarchivecommon.h",
|
||||
"zarchive/include/zarchive/zarchivereader.h",
|
||||
"zarchive/include/zarchive/zarchivewriter.h",
|
||||
"zarchive/src/zarchivereader.cpp",
|
||||
"zarchive/src/zarchivewriter.cpp",
|
||||
})
|
||||
87
third_party/zstd.lua
vendored
Normal file
87
third_party/zstd.lua
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
-- This GENie/premake file copies the behavior of the Makefile in the lib folder.
|
||||
-- Basic usage: project_zstd(ZSTD_DIR)
|
||||
|
||||
function project_zstd(dir, compression, decompression, deprecated, dictbuilder, legacy)
|
||||
if compression == nil then compression = true end
|
||||
if decompression == nil then decompression = true end
|
||||
if deprecated == nil then deprecated = false end
|
||||
if dictbuilder == nil then dictbuilder = false end
|
||||
|
||||
if legacy == nil then legacy = 0 end
|
||||
|
||||
if not compression then
|
||||
dictbuilder = false
|
||||
deprecated = false
|
||||
end
|
||||
|
||||
if not decompression then
|
||||
legacy = 0
|
||||
deprecated = false
|
||||
end
|
||||
|
||||
project 'zstd'
|
||||
kind 'StaticLib'
|
||||
language 'C'
|
||||
|
||||
files {
|
||||
dir .. 'zstd.h',
|
||||
dir .. 'common/**.c',
|
||||
dir .. 'common/**.h'
|
||||
}
|
||||
|
||||
if compression then
|
||||
files {
|
||||
dir .. 'compress/**.c',
|
||||
dir .. 'compress/**.h'
|
||||
}
|
||||
end
|
||||
|
||||
if decompression then
|
||||
files {
|
||||
dir .. 'decompress/**.c',
|
||||
dir .. 'decompress/**.h'
|
||||
}
|
||||
end
|
||||
|
||||
if dictbuilder then
|
||||
files {
|
||||
dir .. 'dictBuilder/**.c',
|
||||
dir .. 'dictBuilder/**.h'
|
||||
}
|
||||
end
|
||||
|
||||
if deprecated then
|
||||
files {
|
||||
dir .. 'deprecated/**.c',
|
||||
dir .. 'deprecated/**.h'
|
||||
}
|
||||
end
|
||||
|
||||
if legacy ~= 0 then
|
||||
if legacy >= 8 then
|
||||
files {
|
||||
dir .. 'legacy/zstd_v0' .. (legacy - 7) .. '.*'
|
||||
}
|
||||
end
|
||||
includedirs {
|
||||
dir .. 'legacy'
|
||||
}
|
||||
end
|
||||
|
||||
includedirs {
|
||||
dir,
|
||||
dir .. 'common'
|
||||
}
|
||||
|
||||
defines {
|
||||
'XXH_NAMESPACE=ZSTD_',
|
||||
'ZSTD_LEGACY_SUPPORT=' .. legacy
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
group("third_party")
|
||||
project("zstd")
|
||||
uuid("df336aac-f0c8-11ed-a05b-0242ac120003")
|
||||
project_zstd('./zstd/lib/')
|
||||
|
||||
Reference in New Issue
Block a user