diff --git a/.gitmodules b/.gitmodules index e1d5070f..75a3cdeb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,3 +11,6 @@ [submodule "deps/pdcurses"] path = deps/pdcurses url = git://git.code.sf.net/p/pdcurses/code +[submodule "deps/libtomcrypt"] + path = deps/libtomcrypt + url = https://github.com/libtom/libtomcrypt diff --git a/deps/libtomcrypt b/deps/libtomcrypt new file mode 160000 index 00000000..912eff49 --- /dev/null +++ b/deps/libtomcrypt @@ -0,0 +1 @@ +Subproject commit 912eff4949f46c0b426d2180429a6fa4c1144f1d diff --git a/premake5.lua b/premake5.lua index 2547af18..90d8c71d 100644 --- a/premake5.lua +++ b/premake5.lua @@ -100,8 +100,15 @@ workspace "iw4x" buildoptions { "-Zm200" } -- allocate ~150mb memory for the precompiled header. This should be enough, increase if necessary -- Dependency on zlib, json11 and asio - links { "zlib", "json11", "pdcurses" } - includedirs { "./deps/zlib", "./deps/json11", "./deps/pdcurses", "./deps/asio/asio/include" } + links { "zlib", "json11", "pdcurses", "libtomcrypt" } + includedirs + { + "./deps/zlib", + "./deps/json11", + "./deps/pdcurses", + "./deps/asio/asio/include", + "./deps/libtomcrypt/src/headers", + } -- Virtual paths if not _OPTIONS["no-new-structure"] then @@ -193,3 +200,24 @@ workspace "iw4x" -- always build as static lib, as pdcurses doesn't export anything kind "StaticLib" + + -- libtomcrypt + project "libtomcrypt" + language "C" + defines { "_LIB", "LTC_SOURCE" } + includedirs { "./deps/libtomcrypt/src/headers" } + + files + { + "./deps/libtomcrypt/src/**.c", + "./deps/libtomcrypt/src/**.h" + } + + -- remove ocb3 code + removefiles { "./deps/libtomcrypt/src/encauth/ocb3/**.c" } + + -- not our code, ignore POSIX usage warnings for now + warnings "Off" + + -- always build as static lib, as pdcurses doesn't export anything + kind "StaticLib"