From e0dd0ac9dc6cbc4b3d719f057ac29ca5955439c7 Mon Sep 17 00:00:00 2001 From: Jan Date: Sun, 12 May 2024 16:35:46 +0200 Subject: [PATCH] chore: add eigen library for vector math --- .gitmodules | 3 +++ premake5.lua | 2 ++ src/ObjWriting.lua | 1 + thirdparty/eigen | 1 + thirdparty/eigen.lua | 23 +++++++++++++++++++++++ 5 files changed, 30 insertions(+) create mode 160000 thirdparty/eigen create mode 100644 thirdparty/eigen.lua diff --git a/.gitmodules b/.gitmodules index 28b1e92e..7bfede4e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -13,3 +13,6 @@ [submodule "thirdparty/json"] path = thirdparty/json url = https://github.com/nlohmann/json.git +[submodule "thirdparty/eigen"] + path = thirdparty/eigen + url = https://gitlab.com/libeigen/eigen.git diff --git a/premake5.lua b/premake5.lua index bcdd5ea6..9e850d85 100644 --- a/premake5.lua +++ b/premake5.lua @@ -84,6 +84,7 @@ workspace "OpenAssetTools" -- ThirdParty -- ======================== include "thirdparty/catch2.lua" +include "thirdparty/eigen.lua" include "thirdparty/libtomcrypt.lua" include "thirdparty/libtommath.lua" include "thirdparty/json.lua" @@ -95,6 +96,7 @@ include "thirdparty/zlib.lua" -- ThirdParty group: All projects that are external dependencies group "ThirdParty" catch2:project() + eigen:project() libtommath:project() libtomcrypt:project() json:project() diff --git a/src/ObjWriting.lua b/src/ObjWriting.lua index fa796ae8..6ca48e19 100644 --- a/src/ObjWriting.lua +++ b/src/ObjWriting.lua @@ -55,6 +55,7 @@ function ObjWriting:project() Utils:include(includes) minilzo:include(includes) minizip:include(includes) + eigen:include(includes) json:include(includes) libtomcrypt:include(includes) diff --git a/thirdparty/eigen b/thirdparty/eigen new file mode 160000 index 00000000..afb17288 --- /dev/null +++ b/thirdparty/eigen @@ -0,0 +1 @@ +Subproject commit afb17288cbb5bac779a850e3ec6ba106b7f42c1c diff --git a/thirdparty/eigen.lua b/thirdparty/eigen.lua new file mode 100644 index 00000000..1dab988d --- /dev/null +++ b/thirdparty/eigen.lua @@ -0,0 +1,23 @@ +eigen = {} + +function eigen:include(includes) + if includes:handle(self:name()) then + includedirs { + path.join(ThirdPartyFolder(), "eigen", "Eigen") + } + end +end + +function eigen:link() +end + +function eigen:use() + +end + +function eigen:name() + return "eigen" +end + +function eigen:project() +end