[Premake] Add udis scripts

This commit is contained in:
momo5502 2017-02-21 20:03:52 +01:00
parent fb328e0b38
commit 6bf1d263ab
2 changed files with 52 additions and 0 deletions

45
premake/udis86.lua Normal file
View File

@ -0,0 +1,45 @@
udis86 = {
settings = nil
}
function udis86.setup(settings)
if not settings.source then error("Missing source.") end
udis86.settings = settings
if not udis86.settings.defines then udis86.settings.defines = {} end
end
function udis86.import()
if not udis86.settings then error("You need to call udis86.setup first") end
links { "udis86" }
udis86.includes()
end
function udis86.includes()
if not udis86.settings then error("You need to call udis86.setup first") end
includedirs { udis86.settings.source }
defines(udis86.settings.defines)
end
function udis86.project()
if not udis86.settings then error("You need to call udis86.setup first") end
project "udis86"
language "C"
udis86.includes()
files
{
path.join(udis86.settings.source, "libudis86/*.h"),
path.join(udis86.settings.source, "libudis86/*.c"),
}
-- not our code, ignore POSIX usage warnings for now
warnings "Off"
kind "SharedLib"
kind "StaticLib"
end

View File

@ -200,6 +200,7 @@ require "premake/protobuf"
require "premake/sqlite3"
require "premake/zlib"
require "premake/WinToast"
require "premake/udis86"
base128.setup
{
@ -260,6 +261,10 @@ WinToast.setup
{
source = path.join(depsBasePath, "WinToast"),
}
udis86.setup
{
source = path.join(depsBasePath, "udis86"),
}
workspace "iw4x"
location "./build"
@ -367,6 +372,7 @@ workspace "iw4x"
protobuf.import()
zlib.import()
WinToast.import()
udis86.import()
-- fix vpaths for protobuf sources
vpaths
@ -486,6 +492,7 @@ workspace "iw4x"
protobuf.project()
zlib.project()
WinToast.project()
udis86.project()
rule "ProtobufCompiler"
display "Protobuf compiler"