[Submodules] Add directx sdk

This commit is contained in:
Maurice Heumann 2019-12-26 18:19:00 +01:00
parent 1424283f7e
commit 15f38141d3
4 changed files with 49 additions and 4 deletions

3
.gitmodules vendored
View File

@ -29,3 +29,6 @@
[submodule "deps/udis86"] [submodule "deps/udis86"]
path = deps/udis86 path = deps/udis86
url = https://github.com/vmt/udis86.git url = https://github.com/vmt/udis86.git
[submodule "deps/dxsdk"]
path = deps/dxsdk
url = https://github.com/devKlausS/dxsdk.git

1
deps/dxsdk vendored Submodule

@ -0,0 +1 @@
Subproject commit 996cf740444ce56178e6bc32e7fbe2c8b0f40f08

35
premake/dxsdk.lua Normal file
View File

@ -0,0 +1,35 @@
dxsdk = {
settings = nil
}
function dxsdk.setup(settings)
if not settings.source then error("Missing source.") end
dxsdk.settings = settings
if not dxsdk.settings.defines then dxsdk.settings.defines = {} end
end
function dxsdk.import()
if not dxsdk.settings then error("You need to call dxsdk.setup first") end
--filter "platforms:*32"
libdirs { path.join(dxsdk.settings.source, "Lib/x86") }
--filter "platforms:*64"
-- libdirs { path.join(dxsdk.settings.source, "Lib/x64") }
--filter {}
dxsdk.includes()
end
function dxsdk.includes()
if not dxsdk.settings then error("You need to call dxsdk.setup first") end
includedirs { path.join(dxsdk.settings.source, "Include") }
defines(dxsdk.settings.defines)
end
function dxsdk.project()
end

View File

@ -194,6 +194,7 @@ require "premake/protobuf"
require "premake/zlib" require "premake/zlib"
require "premake/udis86" require "premake/udis86"
require "premake/iw4mvm" require "premake/iw4mvm"
require "premake/dxsdk"
json11.setup json11.setup
{ {
@ -248,6 +249,10 @@ iw4mvm.setup
}, },
source = path.join(depsBasePath, "iw4mvm"), source = path.join(depsBasePath, "iw4mvm"),
} }
dxsdk.setup
{
source = path.join(depsBasePath, "dxsdk"),
}
workspace "iw4x" workspace "iw4x"
startproject "iw4x" startproject "iw4x"
@ -324,11 +329,11 @@ workspace "iw4x"
if _OPTIONS["force-exception-handler"] then if _OPTIONS["force-exception-handler"] then
defines { "FORCE_EXCEPTION_HANDLER" } defines { "FORCE_EXCEPTION_HANDLER" }
end end
if _OPTIONS["enable-dxsdk"] then --if _OPTIONS["enable-dxsdk"] then
defines { "ENABLE_DXSDK" } defines { "ENABLE_DXSDK" }
includedirs { "%DXSDK_DIR%Include" } -- includedirs { "%DXSDK_DIR%Include" }
libdirs { "%DXSDK_DIR%Lib/x86" } -- libdirs { "%DXSDK_DIR%Lib/x86" }
end --end
-- Pre-compiled header -- Pre-compiled header
pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives
@ -345,6 +350,7 @@ workspace "iw4x"
zlib.import() zlib.import()
udis86.import() udis86.import()
--iw4mvm.import() --iw4mvm.import()
dxsdk.import()
-- fix vpaths for protobuf sources -- fix vpaths for protobuf sources
vpaths vpaths