diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..2d3e5d47 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,8 @@ +[submodule "tools/premake/github-package"] + path = tools/premake/github-package + url = https://github.com/mversluys/premake-github-package.git + branch = master +[submodule "deps/zlib"] + path = deps/zlib + url = https://github.com/madler/zlib.git + branch = master diff --git a/deps/zlib b/deps/zlib new file mode 160000 index 00000000..50893291 --- /dev/null +++ b/deps/zlib @@ -0,0 +1 @@ +Subproject commit 50893291621658f355bc5b4d450a8d06a563053d diff --git a/premake5.lua b/premake5.lua index d676a3b0..4237bd6b 100644 --- a/premake5.lua +++ b/premake5.lua @@ -56,6 +56,8 @@ workspace "iw4x" -- VS 2015 toolset only toolset "msc-140" + configuration "windows" + defines {"_WINDOWS"} configuration "Release*" defines { "NDEBUG" } @@ -84,6 +86,10 @@ workspace "iw4x" pchheader "STDInclude.hpp" -- must be exactly same as used in #include directives pchsource "src/STDInclude.cpp" -- real path + -- Dependency on zlib + links { "zlib" } + includedirs { "./deps/zlib" } + -- Virtual paths if not _OPTIONS["no-new-structure"] then vpaths { @@ -116,4 +122,22 @@ workspace "iw4x" configuration "Release*" flags { "FatalCompileWarnings" } + group "External dependencies" + -- zlib + project "zlib" + language "C" + defines { "_CRT_SECURE_NO_DEPRECATE" } + + files + { + "./deps/zlib/*.h", + "./deps/zlib/*.c" + } + + -- not our code, ignore POSIX usage warnings for now + warnings "Off" + + kind "SharedLib" + configuration "*Static" + kind "StaticLib"