Plugins: Add Assimp plugin (WIP)

Currently load only static meshes


Former-commit-id: 61dee8f53a423d6d170bd3bfe72e71daa63e8c5b
This commit is contained in:
Lynix
2016-04-29 14:22:14 +02:00
parent 019c1f4a36
commit 34b7260d54
5 changed files with 464 additions and 5 deletions

View File

@@ -243,12 +243,17 @@ function NazaraBuild:Execute()
-- Tools
for k, toolTable in ipairs(self.OrderedTools) do
project("Nazara" .. toolTable.Name)
local prefix = "Nazara"
if (toolTable.Kind == "plugin") then
prefix = "Plugin"
end
project(prefix .. toolTable.Name)
location(_ACTION .. "/tools")
targetdir(toolTable.Directory)
if (toolTable.Kind == "library") then
if (toolTable.Kind == "plugin" or toolTable.Kind == "library") then
kind("SharedLib")
elseif (toolTable.Kind == "consoleapp") then
debugdir(toolTable.Directory)
@@ -257,7 +262,7 @@ function NazaraBuild:Execute()
debugdir(toolTable.Directory)
kind("WindowedApp")
else
assert(false, "wut")
assert(false, "Invalid tool Kind")
end
includedirs({
@@ -280,6 +285,8 @@ function NazaraBuild:Execute()
libdirs("../lib/" .. makeLibDir .. "/x86")
if (toolTable.Kind == "library") then
targetdir("../lib/" .. makeLibDir .. "/x86")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x32")
end
configuration({"codeblocks or codelite or gmake", "x64"})
@@ -287,6 +294,8 @@ function NazaraBuild:Execute()
libdirs("../lib/" .. makeLibDir .. "/x64")
if (toolTable.Kind == "library") then
targetdir("../lib/" .. makeLibDir .. "/x64")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/" .. makeLibDir .. "/x64")
end
configuration({"vs*", "x32"})
@@ -294,6 +303,8 @@ function NazaraBuild:Execute()
libdirs("../lib/msvc/x86")
if (toolTable.Kind == "library") then
targetdir("../lib/msvc/x86")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x86")
end
configuration({"vs*", "x64"})
@@ -301,6 +312,8 @@ function NazaraBuild:Execute()
libdirs("../lib/msvc/x64")
if (toolTable.Kind == "library") then
targetdir("../lib/msvc/x64")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/msvc/x64")
end
configuration({"xcode3 or xcode4", "x32"})
@@ -308,6 +321,8 @@ function NazaraBuild:Execute()
libdirs("../lib/xcode/x86")
if (toolTable.Kind == "library") then
targetdir("../lib/xcode/x86")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/xcode/x86")
end
configuration({"xcode3 or xcode4", "x64"})
@@ -315,9 +330,11 @@ function NazaraBuild:Execute()
libdirs("../lib/xcode/x64")
if (toolTable.Kind == "library") then
targetdir("../lib/xcode/x64")
elseif (toolTable.Kind == "plugin") then
targetdir("../plugins/" .. toolTable.Name .. "/lib/xcode/x64")
end
if (toolTable.Kind == "library") then
if (toolTable.Kind == "library" or toolTable.Kind == "plugin") then
configuration("*Static")
kind("StaticLib")
@@ -719,7 +736,7 @@ function NazaraBuild:RegisterTool(toolTable)
end
local lowerCaseKind = toolTable.Kind:lower()
if (lowerCaseKind == "library" or lowerCaseKind == "consoleapp" or lowerCaseKind == "windowapp") then
if (lowerCaseKind == "library" or lowerCaseKind == "plugin" or lowerCaseKind == "consoleapp" or lowerCaseKind == "windowapp") then
toolTable.Kind = lowerCaseKind
else
return false, "Invalid tool type"

View File

@@ -0,0 +1,21 @@
TOOL.Name = "Assimp"
TOOL.Directory = "../SDK/lib"
TOOL.Kind = "Plugin"
TOOL.Includes = {
"../include",
"../plugins/Assimp"
}
TOOL.Files = {
"../plugins/Assimp/**.hpp",
"../plugins/Assimp/**.inl",
"../plugins/Assimp/**.cpp"
}
TOOL.Libraries = {
"NazaraCore",
"NazaraUtility",
"assimp"
}