diff --git a/.gitmodules b/.gitmodules index 47cca4c9..28b1e92e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "thirdparty/catch2"] path = thirdparty/catch2 url = https://github.com/catchorg/Catch2.git +[submodule "thirdparty/json"] + path = thirdparty/json + url = https://github.com/nlohmann/json.git diff --git a/premake5.lua b/premake5.lua index 27dd36bd..a610ffa5 100644 --- a/premake5.lua +++ b/premake5.lua @@ -75,6 +75,7 @@ workspace "OpenAssetTools" include "thirdparty/catch2.lua" include "thirdparty/libtomcrypt.lua" include "thirdparty/libtommath.lua" +include "thirdparty/json.lua" include "thirdparty/minilzo.lua" include "thirdparty/minizip.lua" include "thirdparty/salsa20.lua" @@ -85,6 +86,7 @@ group "ThirdParty" catch2:project() libtommath:project() libtomcrypt:project() + json:project() minilzo:project() minizip:project() salsa20:project() diff --git a/src/ObjWriting.lua b/src/ObjWriting.lua index f045f0f7..cf0ef668 100644 --- a/src/ObjWriting.lua +++ b/src/ObjWriting.lua @@ -52,6 +52,7 @@ function ObjWriting:project() self:include(includes) Utils:include(includes) + json:include(includes) minilzo:include(includes) minizip:include(includes) end diff --git a/thirdparty/json b/thirdparty/json new file mode 160000 index 00000000..4f8fba14 --- /dev/null +++ b/thirdparty/json @@ -0,0 +1 @@ +Subproject commit 4f8fba14066156b73f1189a2b8bd568bde5284c5 diff --git a/thirdparty/json.lua b/thirdparty/json.lua new file mode 100644 index 00000000..2e6e34f3 --- /dev/null +++ b/thirdparty/json.lua @@ -0,0 +1,23 @@ +json = {} + +function json:include(includes) + if includes:handle(self:name()) then + includedirs { + path.join(ThirdPartyFolder(), "json", "single_include") + } + end +end + +function json:link() +end + +function json:use() + +end + +function json:name() + return "json" +end + +function json:project() +end