Build: Upgrade to Premake5-alpha10, get rid of Premake4
This commit is contained in:
parent
5aeb9f8d59
commit
88000ab2e4
|
|
@ -1 +1 @@
|
||||||
premake4 codeblocks
|
premake5 codeblocks
|
||||||
|
|
@ -1,6 +1,4 @@
|
||||||
if (PremakeVersion >= 50) then
|
dofile("codeblocks/_codeblocks.lua")
|
||||||
dofile("codeblocks/_codeblocks.lua")
|
dofile("codeblocks/codeblocks.lua")
|
||||||
dofile("codeblocks/codeblocks.lua")
|
|
||||||
end
|
|
||||||
|
|
||||||
ACTION.Manual = true
|
ACTION.Manual = true
|
||||||
|
|
|
||||||
|
|
@ -9,27 +9,103 @@ function NazaraBuild:AddInstallPath(path)
|
||||||
self.InstallDir[path] = true
|
self.InstallDir[path] = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function NazaraBuild:FilterLibDirectory(prefix, func)
|
||||||
|
filter({"action:codeblocks or codelite or gmake", "architecture:x86", "system:Windows"})
|
||||||
|
func(prefix .. "mingw/x86")
|
||||||
|
|
||||||
|
filter({"action:codeblocks or codelite or gmake", "architecture:x86_64", "system:Windows"})
|
||||||
|
func(prefix .. "mingw/x64")
|
||||||
|
|
||||||
|
filter({"action:codeblocks or codelite or gmake", "architecture:x86", "system:not Windows"})
|
||||||
|
func(prefix .. "gmake/x86")
|
||||||
|
|
||||||
|
filter({"action:codeblocks or codelite or gmake", "architecture:x86_64", "system:not Windows"})
|
||||||
|
func(prefix .. "gmake/x64")
|
||||||
|
|
||||||
|
filter({"action:vs*", "architecture:x86"})
|
||||||
|
func(prefix .. "msvc/x86")
|
||||||
|
|
||||||
|
filter({"action:vs*", "architecture:x86_64"})
|
||||||
|
func(prefix .. "msvc/x64")
|
||||||
|
|
||||||
|
filter({"action:xcode3 or xcode4", "architecture:x86"})
|
||||||
|
func(prefix .. "xcode/x86")
|
||||||
|
|
||||||
|
filter({"action:xcode3 or xcode4", "architecture:x86_64"})
|
||||||
|
func(prefix .. "xcode/x64")
|
||||||
|
|
||||||
|
filter({})
|
||||||
|
end
|
||||||
|
|
||||||
function NazaraBuild:Execute()
|
function NazaraBuild:Execute()
|
||||||
if (_ACTION == nil) then -- Si aucune action n'est spécifiée
|
if (_ACTION == nil) then -- If no action is specified, the user probably only wants to know how all of this works
|
||||||
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
return -- Alors l'utilisateur voulait probablement savoir comment utiliser le programme, on ne fait rien
|
||||||
end
|
end
|
||||||
|
|
||||||
if (PremakeVersion >= 50) then
|
|
||||||
filter { "kind:SharedLib", "action:codeblocks or codelite or gmake or xcode3 or xcode4" }
|
local clangGccActions = "action:" .. table.concat({"codeblocks", "codelite", "gmake", "xcode3", "xcode4"}, " or ")
|
||||||
implibprefix "lib"
|
|
||||||
implibextension ".a"
|
|
||||||
end
|
|
||||||
|
|
||||||
local platformData
|
local platformData
|
||||||
if (os.is64bit()) then
|
if (os.is64bit()) then
|
||||||
platformData = {"x64", "x32"}
|
platformData = {"x64", "x86"}
|
||||||
else
|
else
|
||||||
platformData = {"x32", "x64"}
|
platformData = {"x86", "x64"}
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.Actions[_ACTION] == nil) then
|
flags({
|
||||||
local makeLibDir = os.is("windows") and "mingw" or "gmake"
|
"C++14",
|
||||||
|
"MultiProcessorCompile",
|
||||||
|
"NoMinimalRebuild"
|
||||||
|
})
|
||||||
|
|
||||||
|
self:FilterLibDirectory("../extlibs/lib/", libdirs)
|
||||||
|
|
||||||
|
-- Fixes Premake stuff
|
||||||
|
filter({"kind:SharedLib", clangGccActions})
|
||||||
|
implibprefix("lib")
|
||||||
|
filter({"kind:*Lib", clangGccActions, "system:Windows"})
|
||||||
|
implibextension(".a")
|
||||||
|
filter({"kind:StaticLib", clangGccActions})
|
||||||
|
targetextension(".a")
|
||||||
|
targetprefix("lib")
|
||||||
|
|
||||||
|
-- General configuration
|
||||||
|
filter("kind:*Lib")
|
||||||
|
pic("On")
|
||||||
|
|
||||||
|
filter({"kind:*Lib", "configurations:DebugStatic"})
|
||||||
|
targetsuffix("-s-d")
|
||||||
|
|
||||||
|
filter({"kind:*Lib", "configurations:ReleaseStatic"})
|
||||||
|
targetsuffix("-s")
|
||||||
|
|
||||||
|
filter({"kind:*Lib", "configurations:DebugDynamic"})
|
||||||
|
targetsuffix("-d")
|
||||||
|
|
||||||
|
filter("configurations:Debug*")
|
||||||
|
symbols("On")
|
||||||
|
|
||||||
|
-- Setup some optimizations for release
|
||||||
|
filter("configurations:Release*")
|
||||||
|
flags("NoFramePointer")
|
||||||
|
optimize("Speed")
|
||||||
|
rtti("Off")
|
||||||
|
vectorextensions("SSE2")
|
||||||
|
|
||||||
|
filter("configurations:*Static")
|
||||||
|
kind("StaticLib")
|
||||||
|
|
||||||
|
filter("configurations:*Dynamic")
|
||||||
|
kind("SharedLib")
|
||||||
|
|
||||||
|
-- Enable SSE math and vectorization optimizations
|
||||||
|
filter({"configurations:Release*", clangGccActions})
|
||||||
|
buildoptions("-mfpmath=sse")
|
||||||
|
buildoptions("-ftree-vectorize")
|
||||||
|
|
||||||
|
filter({})
|
||||||
|
|
||||||
|
if (self.Actions[_ACTION] == nil) then
|
||||||
if (self.Config["BuildDependencies"]) then
|
if (self.Config["BuildDependencies"]) then
|
||||||
workspace("NazaraExtlibs")
|
workspace("NazaraExtlibs")
|
||||||
platforms(platformData)
|
platforms(platformData)
|
||||||
|
|
@ -40,63 +116,18 @@ function NazaraBuild:Execute()
|
||||||
"ReleaseStatic"
|
"ReleaseStatic"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
self:FilterLibDirectory("../extlibs/lib/", targetdir)
|
||||||
|
|
||||||
|
filter(clangGccActions)
|
||||||
|
buildoptions("-U__STRICT_ANSI__")
|
||||||
|
|
||||||
|
filter({})
|
||||||
|
|
||||||
includedirs("../extlibs/include")
|
includedirs("../extlibs/include")
|
||||||
libdirs("../extlibs/lib/common")
|
libdirs("../extlibs/lib/common")
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
|
||||||
targetdir("../extlibs/lib/" .. makeLibDir .. "/x86")
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x64")
|
|
||||||
targetdir("../extlibs/lib/" .. makeLibDir .. "/x64")
|
|
||||||
|
|
||||||
configuration("vs*")
|
|
||||||
buildoptions({"/MP", "/bigobj"}) -- Multiprocessus build and big .obj
|
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
|
||||||
targetdir("../extlibs/lib/msvc/x86")
|
|
||||||
|
|
||||||
configuration({"vs*", "x64"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x64")
|
|
||||||
targetdir("../extlibs/lib/msvc/x64")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
|
||||||
targetdir("../extlibs/lib/xcode/x86")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x64"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x64")
|
|
||||||
targetdir("../extlibs/lib/xcode/x64")
|
|
||||||
|
|
||||||
configuration("Debug*")
|
|
||||||
flags("Symbols")
|
|
||||||
|
|
||||||
configuration("Release*")
|
|
||||||
flags("NoFramePointer")
|
|
||||||
optimize("Speed")
|
|
||||||
rtti("Off")
|
|
||||||
vectorextensions("SSE2")
|
|
||||||
|
|
||||||
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({"not windows", "codeblocks or codelite or gmake or xcode3 or xcode4"})
|
|
||||||
buildoptions("-fPIC")
|
|
||||||
|
|
||||||
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
|
||||||
buildoptions({"-std=c++14", "-U__STRICT_ANSI__"})
|
|
||||||
|
|
||||||
for k, libTable in ipairs(self.OrderedExtLibs) do
|
for k, libTable in ipairs(self.OrderedExtLibs) do
|
||||||
project(libTable.Name)
|
project(libTable.Name)
|
||||||
|
|
||||||
|
|
@ -111,25 +142,44 @@ function NazaraBuild:Execute()
|
||||||
includedirs(libTable.Includes)
|
includedirs(libTable.Includes)
|
||||||
links(libTable.Libraries)
|
links(libTable.Libraries)
|
||||||
|
|
||||||
configuration("x32")
|
filter("architecture:x86")
|
||||||
libdirs(libTable.LibraryPaths.x86)
|
libdirs(libTable.LibraryPaths.x86)
|
||||||
|
|
||||||
configuration("x64")
|
filter("architecture:x86_64")
|
||||||
libdirs(libTable.LibraryPaths.x64)
|
libdirs(libTable.LibraryPaths.x64)
|
||||||
|
|
||||||
for k,v in pairs(libTable.ConfigurationLibraries) do
|
for k,v in pairs(libTable.ConfigurationLibraries) do
|
||||||
configuration(k)
|
filter(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
filter({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- General settings
|
||||||
|
filter("architecture:x86_64")
|
||||||
|
defines("NAZARA_PLATFORM_x64")
|
||||||
|
|
||||||
|
filter("configurations:Debug*")
|
||||||
|
defines("NAZARA_DEBUG")
|
||||||
|
|
||||||
|
filter("configurations:*Static")
|
||||||
|
defines("NAZARA_STATIC")
|
||||||
|
|
||||||
|
filter("kind:*Lib")
|
||||||
|
defines("NAZARA_BUILD")
|
||||||
|
|
||||||
|
filter({"system:not Windows", clangGccActions})
|
||||||
|
buildoptions("-fvisibility=hidden")
|
||||||
|
|
||||||
|
-- Add lib/conf/arch to library search path
|
||||||
|
self:FilterLibDirectory("../lib/", libdirs)
|
||||||
|
|
||||||
|
-- Start defining projects
|
||||||
workspace("NazaraEngine")
|
workspace("NazaraEngine")
|
||||||
platforms(platformData)
|
platforms(platformData)
|
||||||
|
|
||||||
-- Configuration générale
|
|
||||||
configurations({
|
configurations({
|
||||||
-- "DebugStatic",
|
-- "DebugStatic",
|
||||||
-- "ReleaseStatic",
|
-- "ReleaseStatic",
|
||||||
|
|
@ -140,36 +190,13 @@ function NazaraBuild:Execute()
|
||||||
language("C++")
|
language("C++")
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
|
|
||||||
configuration("Debug*")
|
|
||||||
defines("NAZARA_DEBUG")
|
|
||||||
flags("Symbols")
|
|
||||||
|
|
||||||
configuration("Release*")
|
|
||||||
flags("NoFramePointer")
|
|
||||||
optimize("Speed")
|
|
||||||
vectorextensions("SSE2")
|
|
||||||
|
|
||||||
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++14")
|
|
||||||
|
|
||||||
configuration({"linux or bsd or macosx", "gmake"})
|
|
||||||
buildoptions("-fvisibility=hidden")
|
|
||||||
|
|
||||||
configuration("vs*")
|
configuration("vs*")
|
||||||
buildoptions({"/MP", "/bigobj"}) -- Multiprocessus build and big .obj
|
buildoptions({"/MP", "/bigobj"}) -- Multiprocessus build and big .obj
|
||||||
flags("NoMinimalRebuild")
|
flags("NoMinimalRebuild")
|
||||||
defines("_CRT_SECURE_NO_WARNINGS")
|
defines("_CRT_SECURE_NO_WARNINGS")
|
||||||
defines("_SCL_SECURE_NO_WARNINGS")
|
defines("_SCL_SECURE_NO_WARNINGS")
|
||||||
|
|
||||||
|
-- Modules
|
||||||
-- Spécification des modules
|
|
||||||
if (_OPTIONS["united"]) then
|
if (_OPTIONS["united"]) then
|
||||||
project("NazaraEngine")
|
project("NazaraEngine")
|
||||||
end
|
end
|
||||||
|
|
@ -181,78 +208,12 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
location(_ACTION .. "/modules")
|
location(_ACTION .. "/modules")
|
||||||
|
|
||||||
defines("NAZARA_BUILD")
|
|
||||||
|
|
||||||
includedirs({
|
includedirs({
|
||||||
"../include",
|
"../include",
|
||||||
"../src/",
|
"../src/",
|
||||||
"../extlibs/include"
|
"../extlibs/include"
|
||||||
})
|
})
|
||||||
|
|
||||||
libdirs("../lib")
|
|
||||||
libdirs("../extlibs/lib/common")
|
|
||||||
|
|
||||||
configuration("x32")
|
|
||||||
libdirs(moduleTable.LibraryPaths.x86)
|
|
||||||
|
|
||||||
configuration("x64")
|
|
||||||
defines("NAZARA_PLATFORM_x64")
|
|
||||||
libdirs(moduleTable.LibraryPaths.x64)
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
|
||||||
targetdir("../lib/" .. makeLibDir .. "/x86")
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x64")
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x64")
|
|
||||||
targetdir("../lib/" .. makeLibDir .. "/x64")
|
|
||||||
|
|
||||||
-- Copy the module binaries to the example folder
|
|
||||||
self:MakeInstallCommands(moduleTable)
|
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
|
||||||
libdirs("../lib/msvc/x86")
|
|
||||||
targetdir("../lib/msvc/x86")
|
|
||||||
|
|
||||||
configuration({"vs*", "x64"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x64")
|
|
||||||
libdirs("../lib/msvc/x64")
|
|
||||||
targetdir("../lib/msvc/x64")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
|
||||||
libdirs("../lib/xcode/x86")
|
|
||||||
targetdir("../lib/xcode/x86")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x64"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x64")
|
|
||||||
libdirs("../lib/xcode/x64")
|
|
||||||
targetdir("../lib/xcode/x64")
|
|
||||||
|
|
||||||
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("Release*")
|
|
||||||
rtti(moduleTable.EnableRTTI and "On" or "Off")
|
|
||||||
|
|
||||||
configuration({})
|
|
||||||
|
|
||||||
files(moduleTable.Files)
|
files(moduleTable.Files)
|
||||||
excludes(moduleTable.FilesExcluded)
|
excludes(moduleTable.FilesExcluded)
|
||||||
|
|
||||||
|
|
@ -261,6 +222,23 @@ function NazaraBuild:Execute()
|
||||||
includedirs(moduleTable.Includes)
|
includedirs(moduleTable.Includes)
|
||||||
links(moduleTable.Libraries)
|
links(moduleTable.Libraries)
|
||||||
|
|
||||||
|
libdirs({
|
||||||
|
"../extlibs/lib/common",
|
||||||
|
"../lib"
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Output to lib/conf/arch
|
||||||
|
self:FilterLibDirectory("../lib/", targetdir)
|
||||||
|
|
||||||
|
-- Copy the module binaries to the example folder
|
||||||
|
self:MakeInstallCommands(moduleTable)
|
||||||
|
|
||||||
|
filter("architecture:x86")
|
||||||
|
libdirs(moduleTable.LibraryPaths.x86)
|
||||||
|
|
||||||
|
filter("architecture:x86_64")
|
||||||
|
libdirs(moduleTable.LibraryPaths.x64)
|
||||||
|
|
||||||
for k,v in pairs(moduleTable.ConfigurationLibraries) do
|
for k,v in pairs(moduleTable.ConfigurationLibraries) do
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
|
|
@ -294,7 +272,7 @@ function NazaraBuild:Execute()
|
||||||
kind("WindowedApp")
|
kind("WindowedApp")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
assert(false, "Invalid tool Kind")
|
assert(false, "Invalid tool kind")
|
||||||
end
|
end
|
||||||
|
|
||||||
includedirs({
|
includedirs({
|
||||||
|
|
@ -302,94 +280,10 @@ function NazaraBuild:Execute()
|
||||||
"../extlibs/include"
|
"../extlibs/include"
|
||||||
})
|
})
|
||||||
|
|
||||||
libdirs("../lib")
|
libdirs({
|
||||||
libdirs("../extlibs/lib/common")
|
"../extlibs/lib/common",
|
||||||
|
"../lib"
|
||||||
configuration("x32")
|
})
|
||||||
libdirs(toolTable.LibraryPaths.x86)
|
|
||||||
|
|
||||||
configuration("x64")
|
|
||||||
defines("NAZARA_PLATFORM_x64")
|
|
||||||
libdirs(toolTable.LibraryPaths.x64)
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x86")
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/" .. makeLibDir .. "/x86")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/" .. makeLibDir .. "/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
|
||||||
libdirs("../extlibs/lib/" .. makeLibDir .. "/x64")
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x64")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/" .. makeLibDir .. "/x64")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/" .. makeLibDir .. "/x64")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x86")
|
|
||||||
libdirs("../lib/msvc/x86")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/msvc/x86")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/msvc/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"vs*", "x64"})
|
|
||||||
libdirs("../extlibs/lib/msvc/x64")
|
|
||||||
libdirs("../lib/msvc/x64")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/msvc/x64")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/msvc/x64")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x86")
|
|
||||||
libdirs("../lib/xcode/x86")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/xcode/x86")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/xcode/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x64"})
|
|
||||||
libdirs("../extlibs/lib/xcode/x64")
|
|
||||||
libdirs("../lib/xcode/x64")
|
|
||||||
if (toolTable.Kind == "library") then
|
|
||||||
targetdir(toolTable.TargetDirectory .. "/xcode/x64")
|
|
||||||
elseif (toolTable.Kind == "plugin") then
|
|
||||||
targetdir("../plugins/lib/xcode/x64")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration("*Static")
|
|
||||||
defines("NAZARA_STATIC")
|
|
||||||
|
|
||||||
configuration("Release*")
|
|
||||||
rtti(toolTable.EnableRTTI and "On" or "Off")
|
|
||||||
|
|
||||||
if (toolTable.Kind == "library" or toolTable.Kind == "plugin") then
|
|
||||||
configuration("*Static")
|
|
||||||
kind("StaticLib")
|
|
||||||
|
|
||||||
configuration("*Dynamic")
|
|
||||||
kind("SharedLib")
|
|
||||||
|
|
||||||
configuration("DebugStatic")
|
|
||||||
targetsuffix("-s-d")
|
|
||||||
|
|
||||||
configuration("ReleaseStatic")
|
|
||||||
targetsuffix("-s")
|
|
||||||
|
|
||||||
configuration("DebugDynamic")
|
|
||||||
targetsuffix("-d")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({})
|
|
||||||
|
|
||||||
files(toolTable.Files)
|
files(toolTable.Files)
|
||||||
excludes(toolTable.FilesExcluded)
|
excludes(toolTable.FilesExcluded)
|
||||||
|
|
@ -399,12 +293,25 @@ function NazaraBuild:Execute()
|
||||||
includedirs(toolTable.Includes)
|
includedirs(toolTable.Includes)
|
||||||
links(toolTable.Libraries)
|
links(toolTable.Libraries)
|
||||||
|
|
||||||
|
-- Output to lib/conf/arch
|
||||||
|
if (toolTable.Kind == "library") then
|
||||||
|
self:FilterLibDirectory(toolTable.TargetDirectory .. "/", targetdir)
|
||||||
|
elseif (toolTable.Kind == "plugin") then
|
||||||
|
self:FilterLibDirectory("../plugins/lib/", targetdir)
|
||||||
|
end
|
||||||
|
|
||||||
|
filter("architecture:x86")
|
||||||
|
libdirs(toolTable.LibraryPaths.x86)
|
||||||
|
|
||||||
|
filter("architecture:x86_64")
|
||||||
|
libdirs(toolTable.LibraryPaths.x64)
|
||||||
|
|
||||||
for k,v in pairs(toolTable.ConfigurationLibraries) do
|
for k,v in pairs(toolTable.ConfigurationLibraries) do
|
||||||
configuration(k)
|
filter(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
filter({})
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, exampleTable in ipairs(self.OrderedExamples) do
|
for k, exampleTable in ipairs(self.OrderedExamples) do
|
||||||
|
|
@ -435,7 +342,6 @@ function NazaraBuild:Execute()
|
||||||
"../extlibs/include"
|
"../extlibs/include"
|
||||||
})
|
})
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
targetdir(destPath)
|
|
||||||
|
|
||||||
files(exampleTable.Files)
|
files(exampleTable.Files)
|
||||||
excludes(exampleTable.FilesExcluded)
|
excludes(exampleTable.FilesExcluded)
|
||||||
|
|
@ -444,41 +350,14 @@ function NazaraBuild:Execute()
|
||||||
flags(exampleTable.Flags)
|
flags(exampleTable.Flags)
|
||||||
includedirs(exampleTable.Includes)
|
includedirs(exampleTable.Includes)
|
||||||
links(exampleTable.Libraries)
|
links(exampleTable.Libraries)
|
||||||
|
targetdir(destPath)
|
||||||
configuration("Release*")
|
|
||||||
rtti(exampleTable.EnableRTTI and "On" or "Off")
|
|
||||||
|
|
||||||
configuration("x32")
|
|
||||||
libdirs(exampleTable.LibraryPaths.x86)
|
|
||||||
|
|
||||||
configuration("x64")
|
|
||||||
defines("NAZARA_PLATFORM_x64")
|
|
||||||
libdirs(exampleTable.LibraryPaths.x64)
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x32"})
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x86")
|
|
||||||
|
|
||||||
configuration({"codeblocks or codelite or gmake", "x64"})
|
|
||||||
libdirs("../lib/" .. makeLibDir .. "/x64")
|
|
||||||
|
|
||||||
configuration({"vs*", "x32"})
|
|
||||||
libdirs("../lib/msvc/x86")
|
|
||||||
|
|
||||||
configuration({"vs*", "x64"})
|
|
||||||
libdirs("../lib/msvc/x64")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x32"})
|
|
||||||
libdirs("../lib/xcode/x86")
|
|
||||||
|
|
||||||
configuration({"xcode3 or xcode4", "x64"})
|
|
||||||
libdirs("../lib/xcode/x64")
|
|
||||||
|
|
||||||
for k,v in pairs(exampleTable.ConfigurationLibraries) do
|
for k,v in pairs(exampleTable.ConfigurationLibraries) do
|
||||||
configuration(k)
|
filter(k)
|
||||||
links(v)
|
links(v)
|
||||||
end
|
end
|
||||||
|
|
||||||
configuration({})
|
filter({})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -718,10 +597,6 @@ function NazaraBuild:LoadConfig()
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:MakeInstallCommands(infoTable)
|
function NazaraBuild:MakeInstallCommands(infoTable)
|
||||||
if (PremakeVersion < 50) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
if (os.is("windows")) then
|
if (os.is("windows")) then
|
||||||
configuration("*Dynamic")
|
configuration("*Dynamic")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue