[Submodules] Add zstd
This commit is contained in:
parent
ac7943cfbb
commit
4b75665eb0
4
.gitmodules
vendored
4
.gitmodules
vendored
@ -29,3 +29,7 @@
|
|||||||
[submodule "deps/udis86"]
|
[submodule "deps/udis86"]
|
||||||
path = deps/udis86
|
path = deps/udis86
|
||||||
url = ../udis86.git
|
url = ../udis86.git
|
||||||
|
[submodule "deps/zstd"]
|
||||||
|
path = deps/zstd
|
||||||
|
url = https://github.com/facebook/zstd.git
|
||||||
|
branch = dev
|
||||||
|
1
deps/zstd
vendored
Submodule
1
deps/zstd
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 379f9d874d578111c611b2262211aa763171a94c
|
66
premake/zstd.lua
Normal file
66
premake/zstd.lua
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
zstd = {
|
||||||
|
settings = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
function zstd.setup(settings)
|
||||||
|
if not settings.source then error("Missing source.") end
|
||||||
|
|
||||||
|
zstd.settings = settings
|
||||||
|
|
||||||
|
if not zstd.settings.defines then zstd.settings.defines = {} end
|
||||||
|
end
|
||||||
|
|
||||||
|
function zstd.import()
|
||||||
|
if not zstd.settings then error("You need to call zstd.setup first") end
|
||||||
|
|
||||||
|
links { "zstd" }
|
||||||
|
zstd.includes()
|
||||||
|
end
|
||||||
|
|
||||||
|
function zstd.includes()
|
||||||
|
if not zstd.settings then error("You need to call zstd.setup first") end
|
||||||
|
|
||||||
|
includedirs
|
||||||
|
{
|
||||||
|
path.join(zstd.settings.source, "lib"),
|
||||||
|
path.join(zstd.settings.source, "lib/common"),
|
||||||
|
path.join(zstd.settings.source, "zlibWrapper")
|
||||||
|
}
|
||||||
|
defines(zstd.settings.defines)
|
||||||
|
end
|
||||||
|
|
||||||
|
function zstd.project()
|
||||||
|
if not zstd.settings then error("You need to call zstd.setup first") end
|
||||||
|
|
||||||
|
project "zstd"
|
||||||
|
language "C"
|
||||||
|
|
||||||
|
zstd.includes()
|
||||||
|
files
|
||||||
|
{
|
||||||
|
path.join(zstd.settings.source, "lib/**.h"),
|
||||||
|
path.join(zstd.settings.source, "lib/**.c"),
|
||||||
|
path.join(zstd.settings.source, "zlibWrapper/zstd_zlibwrapper.h"),
|
||||||
|
path.join(zstd.settings.source, "zlibWrapper/zstd_zlibwrapper.c"),
|
||||||
|
}
|
||||||
|
removefiles
|
||||||
|
{
|
||||||
|
path.join(zstd.settings.source, "lib/legacy/**.*"),
|
||||||
|
--path.join(zstd.settings.source, "zlibWrapper/examples/**.*"),
|
||||||
|
}
|
||||||
|
defines
|
||||||
|
{
|
||||||
|
"zstd_DLL",
|
||||||
|
"_CRT_SECURE_NO_DEPRECATE",
|
||||||
|
}
|
||||||
|
|
||||||
|
zlib.import()
|
||||||
|
|
||||||
|
-- not our code, ignore POSIX usage warnings for now
|
||||||
|
warnings "Off"
|
||||||
|
|
||||||
|
--configuration "*Static"
|
||||||
|
defines { "_LIB" }
|
||||||
|
removedefines { "_USRDLL", "_DLL", "zstd_DLL" }
|
||||||
|
kind "StaticLib"
|
||||||
|
end
|
@ -180,6 +180,7 @@ require "premake/mongoose"
|
|||||||
require "premake/pdcurses"
|
require "premake/pdcurses"
|
||||||
require "premake/protobuf"
|
require "premake/protobuf"
|
||||||
require "premake/zlib"
|
require "premake/zlib"
|
||||||
|
require "premake/zstd"
|
||||||
require "premake/udis86"
|
require "premake/udis86"
|
||||||
|
|
||||||
json11.setup
|
json11.setup
|
||||||
@ -221,6 +222,10 @@ zlib.setup
|
|||||||
},
|
},
|
||||||
source = path.join(depsBasePath, "zlib"),
|
source = path.join(depsBasePath, "zlib"),
|
||||||
}
|
}
|
||||||
|
zstd.setup
|
||||||
|
{
|
||||||
|
source = path.join(depsBasePath, "zstd"),
|
||||||
|
}
|
||||||
udis86.setup
|
udis86.setup
|
||||||
{
|
{
|
||||||
source = path.join(depsBasePath, "udis86"),
|
source = path.join(depsBasePath, "udis86"),
|
||||||
@ -311,6 +316,7 @@ workspace "iw4x"
|
|||||||
pdcurses.import()
|
pdcurses.import()
|
||||||
protobuf.import()
|
protobuf.import()
|
||||||
zlib.import()
|
zlib.import()
|
||||||
|
zstd.import()
|
||||||
udis86.import()
|
udis86.import()
|
||||||
|
|
||||||
-- fix vpaths for protobuf sources
|
-- fix vpaths for protobuf sources
|
||||||
@ -423,6 +429,7 @@ workspace "iw4x"
|
|||||||
pdcurses.project()
|
pdcurses.project()
|
||||||
protobuf.project()
|
protobuf.project()
|
||||||
zlib.project()
|
zlib.project()
|
||||||
|
zstd.project()
|
||||||
udis86.project()
|
udis86.project()
|
||||||
|
|
||||||
rule "ProtobufCompiler"
|
rule "ProtobufCompiler"
|
||||||
|
Loading…
Reference in New Issue
Block a user