Merge remote-tracking branch 'origin/BuildSystem-Update' into NDK
Conflicts: build/scripts/common.lua build/scripts/module/audio.lua build/scripts/module/core.lua build/scripts/module/graphics.lua build/scripts/module/lua.lua build/scripts/module/noise.lua build/scripts/module/physics.lua build/scripts/module/renderer.lua build/scripts/module/utility.lua Former-commit-id: 8374b17a214e0efbdc7d35e81ed809f8dc9d3b79
This commit is contained in:
commit
b2a248d6f5
|
|
@ -1,4 +1,7 @@
|
|||
function encodeResources()
|
||||
ACTION.Name = "EncodeResources"
|
||||
ACTION.Description = "Generate a includable header version of resources"
|
||||
|
||||
ACTION.Function = function ()
|
||||
print("Encoding resources ...")
|
||||
local startClock = os.clock()
|
||||
local modules = os.matchdirs("../src/Nazara/*")
|
||||
|
|
@ -38,10 +41,3 @@ function encodeResources()
|
|||
end
|
||||
print("Finished (took " .. os.clock() - startClock .. "s)")
|
||||
end
|
||||
|
||||
newaction
|
||||
{
|
||||
trigger = "encoderesources",
|
||||
description = "Generate a includable header version of resources",
|
||||
execute = encodeResources
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
function examples()
|
||||
dofile("../examples/build/common.lua")
|
||||
end
|
||||
|
||||
newaction
|
||||
{
|
||||
trigger = "examples",
|
||||
description = "Generate examples",
|
||||
execute = examples
|
||||
}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
function generateHeaders()
|
||||
ACTION.Name = "GenerateHeaders"
|
||||
ACTION.Description = "Generate a global header for each module"
|
||||
|
||||
ACTION.Function = function ()
|
||||
local modules = os.matchdirs("../include/Nazara/*")
|
||||
for k, modulePath in pairs(modules) do
|
||||
local moduleName = modulePath:match(".*/(.*)")
|
||||
|
|
@ -52,10 +55,3 @@ function generateHeaders()
|
|||
print(string.format("-#include count: %d", count))
|
||||
end
|
||||
end
|
||||
|
||||
newaction
|
||||
{
|
||||
trigger = "generateheaders",
|
||||
description = "Generate a global header for each module",
|
||||
execute = generateHeaders
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
ACTION.Name = "ParseUnicode"
|
||||
ACTION.Description = "Parse the Unicode Character Data and put the useful informations into a header"
|
||||
|
||||
local CategoryToString = {}
|
||||
CategoryToString["C"] = "Category_Other"
|
||||
CategoryToString["Cc"] = "Category_Other_Control"
|
||||
|
|
@ -67,7 +70,7 @@ table.maxn = table.maxn or function (tab) -- Compatibilit
|
|||
end
|
||||
end
|
||||
|
||||
function getCharacter(tab, first, index)
|
||||
local function getCharacter(tab, first, index)
|
||||
local character = {}
|
||||
character.Category = CategoryToString[tab[3]] or "Category_NoCategory"
|
||||
character.Direction = DirectionToString[tab[5]] or error("Direction not recognized")
|
||||
|
|
@ -78,7 +81,7 @@ function getCharacter(tab, first, index)
|
|||
return character
|
||||
end
|
||||
|
||||
function parseUnicodeData()
|
||||
ACTION.Function = function ()
|
||||
local unicodeSet = {}
|
||||
|
||||
file = io.open ("scripts/data/UnicodeData.txt", "r")
|
||||
|
|
@ -189,9 +192,3 @@ function parseUnicodeData()
|
|||
end
|
||||
--print(string.match("<Plane 15 Private Use, First>", "<.+, (%w+)>"))
|
||||
|
||||
newaction
|
||||
{
|
||||
trigger = "parseunicode",
|
||||
description = "Parse the Unicode Character Data and put the useful informations into a header",
|
||||
execute = parseUnicodeData
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,70 +1,683 @@
|
|||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
-- "DebugStatic",
|
||||
-- "ReleaseStatic",
|
||||
"DebugDLL",
|
||||
"ReleaseDLL"
|
||||
}
|
||||
local PosixOSes = {"bsd", "linux", "macosx", "solaris"}
|
||||
|
||||
defines "NAZARA_BUILD"
|
||||
language "C++"
|
||||
location(_ACTION)
|
||||
NazaraBuild = {} -- L'équivalent d'un namespace en Lua est une table
|
||||
|
||||
includedirs
|
||||
{
|
||||
"../include",
|
||||
"../src/",
|
||||
"../extlibs/include"
|
||||
}
|
||||
function NazaraBuild:Execute()
|
||||
if (_ACTION == nil) then -- Si aucune action n'est spécifiée
|
||||
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
||||
end
|
||||
|
||||
libdirs "../lib"
|
||||
if (self.Actions[_ACTION] ~= nil) then
|
||||
self.Actions[_ACTION].Function()
|
||||
else
|
||||
solution "NazaraEngine"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
defines "NAZARA_PLATFORM_x64"
|
||||
libdirs "../extlibs/lib/x64"
|
||||
else
|
||||
libdirs "../extlibs/lib/x86"
|
||||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
-- "DebugStatic",
|
||||
-- "ReleaseStatic",
|
||||
"DebugDynamic",
|
||||
"ReleaseDynamic"
|
||||
}
|
||||
|
||||
defines "NAZARA_BUILD"
|
||||
language "C++"
|
||||
location(_ACTION)
|
||||
|
||||
includedirs
|
||||
{
|
||||
"../include",
|
||||
"../src/",
|
||||
"../extlibs/include"
|
||||
}
|
||||
|
||||
libdirs "../lib"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
defines "NAZARA_PLATFORM_x64"
|
||||
libdirs "../extlibs/lib/x64"
|
||||
else
|
||||
libdirs "../extlibs/lib/x86"
|
||||
end
|
||||
|
||||
targetdir "../lib"
|
||||
|
||||
configuration "Debug*"
|
||||
defines "NAZARA_DEBUG"
|
||||
flags "Symbols"
|
||||
|
||||
configuration "Release*"
|
||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
|
||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
||||
|
||||
configuration "*Static"
|
||||
defines "NAZARA_STATIC"
|
||||
kind "StaticLib"
|
||||
|
||||
configuration "*Dynamic"
|
||||
kind "SharedLib"
|
||||
|
||||
configuration "DebugStatic"
|
||||
targetsuffix "-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
targetsuffix "-s"
|
||||
|
||||
configuration "DebugDynamic"
|
||||
targetsuffix "-d"
|
||||
|
||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
||||
buildoptions "-std=c++11"
|
||||
if (_OPTIONS["x64"]) then
|
||||
buildoptions "-m64"
|
||||
end
|
||||
|
||||
configuration { "linux or bsd or macosx", "gmake" }
|
||||
buildoptions "-fvisibility=hidden"
|
||||
|
||||
configuration { "linux or bsd or macosx", "gmake" }
|
||||
buildoptions "-fvisibility=hidden"
|
||||
|
||||
configuration "vs*"
|
||||
defines "_CRT_SECURE_NO_WARNINGS"
|
||||
defines "_SCL_SECURE_NO_WARNINGS"
|
||||
|
||||
-- Spécification des modules
|
||||
if (_OPTIONS["united"]) then
|
||||
project "NazaraEngine"
|
||||
end
|
||||
|
||||
for i=1, #self.Modules do
|
||||
local moduleTable = self.Modules[i]
|
||||
if (not _OPTIONS["united"]) then
|
||||
project("Nazara" .. moduleTable.Name)
|
||||
end
|
||||
|
||||
configuration {}
|
||||
|
||||
files(moduleTable.Files)
|
||||
excludes(moduleTable.FilesExclusion)
|
||||
|
||||
defines(moduleTable.Defines)
|
||||
flags(moduleTable.Flags)
|
||||
links(moduleTable.Libraries)
|
||||
|
||||
for k,v in pairs(moduleTable.ConfigurationLibraries) do
|
||||
configuration(k)
|
||||
links(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_OPTIONS["with-examples"]) then
|
||||
solution "NazaraExamples"
|
||||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
-- "DebugStatic",
|
||||
-- "ReleaseStatic",
|
||||
"DebugDynamic",
|
||||
"ReleaseDynamic"
|
||||
}
|
||||
|
||||
language "C++"
|
||||
location("../examples/build/" .. _ACTION)
|
||||
|
||||
debugdir "../examples/bin"
|
||||
includedirs "../include"
|
||||
libdirs "../lib"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
defines "NAZARA_PLATFORM_x64"
|
||||
libdirs "../extlibs/lib/x64"
|
||||
else
|
||||
libdirs "../extlibs/lib/x86"
|
||||
end
|
||||
|
||||
targetdir "../examples/bin"
|
||||
|
||||
configuration "Debug*"
|
||||
defines "NAZARA_DEBUG"
|
||||
flags "Symbols"
|
||||
|
||||
configuration "Release*"
|
||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
|
||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
||||
|
||||
configuration "*Static"
|
||||
defines "NAZARA_STATIC"
|
||||
|
||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
||||
buildoptions "-std=c++11"
|
||||
|
||||
for i=1, #self.Examples do
|
||||
local exampleTable = self.Examples[i]
|
||||
project("Demo" .. exampleTable.Name)
|
||||
|
||||
if (exampleTable.Console) then
|
||||
kind "ConsoleApp"
|
||||
else
|
||||
kind "Window"
|
||||
end
|
||||
|
||||
files(exampleTable.Files)
|
||||
excludes(exampleTable.FilesExclusion)
|
||||
|
||||
defines(exampleTable.Defines)
|
||||
flags(exampleTable.Flags)
|
||||
links(exampleTable.Libraries)
|
||||
|
||||
for k,v in pairs(exampleTable.ConfigurationLibraries) do
|
||||
configuration(k)
|
||||
links(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (_OPTIONS["with-extlibs"]) then
|
||||
solution "NazaraExtlibs"
|
||||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
"DebugStatic",
|
||||
"ReleaseStatic"
|
||||
}
|
||||
|
||||
location("../extlibs/build/" .. _ACTION)
|
||||
includedirs "../extlibs/include"
|
||||
kind "StaticLib"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
libdirs "../extlibs/lib/x64"
|
||||
targetdir "../extlibs/lib/x64"
|
||||
else
|
||||
libdirs "../extlibs/lib/x86"
|
||||
targetdir "../extlibs/lib/x86"
|
||||
end
|
||||
|
||||
configuration "Debug*"
|
||||
flags "Symbols"
|
||||
|
||||
configuration "Release*"
|
||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
|
||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3 or xcode4" }
|
||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
||||
|
||||
configuration "DebugStatic"
|
||||
targetsuffix "-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
targetsuffix "-s"
|
||||
|
||||
configuration "codeblocks or codelite or gmake or xcode3 or xcode4"
|
||||
buildoptions "-std=c++11"
|
||||
|
||||
for i=1, #self.ExtLibs do
|
||||
local libTable = self.ExtLibs[i]
|
||||
project(libTable.Name)
|
||||
|
||||
language(libTable.Language)
|
||||
|
||||
files(libTable.Files)
|
||||
excludes(libTable.FilesExclusion)
|
||||
|
||||
defines(libTable.Defines)
|
||||
flags(libTable.Flags)
|
||||
links(libTable.Libraries)
|
||||
|
||||
for k,v in pairs(libTable.ConfigurationLibraries) do
|
||||
configuration(k)
|
||||
links(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
targetdir "../lib"
|
||||
function NazaraBuild:Initialize()
|
||||
-- Commençons par les options
|
||||
newoption {
|
||||
trigger = "x64",
|
||||
description = "Setup build project for x64 arch"
|
||||
}
|
||||
|
||||
configuration "Debug*"
|
||||
defines "NAZARA_DEBUG"
|
||||
flags "Symbols"
|
||||
newoption {
|
||||
trigger = "united",
|
||||
description = "Builds all the modules as one united library"
|
||||
}
|
||||
|
||||
configuration "Release*"
|
||||
flags { "EnableSSE", "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
newoption {
|
||||
trigger = "with-extlibs",
|
||||
description = "Builds the extern libraries"
|
||||
}
|
||||
|
||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3*" }
|
||||
buildoptions "-mfpmath=sse" -- Utilisation du SSE pour les calculs flottants
|
||||
buildoptions "-ftree-vectorize" -- Activation de la vectorisation du code
|
||||
newoption {
|
||||
trigger = "with-examples",
|
||||
description = "Builds the examples"
|
||||
}
|
||||
|
||||
configuration "*Static"
|
||||
defines "NAZARA_STATIC"
|
||||
kind "StaticLib"
|
||||
-- Puis par les bibliothèques externes
|
||||
self.ExtLibs = {}
|
||||
local extlibs = os.matchfiles("../extlibs/build/*.lua")
|
||||
for k,v in pairs(extlibs) do
|
||||
local f, err = loadfile(v)
|
||||
if (f) then
|
||||
LIBRARY = {}
|
||||
LIBRARY.ConfigurationLibraries = {}
|
||||
LIBRARY.ConfigurationLibraries.DebugStatic = {}
|
||||
LIBRARY.ConfigurationLibraries.ReleaseStatic = {}
|
||||
LIBRARY.ConfigurationLibraries.DebugDynamic = {}
|
||||
LIBRARY.ConfigurationLibraries.ReleaseDynamic = {}
|
||||
LIBRARY.Defines = {}
|
||||
LIBRARY.Files = {}
|
||||
LIBRARY.FilesExclusion = {}
|
||||
LIBRARY.Flags = {}
|
||||
LIBRARY.Libraries = {}
|
||||
LIBRARY.OsFiles = {}
|
||||
LIBRARY.OsLibraries = {}
|
||||
|
||||
configuration "*DLL"
|
||||
kind "SharedLib"
|
||||
f()
|
||||
|
||||
configuration "DebugStatic"
|
||||
targetsuffix "-s-d"
|
||||
local succeed, err = self:RegisterExternLibrary(LIBRARY)
|
||||
if (not succeed) then
|
||||
print("Unable to register extern library: " .. err)
|
||||
end
|
||||
else
|
||||
print("Unable to load extern library file: " .. err)
|
||||
end
|
||||
end
|
||||
LIBRARY = nil
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
targetsuffix "-s"
|
||||
-- Ensuite nous allons parcourir tous les scripts de modules
|
||||
self.Modules = {}
|
||||
local modules = os.matchfiles("scripts/module/*.lua")
|
||||
for k,v in pairs(modules) do
|
||||
local moduleName = v:match(".*/(.*).lua"):lower()
|
||||
|
||||
configuration "DebugDLL"
|
||||
targetsuffix "-d"
|
||||
if (moduleName ~= "core") then -- exclure le noyau n'aurait aucun sens
|
||||
newoption {
|
||||
trigger = "exclude-" .. moduleName,
|
||||
description = "Exclude the " .. moduleName .. " module from the build system"
|
||||
}
|
||||
end
|
||||
|
||||
configuration "codeblocks or codelite or gmake or xcode3*"
|
||||
buildoptions "-std=c++11" -- On compile en C++11
|
||||
if (_OPTIONS["x64"]) then
|
||||
buildoptions "-m64"
|
||||
if (not _OPTIONS["exclude-" .. moduleName]) then
|
||||
local f, err = loadfile(v)
|
||||
if (f) then
|
||||
MODULE = {}
|
||||
MODULE.ConfigurationLibraries = {}
|
||||
MODULE.ConfigurationLibraries.DebugStatic = {}
|
||||
MODULE.ConfigurationLibraries.ReleaseStatic = {}
|
||||
MODULE.ConfigurationLibraries.DebugDynamic = {}
|
||||
MODULE.ConfigurationLibraries.ReleaseDynamic = {}
|
||||
MODULE.Defines = {}
|
||||
MODULE.ExtLibs = {}
|
||||
MODULE.Files = {}
|
||||
MODULE.FilesExclusion = {}
|
||||
MODULE.Flags = {}
|
||||
MODULE.Libraries = {}
|
||||
MODULE.OsFiles = {}
|
||||
MODULE.OsLibraries = {}
|
||||
|
||||
f()
|
||||
|
||||
local succeed, err = self:RegisterModule(MODULE)
|
||||
if (not succeed) then
|
||||
print("Unable to register module: " .. err)
|
||||
end
|
||||
else
|
||||
print("Unable to load module file: " .. err)
|
||||
end
|
||||
end
|
||||
end
|
||||
MODULE = nil
|
||||
table.sort(self.Modules, function (a, b) return a.Name < b.Name end)
|
||||
|
||||
-- Et ensuite les scripts d'actions possibles
|
||||
self.Actions = {}
|
||||
modules = os.matchfiles("scripts/actions/*.lua")
|
||||
for k,v in pairs(modules) do
|
||||
local f, err = loadfile(v)
|
||||
if (f) then
|
||||
ACTION = {}
|
||||
|
||||
f()
|
||||
|
||||
local succeed, err = self:RegisterAction(ACTION)
|
||||
if (not succeed) then
|
||||
print("Unable to register action: " .. err)
|
||||
end
|
||||
else
|
||||
print("Unable to load action file: " .. err)
|
||||
end
|
||||
end
|
||||
ACTION = nil
|
||||
|
||||
self.Examples = {}
|
||||
local examples = os.matchdirs("../examples/*")
|
||||
for k,v in pairs(examples) do
|
||||
local dirName = v:match(".*/(.*)")
|
||||
if (dirName ~= "bin" and dirName ~= "build") then
|
||||
local f, err = loadfile(v .. "/build.lua")
|
||||
if (f) then
|
||||
EXAMPLE = {}
|
||||
EXAMPLE.ConfigurationLibraries = {}
|
||||
EXAMPLE.ConfigurationLibraries.DebugStatic = {}
|
||||
EXAMPLE.ConfigurationLibraries.ReleaseStatic = {}
|
||||
EXAMPLE.ConfigurationLibraries.DebugDynamic = {}
|
||||
EXAMPLE.ConfigurationLibraries.ReleaseDynamic = {}
|
||||
EXAMPLE.Defines = {}
|
||||
EXAMPLE.Directory = dirName
|
||||
EXAMPLE.Files = {}
|
||||
EXAMPLE.FilesExclusion = {}
|
||||
EXAMPLE.Flags = {}
|
||||
EXAMPLE.Libraries = {}
|
||||
EXAMPLE.OsFiles = {}
|
||||
EXAMPLE.OsLibraries = {}
|
||||
|
||||
f()
|
||||
|
||||
local succeed, err = self:RegisterExample(EXAMPLE)
|
||||
if (not succeed) then
|
||||
print("Unable to register example: " .. err)
|
||||
end
|
||||
else
|
||||
print("Unable to load example file: " .. err)
|
||||
end
|
||||
end
|
||||
end
|
||||
EXAMPLE = nil
|
||||
end
|
||||
|
||||
configuration { "linux or bsd or macosx", "gmake" }
|
||||
buildoptions "-fvisibility=hidden"
|
||||
function NazaraBuild:RegisterAction(actionTable)
|
||||
if (actionTable.Name == nil or type(actionTable.Name) ~= "string") then
|
||||
return false, "Action name is invalid"
|
||||
end
|
||||
|
||||
configuration "vs*"
|
||||
defines "_CRT_SECURE_NO_WARNINGS"
|
||||
defines "_SCL_SECURE_NO_WARNINGS"
|
||||
if (string.len(actionTable.Name) == 0) then
|
||||
return false, "Action name is empty"
|
||||
end
|
||||
|
||||
if (actionTable.Description == nil or type(actionTable.Description) ~= "string") then
|
||||
return false, "Action description is invalid"
|
||||
end
|
||||
|
||||
if (string.len(actionTable.Description) == 0) then
|
||||
return false, "Action description is empty"
|
||||
end
|
||||
|
||||
if (self.Actions[actionTable.name] ~= nil) then
|
||||
return false, "Action name \"" .. actionTable.name .. " is already registred"
|
||||
end
|
||||
|
||||
if (actionTable.Function == nil or type(actionTable.Function) ~= "function") then
|
||||
return false, "Action function is invalid"
|
||||
end
|
||||
|
||||
local actionTrigger = string.lower(actionTable.Name)
|
||||
|
||||
self.Actions[actionTrigger] = actionTable
|
||||
|
||||
newaction
|
||||
{
|
||||
trigger = actionTrigger,
|
||||
description = actionTable.Description,
|
||||
execute = actionTable.Function
|
||||
}
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function NazaraBuild:RegisterExample(exampleTable)
|
||||
if (exampleTable.Name == nil or type(exampleTable.Name) ~= "string") then
|
||||
return false, "Example name is invalid"
|
||||
end
|
||||
|
||||
if (string.len(exampleTable.Name) == 0) then
|
||||
return false, "Example name is empty"
|
||||
end
|
||||
|
||||
if (exampleTable.Files == nil or type(exampleTable.Files) ~= "table") then
|
||||
return false, "Example files table is invalid"
|
||||
end
|
||||
|
||||
if (#exampleTable.Files == 0) then
|
||||
return false, "Example files table is empty"
|
||||
end
|
||||
|
||||
local files = {}
|
||||
for k, file in ipairs(exampleTable.Files) do
|
||||
table.insert(files, "../examples/" .. exampleTable.Directory .. "/" .. file)
|
||||
end
|
||||
exampleTable.Files = files
|
||||
|
||||
local libraries = {}
|
||||
for k, library in ipairs(exampleTable.Libraries) do
|
||||
if (string.sub(library, 1, 6) == "Nazara") then
|
||||
if (_OPTIONS["united"]) then
|
||||
table.insert(exampleTable.ConfigurationLibraries.DebugStatic, "NazaraEngine-s-d")
|
||||
table.insert(exampleTable.ConfigurationLibraries.ReleaseStatic, "NazaraEngine-s")
|
||||
table.insert(exampleTable.ConfigurationLibraries.DebugDynamic, "NazaraEngine-d")
|
||||
table.insert(exampleTable.ConfigurationLibraries.ReleaseDynamic, "NazaraEngine")
|
||||
else
|
||||
table.insert(exampleTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||
table.insert(exampleTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||
table.insert(exampleTable.ConfigurationLibraries.DebugDynamic, library .. "-d")
|
||||
table.insert(exampleTable.ConfigurationLibraries.ReleaseDynamic, library)
|
||||
end
|
||||
else
|
||||
table.insert(libraries, library)
|
||||
end
|
||||
end
|
||||
exampleTable.Libraries = libraries
|
||||
|
||||
for platform, fileTable in ipairs(exampleTable.OsFiles) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,v in ipairs(fileTable) do
|
||||
table.insert(exampleTable.Files, v)
|
||||
end
|
||||
else
|
||||
for k,v in ipairs(fileTable) do
|
||||
table.insert(exampleTable.FilesExclusion, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
exampleTable.OsFiles = nil
|
||||
|
||||
for platform, libraryTable in ipairs(exampleTable.OsLibraries) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,v in ipairs(libraryTable) do
|
||||
table.insert(exampleTable.Libraries, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
exampleTable.OsLibraries = nil
|
||||
|
||||
table.insert(self.Examples, exampleTable)
|
||||
return true
|
||||
end
|
||||
|
||||
function NazaraBuild:RegisterExternLibrary(libTable)
|
||||
if (libTable.Name == nil or type(libTable.Name) ~= "string") then
|
||||
return false, "Module name is invalid"
|
||||
end
|
||||
|
||||
if (string.len(libTable.Name) == 0) then
|
||||
return false, "Module name is empty"
|
||||
end
|
||||
|
||||
if (libTable.Files == nil or type(libTable.Files) ~= "table") then
|
||||
return false, "Module files table is invalid"
|
||||
end
|
||||
|
||||
if (#libTable.Files == 0) then
|
||||
return false, "Module files table is empty"
|
||||
end
|
||||
|
||||
libTable.Libraries = libraries
|
||||
|
||||
for platform, fileTable in pairs(libTable.OsFiles) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,v in pairs(fileTable) do
|
||||
table.insert(libTable.Files, v)
|
||||
end
|
||||
else
|
||||
for k,v in pairs(fileTable) do
|
||||
table.insert(libTable.FilesExclusion, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
libTable.OsFiles = nil
|
||||
|
||||
for platform, libraryTable in pairs(libTable.OsLibraries) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,v in pairs(libraryTable) do
|
||||
table.insert(libTable.Libraries, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
libTable.OsLibraries = nil
|
||||
|
||||
table.insert(self.ExtLibs, libTable)
|
||||
return true
|
||||
end
|
||||
|
||||
function NazaraBuild:RegisterModule(moduleTable)
|
||||
if (moduleTable.Name == nil or type(moduleTable.Name) ~= "string") then
|
||||
return false, "Module name is invalid"
|
||||
end
|
||||
|
||||
if (string.len(moduleTable.Name) == 0) then
|
||||
return false, "Module name is empty"
|
||||
end
|
||||
|
||||
table.insert(moduleTable.Defines, "NAZARA_" .. moduleTable.Name:upper() .. "_BUILD")
|
||||
table.insert(moduleTable.Files, "../include/Nazara/" .. moduleTable.Name .. "/**.hpp")
|
||||
table.insert(moduleTable.Files, "../include/Nazara/" .. moduleTable.Name .. "/**.inl")
|
||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.hpp")
|
||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.inl")
|
||||
table.insert(moduleTable.Files, "../src/Nazara/" .. moduleTable.Name .. "/**.cpp")
|
||||
table.insert(moduleTable.FilesExclusion, "../src/Nazara/" .. moduleTable.Name .. "/Debug/NewOverload.cpp")
|
||||
|
||||
local libraries = {}
|
||||
for k, library in pairs(moduleTable.Libraries) do
|
||||
if (string.sub(library, 1, 6) == "Nazara") then
|
||||
if (not _OPTIONS["united"]) then
|
||||
table.insert(moduleTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||
table.insert(moduleTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||
table.insert(moduleTable.ConfigurationLibraries.DebugDynamic, library .. "-d")
|
||||
table.insert(moduleTable.ConfigurationLibraries.ReleaseDynamic, library)
|
||||
end
|
||||
else
|
||||
local found = false
|
||||
for k,extlibTable in pairs(self.ExtLibs) do
|
||||
if (library == extlibTable.Name) then
|
||||
table.insert(moduleTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||
table.insert(moduleTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||
table.insert(moduleTable.ConfigurationLibraries.DebugDynamic, library .. "-s-d")
|
||||
table.insert(moduleTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
||||
found = true
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if (not found) then
|
||||
table.insert(libraries, library)
|
||||
end
|
||||
end
|
||||
end
|
||||
moduleTable.Libraries = libraries
|
||||
|
||||
for platform, fileTable in pairs(moduleTable.OsFiles) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,v in pairs(fileTable) do
|
||||
table.insert(moduleTable.Files, v)
|
||||
end
|
||||
else
|
||||
for k,v in pairs(fileTable) do
|
||||
table.insert(moduleTable.FilesExclusion, v)
|
||||
end
|
||||
end
|
||||
end
|
||||
moduleTable.OsFiles = nil
|
||||
|
||||
for platform, libraryTable in pairs(moduleTable.OsLibraries) do
|
||||
platform = string.lower(platform)
|
||||
if (platform == "posix") then
|
||||
for k,v in ipairs(PosixOSes) do
|
||||
if (os.is(v)) then
|
||||
platform = v
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (os.is(platform)) then
|
||||
for k,library in pairs(libraryTable) do
|
||||
table.insert(moduleTable.Libraries, library)
|
||||
end
|
||||
end
|
||||
end
|
||||
moduleTable.OsLibraries = nil
|
||||
|
||||
table.insert(self.Modules, moduleTable)
|
||||
return true
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,39 +0,0 @@
|
|||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
-- "DebugStatic",
|
||||
-- "ReleaseStatic",
|
||||
"DebugDLL",
|
||||
"ReleaseDLL"
|
||||
}
|
||||
|
||||
language "C++"
|
||||
location("../examples/build/" .. _ACTION)
|
||||
|
||||
debugdir "../examples/bin"
|
||||
|
||||
includedirs { "../include", "../extlibs/include" }
|
||||
|
||||
libdirs "../lib"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
defines "NAZARA_PLATFORM_x64"
|
||||
libdirs "../extlibs/lib/x64"
|
||||
else
|
||||
libdirs "../extlibs/lib/x86"
|
||||
end
|
||||
|
||||
targetdir "../examples/bin"
|
||||
|
||||
configuration "Debug*"
|
||||
defines "NAZARA_DEBUG"
|
||||
flags "Symbols"
|
||||
|
||||
configuration "Release*"
|
||||
flags { "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
|
||||
configuration "*Static"
|
||||
defines "NAZARA_STATIC"
|
||||
|
||||
configuration "codeblocks or codelite or gmake or xcode3*"
|
||||
buildoptions "-std=c++11"
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
-- Configuration générale
|
||||
configurations
|
||||
{
|
||||
"Debug",
|
||||
"Release"
|
||||
}
|
||||
|
||||
location("../extlibs/build/" .. _ACTION)
|
||||
includedirs "../extlibs/include"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
targetdir "../extlibs/lib/x64"
|
||||
else
|
||||
targetdir "../extlibs/lib/x86"
|
||||
end
|
||||
|
||||
configuration "Debug"
|
||||
flags "Symbols"
|
||||
targetsuffix "-d"
|
||||
|
||||
configuration "Release"
|
||||
flags { "EnableSSE", "EnableSSE2", "Optimize", "OptimizeSpeed", "NoFramePointer", "NoRTTI" }
|
||||
|
||||
-- Activation du SSE côté GCC
|
||||
configuration { "Release*", "codeblocks or codelite or gmake or xcode3*" }
|
||||
buildoptions "-mfpmath=sse"
|
||||
|
||||
if (_OPTIONS["x64"]) then
|
||||
configuration "codeblocks or codelite or gmake or xcode3*"
|
||||
buildoptions "-m64"
|
||||
end
|
||||
|
|
@ -1,38 +1,20 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraAudio"
|
||||
end
|
||||
MODULE.Name = "Audio"
|
||||
|
||||
defines "NAZARA_AUDIO_BUILD"
|
||||
defines "NAZARA_AUDIO_OPENAL"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Audio/**.hpp",
|
||||
"../include/Nazara/Audio/**.inl",
|
||||
"../src/Nazara/Audio/**.hpp",
|
||||
"../src/Nazara/Audio/**.cpp"
|
||||
MODULE.Defines = {
|
||||
"NAZARA_AUDIO_OPENAL"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Audio/Posix/*.hpp", "../src/Nazara/Audio/Posix/*.cpp" }
|
||||
links "sndfile-1"
|
||||
else
|
||||
excludes { "../src/Nazara/Audio/Win32/*.hpp", "../src/Nazara/Audio/Win32/*.cpp" }
|
||||
-- Link posix ?
|
||||
end
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"sndfile-1"
|
||||
}
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Audio/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Audio/Win32/**.hpp",
|
||||
"../src/Nazara/Audio/Win32/**.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
end
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Audio/Posix/**.hpp",
|
||||
"../src/Nazara/Audio/Posix/**.cpp"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,22 +1,17 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraCore"
|
||||
end
|
||||
MODULE.Name = "Core"
|
||||
|
||||
defines "NAZARA_CORE_BUILD"
|
||||
|
||||
files
|
||||
{
|
||||
MODULE.Files = { -- Les autres fichiers seront ajoutés automatiquement
|
||||
"../include/Nazara/Prerequesites.hpp",
|
||||
"../include/Nazara/Core/**.hpp",
|
||||
"../include/Nazara/Core/**.inl",
|
||||
"../include/Nazara/Math/**.hpp",
|
||||
"../include/Nazara/Math/**.inl",
|
||||
"../src/Nazara/Core/**.hpp",
|
||||
"../src/Nazara/Core/**.cpp"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Core/Posix/**.hpp", "../src/Nazara/Core/Posix/**.cpp" }
|
||||
else
|
||||
excludes { "../src/Nazara/Core/Win32/**.hpp", "../src/Nazara/Core/Win32/**.cpp" }
|
||||
end
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Core/Win32/**.hpp",
|
||||
"../src/Nazara/Core/Win32/**.cpp"
|
||||
}
|
||||
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Core/Posix/**.hpp",
|
||||
"../src/Nazara/Core/Posix/**.cpp"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraGraphics"
|
||||
end
|
||||
MODULE.Name = "Graphics"
|
||||
|
||||
<<<<<<< HEAD
|
||||
defines "NAZARA_GRAPHICS_BUILD"
|
||||
|
||||
files
|
||||
|
|
@ -10,34 +9,10 @@ files
|
|||
"../include/Nazara/Graphics/**.inl",
|
||||
"../src/Nazara/Graphics/**.hpp",
|
||||
"../src/Nazara/Graphics/**.cpp"
|
||||
=======
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility",
|
||||
"NazaraRenderer"
|
||||
>>>>>>> origin/BuildSystem-Update
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Graphics/Posix/*.hpp", "../src/Nazara/Graphics/Posix/*.cpp" }
|
||||
else
|
||||
excludes { "../src/Nazara/Graphics/Win32/*.hpp", "../src/Nazara/Graphics/Win32/*.cpp" }
|
||||
end
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Graphics/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
links "NazaraUtility-s-d"
|
||||
links "NazaraRenderer-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
links "NazaraUtility-s"
|
||||
links "NazaraRenderer-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
links "NazaraUtility-d"
|
||||
links "NazaraRenderer-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
links "NazaraUtility"
|
||||
links "NazaraRenderer"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,41 +1,7 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraLua"
|
||||
end
|
||||
-- Quelle ironie
|
||||
MODULE.Name = "Lua"
|
||||
|
||||
defines "NAZARA_LUA_BUILD"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Lua/**.hpp",
|
||||
"../include/Nazara/Lua/**.inl",
|
||||
"../src/Nazara/Lua/**.hpp",
|
||||
"../src/Nazara/Lua/**.cpp"
|
||||
MODULE.Libraries = {
|
||||
"lua",
|
||||
"NazaraCore"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Lua/Posix/*.hpp", "../src/Nazara/Lua/Posix/*.cpp" }
|
||||
else
|
||||
excludes { "../src/Nazara/Lua/Win32/*.hpp", "../src/Nazara/Lua/Win32/*.cpp" }
|
||||
end
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Lua/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
end
|
||||
|
||||
configuration "Debug*"
|
||||
links "lua-s-d"
|
||||
|
||||
configuration "Release*"
|
||||
links "lua-s"
|
||||
|
|
|
|||
|
|
@ -1,35 +1,5 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraNoise"
|
||||
end
|
||||
MODULE.Name = "Noise"
|
||||
|
||||
defines "NAZARA_NOISE_BUILD"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Noise/**.hpp",
|
||||
"../include/Nazara/Noise/**.inl",
|
||||
"../src/Nazara/Noise/**.hpp",
|
||||
"../src/Nazara/Noise/**.cpp"
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Noise/Posix/*.hpp", "../src/Nazara/Noise/Posix/*.cpp" }
|
||||
else
|
||||
excludes { "../src/Nazara/Noise/Win32/*.hpp", "../src/Nazara/Noise/Win32/*.cpp" }
|
||||
end
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Noise/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,41 +1,6 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraPhysics"
|
||||
end
|
||||
MODULE.Name = "Physics"
|
||||
|
||||
defines "NAZARA_PHYSICS_BUILD"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Physics/**.hpp",
|
||||
"../include/Nazara/Physics/**.inl",
|
||||
"../src/Nazara/Physics/**.hpp",
|
||||
"../src/Nazara/Physics/**.cpp"
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"newton"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Physics/Posix/*.hpp", "../src/Nazara/Physics/Posix/*.cpp" }
|
||||
else
|
||||
excludes { "../src/Nazara/Physics/Win32/*.hpp", "../src/Nazara/Physics/Win32/*.cpp" }
|
||||
end
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Physics/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
end
|
||||
|
||||
configuration "Debug*"
|
||||
links "newton_d"
|
||||
|
||||
configuration "Release*"
|
||||
links "newton"
|
||||
|
|
|
|||
|
|
@ -1,43 +1,26 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraRenderer"
|
||||
end
|
||||
MODULE.Name = "Renderer"
|
||||
|
||||
defines "NAZARA_RENDERER_BUILD"
|
||||
defines "NAZARA_RENDERER_OPENGL"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Renderer/**.hpp",
|
||||
"../include/Nazara/Renderer/**.inl",
|
||||
"../src/Nazara/Renderer/**.hpp",
|
||||
"../src/Nazara/Renderer/**.cpp"
|
||||
MODULE.Defines = {
|
||||
"NAZARA_RENDERER_OPENGL"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Renderer/Posix/*.hpp", "../src/Nazara/Renderer/Posix/*.cpp" }
|
||||
links "gdi32"
|
||||
links "opengl32"
|
||||
links "winmm"
|
||||
else
|
||||
excludes { "../src/Nazara/Renderer/Win32/*.hpp", "../src/Nazara/Renderer/Win32/*.cpp" }
|
||||
end
|
||||
MODULE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Renderer/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
links "NazaraUtility-s-d"
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Renderer/Win32/**.hpp",
|
||||
"../src/Nazara/Renderer/Win32/**.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
links "NazaraUtility-s"
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Renderer/Posix/**.hpp",
|
||||
"../src/Nazara/Renderer/Posix/**.cpp"
|
||||
}
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
links "NazaraUtility-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
links "NazaraUtility"
|
||||
end
|
||||
MODULE.OsLibraries.Windows = {
|
||||
"gdi32",
|
||||
"opengl32",
|
||||
"winmm"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,44 +1,22 @@
|
|||
if (not _OPTIONS["united"]) then
|
||||
project "NazaraUtility"
|
||||
end
|
||||
MODULE.Name = "Utility"
|
||||
|
||||
defines "NAZARA_UTILITY_BUILD"
|
||||
|
||||
files
|
||||
{
|
||||
"../include/Nazara/Utility/**.hpp",
|
||||
"../include/Nazara/Utility/**.inl",
|
||||
"../src/Nazara/Utility/**.hpp",
|
||||
"../src/Nazara/Utility/**.cpp"
|
||||
MODULE.Libraries = {
|
||||
"freetype-s",
|
||||
"NazaraCore",
|
||||
"stb_image"
|
||||
}
|
||||
|
||||
links "freetype-s"
|
||||
MODULE.OsFiles.Windows = {
|
||||
"../src/Nazara/Utility/Win32/**.hpp",
|
||||
"../src/Nazara/Utility/Win32/**.cpp"
|
||||
}
|
||||
|
||||
if (os.is("windows")) then
|
||||
excludes { "../src/Nazara/Utility/Posix/*.hpp", "../src/Nazara/Utility/Posix/*.cpp" }
|
||||
links "gdi32"
|
||||
else
|
||||
excludes { "../src/Nazara/Utility/Win32/*.hpp", "../src/Nazara/Utility/Win32/*.cpp" }
|
||||
end
|
||||
MODULE.OsFiles.Posix = {
|
||||
"../src/Nazara/Utility/Posix/**.hpp",
|
||||
"../src/Nazara/Utility/Posix/**.cpp"
|
||||
}
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
excludes "../src/Nazara/Utility/Debug/NewOverload.cpp"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraCore-s-d"
|
||||
MODULE.OsLibraries.Windows = {
|
||||
"gdi32"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraCore"
|
||||
end
|
||||
|
||||
configuration "Debug*"
|
||||
links "stb_image-s-d"
|
||||
|
||||
configuration "Release*"
|
||||
links "stb_image-s"
|
||||
|
|
|
|||
|
|
@ -1,37 +1,13 @@
|
|||
kind "ConsoleApp"
|
||||
EXAMPLE.Name = "DopplerEffect"
|
||||
|
||||
files "main.cpp"
|
||||
EXAMPLE.Console = true
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
configuration "DebugStatic"
|
||||
links "NazaraEngine-s-d"
|
||||
EXAMPLE.Files = {
|
||||
"main.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraEngine-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraEngine-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraEngine"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraAudio-s-d"
|
||||
links "NazaraUtility-s-d"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraAudio-s"
|
||||
links "NazaraUtility-s"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraAudio-d"
|
||||
links "NazaraUtility-d"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraAudio"
|
||||
links "NazaraUtility"
|
||||
links "NazaraCore"
|
||||
end
|
||||
EXAMPLE.Libraries = {
|
||||
"NazaraAudio",
|
||||
"NazaraCore",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
|
@ -1,41 +1,14 @@
|
|||
kind "ConsoleApp"
|
||||
EXAMPLE.Name = "FirstScene"
|
||||
|
||||
files "main.cpp"
|
||||
EXAMPLE.Console = true
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
configuration "DebugStatic"
|
||||
links "NazaraEngine-s-d"
|
||||
EXAMPLE.Files = {
|
||||
"main.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraEngine-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraEngine-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraEngine"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraGraphics-s-d"
|
||||
links "NazaraRenderer-s-d"
|
||||
links "NazaraUtility-s-d"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraGraphics-s"
|
||||
links "NazaraRenderer-s"
|
||||
links "NazaraUtility-s"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraGraphics-d"
|
||||
links "NazaraRenderer-d"
|
||||
links "NazaraUtility-d"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraGraphics"
|
||||
links "NazaraRenderer"
|
||||
links "NazaraUtility"
|
||||
links "NazaraCore"
|
||||
end
|
||||
EXAMPLE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraGraphics",
|
||||
"NazaraRenderer",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,17 @@
|
|||
kind "ConsoleApp"
|
||||
EXAMPLE.Name = "HardwareInfo"
|
||||
|
||||
defines "NAZARA_RENDERER_OPENGL"
|
||||
EXAMPLE.Console = true
|
||||
|
||||
files "main.cpp"
|
||||
EXAMPLE.Defines = {
|
||||
"NAZARA_RENDERER_OPENGL"
|
||||
}
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
configuration "DebugStatic"
|
||||
links "NazaraEngine-s-d"
|
||||
EXAMPLE.Files = {
|
||||
"main.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraEngine-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraEngine-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraEngine"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraRenderer-s-d"
|
||||
links "NazaraUtility-s-d"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraRenderer-s"
|
||||
links "NazaraUtility-s"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraRenderer-d"
|
||||
links "NazaraUtility-d"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraRenderer"
|
||||
links "NazaraUtility"
|
||||
links "NazaraCore"
|
||||
end
|
||||
EXAMPLE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraRenderer",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,13 @@
|
|||
kind "ConsoleApp"
|
||||
EXAMPLE.Name = "MeshInfos"
|
||||
|
||||
files "main.cpp"
|
||||
EXAMPLE.Console = true
|
||||
|
||||
if (_OPTIONS["united"]) then
|
||||
configuration "DebugStatic"
|
||||
links "NazaraEngine-s-d"
|
||||
EXAMPLE.Files = {
|
||||
"main.cpp"
|
||||
}
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraEngine-s"
|
||||
EXAMPLE.Libraries = {
|
||||
"NazaraCore",
|
||||
"NazaraUtility"
|
||||
}
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraEngine-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraEngine"
|
||||
else
|
||||
configuration "DebugStatic"
|
||||
links "NazaraUtility-s-d"
|
||||
links "NazaraCore-s-d"
|
||||
|
||||
configuration "ReleaseStatic"
|
||||
links "NazaraUtility-s"
|
||||
links "NazaraCore-s"
|
||||
|
||||
configuration "DebugDLL"
|
||||
links "NazaraUtility-d"
|
||||
links "NazaraCore-d"
|
||||
|
||||
configuration "ReleaseDLL"
|
||||
links "NazaraUtility"
|
||||
links "NazaraCore"
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue