[Submodules] Add DHT
This commit is contained in:
parent
6e7c307693
commit
7c79a4e5a5
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -32,3 +32,6 @@
|
|||||||
[submodule "deps/iw4mvm"]
|
[submodule "deps/iw4mvm"]
|
||||||
path = deps/iw4mvm
|
path = deps/iw4mvm
|
||||||
url = ../../luckyy/IW4MVM_IW4X.git
|
url = ../../luckyy/IW4MVM_IW4X.git
|
||||||
|
[submodule "deps/dht"]
|
||||||
|
path = deps/dht
|
||||||
|
url = ../dht.git
|
||||||
|
1
deps/dht
vendored
Submodule
1
deps/dht
vendored
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 54ee76af630f56cb97646bc770b88bfb592fd328
|
44
premake/dht.lua
Normal file
44
premake/dht.lua
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
dht = {
|
||||||
|
settings = nil
|
||||||
|
}
|
||||||
|
|
||||||
|
function dht.setup(settings)
|
||||||
|
if not settings.source then error("Missing source.") end
|
||||||
|
|
||||||
|
dht.settings = settings
|
||||||
|
|
||||||
|
if not dht.settings.defines then dht.settings.defines = {} end
|
||||||
|
end
|
||||||
|
|
||||||
|
function dht.import()
|
||||||
|
if not dht.settings then error("You need to call dht.setup first") end
|
||||||
|
|
||||||
|
links { "dht" }
|
||||||
|
dht.includes()
|
||||||
|
end
|
||||||
|
|
||||||
|
function dht.includes()
|
||||||
|
if not dht.settings then error("You need to call dht.setup first") end
|
||||||
|
|
||||||
|
includedirs { dht.settings.source }
|
||||||
|
defines(dht.settings.defines)
|
||||||
|
end
|
||||||
|
|
||||||
|
function dht.project()
|
||||||
|
if not dht.settings then error("You need to call dht.setup first") end
|
||||||
|
|
||||||
|
project "dht"
|
||||||
|
language "C"
|
||||||
|
|
||||||
|
dht.includes()
|
||||||
|
files
|
||||||
|
{
|
||||||
|
path.join(dht.settings.source, "dht.h"),
|
||||||
|
path.join(dht.settings.source, "dht.c"),
|
||||||
|
}
|
||||||
|
|
||||||
|
-- not our code, ignore POSIX usage warnings for now
|
||||||
|
warnings "Off"
|
||||||
|
|
||||||
|
kind "StaticLib"
|
||||||
|
end
|
@ -182,6 +182,7 @@ require "premake/protobuf"
|
|||||||
require "premake/zlib"
|
require "premake/zlib"
|
||||||
require "premake/udis86"
|
require "premake/udis86"
|
||||||
require "premake/iw4mvm"
|
require "premake/iw4mvm"
|
||||||
|
require "premake/dht"
|
||||||
|
|
||||||
json11.setup
|
json11.setup
|
||||||
{
|
{
|
||||||
@ -236,6 +237,10 @@ iw4mvm.setup
|
|||||||
},
|
},
|
||||||
source = path.join(depsBasePath, "iw4mvm"),
|
source = path.join(depsBasePath, "iw4mvm"),
|
||||||
}
|
}
|
||||||
|
dht.setup
|
||||||
|
{
|
||||||
|
source = path.join(depsBasePath, "dht"),
|
||||||
|
}
|
||||||
|
|
||||||
workspace "iw4x"
|
workspace "iw4x"
|
||||||
location "./build"
|
location "./build"
|
||||||
@ -324,6 +329,7 @@ workspace "iw4x"
|
|||||||
zlib.import()
|
zlib.import()
|
||||||
udis86.import()
|
udis86.import()
|
||||||
iw4mvm.import()
|
iw4mvm.import()
|
||||||
|
dht.import()
|
||||||
|
|
||||||
-- fix vpaths for protobuf sources
|
-- fix vpaths for protobuf sources
|
||||||
vpaths
|
vpaths
|
||||||
@ -437,6 +443,7 @@ workspace "iw4x"
|
|||||||
zlib.project()
|
zlib.project()
|
||||||
udis86.project()
|
udis86.project()
|
||||||
iw4mvm.project()
|
iw4mvm.project()
|
||||||
|
dht.project()
|
||||||
|
|
||||||
rule "ProtobufCompiler"
|
rule "ProtobufCompiler"
|
||||||
display "Protobuf compiler"
|
display "Protobuf compiler"
|
||||||
|
Loading…
Reference in New Issue
Block a user