Build: Now handle 32/64bits the right way
Former-commit-id: 5769c92df0994e91e7098df37612893fb51fdf8a
This commit is contained in:
parent
71e595fe49
commit
32a217ea1b
|
|
@ -10,6 +10,8 @@ function NazaraBuild:Execute()
|
||||||
else
|
else
|
||||||
if (#self.OrderedExtLibs > 0) then
|
if (#self.OrderedExtLibs > 0) then
|
||||||
solution("NazaraExtlibs")
|
solution("NazaraExtlibs")
|
||||||
|
platforms({"x32", "x64"})
|
||||||
|
|
||||||
-- Configuration générale
|
-- Configuration générale
|
||||||
configurations({
|
configurations({
|
||||||
"DebugStatic",
|
"DebugStatic",
|
||||||
|
|
@ -20,13 +22,13 @@ function NazaraBuild:Execute()
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
configuration("x32")
|
||||||
libdirs("../extlibs/lib/x64")
|
|
||||||
targetdir("../extlibs/lib/x64")
|
|
||||||
else
|
|
||||||
libdirs("../extlibs/lib/x86")
|
libdirs("../extlibs/lib/x86")
|
||||||
targetdir("../extlibs/lib/x86")
|
targetdir("../extlibs/lib/x86")
|
||||||
end
|
|
||||||
|
configuration("x64")
|
||||||
|
libdirs("../extlibs/lib/x64")
|
||||||
|
targetdir("../extlibs/lib/x64")
|
||||||
|
|
||||||
configuration("Debug*")
|
configuration("Debug*")
|
||||||
flags("Symbols")
|
flags("Symbols")
|
||||||
|
|
@ -71,6 +73,7 @@ function NazaraBuild:Execute()
|
||||||
end
|
end
|
||||||
|
|
||||||
solution("NazaraEngine")
|
solution("NazaraEngine")
|
||||||
|
platforms({"x32", "x64"})
|
||||||
|
|
||||||
-- Configuration générale
|
-- Configuration générale
|
||||||
configurations({
|
configurations({
|
||||||
|
|
@ -99,9 +102,6 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
configuration("codeblocks or codelite or gmake or xcode3 or xcode4")
|
||||||
buildoptions("-std=c++11")
|
buildoptions("-std=c++11")
|
||||||
if (_OPTIONS["x64"]) then
|
|
||||||
buildoptions("-m64")
|
|
||||||
end
|
|
||||||
|
|
||||||
configuration({"linux or bsd or macosx", "gmake"})
|
configuration({"linux or bsd or macosx", "gmake"})
|
||||||
buildoptions("-fvisibility=hidden")
|
buildoptions("-fvisibility=hidden")
|
||||||
|
|
@ -134,15 +134,14 @@ function NazaraBuild:Execute()
|
||||||
})
|
})
|
||||||
|
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
|
targetdir("../lib")
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
configuration("x32")
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
|
||||||
|
configuration("x64")
|
||||||
defines("NAZARA_PLATFORM_x64")
|
defines("NAZARA_PLATFORM_x64")
|
||||||
libdirs("../extlibs/lib/x64")
|
libdirs("../extlibs/lib/x64")
|
||||||
else
|
|
||||||
libdirs("../extlibs/lib/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
targetdir("../lib")
|
|
||||||
|
|
||||||
configuration("*Static")
|
configuration("*Static")
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
|
|
@ -202,15 +201,14 @@ function NazaraBuild:Execute()
|
||||||
})
|
})
|
||||||
|
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
|
targetdir("../lib")
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
configuration("x32")
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
|
||||||
|
configuration("x64")
|
||||||
defines("NAZARA_PLATFORM_x64")
|
defines("NAZARA_PLATFORM_x64")
|
||||||
libdirs("../extlibs/lib/x64")
|
libdirs("../extlibs/lib/x64")
|
||||||
else
|
|
||||||
libdirs("../extlibs/lib/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
targetdir("../lib")
|
|
||||||
|
|
||||||
configuration("*Static")
|
configuration("*Static")
|
||||||
kind("StaticLib")
|
kind("StaticLib")
|
||||||
|
|
@ -263,14 +261,6 @@ function NazaraBuild:Execute()
|
||||||
"../extlibs/include"
|
"../extlibs/include"
|
||||||
})
|
})
|
||||||
libdirs("../lib")
|
libdirs("../lib")
|
||||||
|
|
||||||
if (_OPTIONS["x64"]) then
|
|
||||||
defines("NAZARA_PLATFORM_x64")
|
|
||||||
libdirs("../extlibs/lib/x64")
|
|
||||||
else
|
|
||||||
libdirs("../extlibs/lib/x86")
|
|
||||||
end
|
|
||||||
|
|
||||||
targetdir("../examples/bin")
|
targetdir("../examples/bin")
|
||||||
|
|
||||||
files(exampleTable.Files)
|
files(exampleTable.Files)
|
||||||
|
|
@ -281,6 +271,13 @@ function NazaraBuild:Execute()
|
||||||
includedirs(exampleTable.Includes)
|
includedirs(exampleTable.Includes)
|
||||||
links(exampleTable.Libraries)
|
links(exampleTable.Libraries)
|
||||||
|
|
||||||
|
configuration("x32")
|
||||||
|
libdirs("../extlibs/lib/x86")
|
||||||
|
|
||||||
|
configuration("x64")
|
||||||
|
defines("NAZARA_PLATFORM_x64")
|
||||||
|
libdirs("../extlibs/lib/x64")
|
||||||
|
|
||||||
for k,v in pairs(exampleTable.ConfigurationLibraries) do
|
for k,v in pairs(exampleTable.ConfigurationLibraries) do
|
||||||
configuration(k)
|
configuration(k)
|
||||||
links(v)
|
links(v)
|
||||||
|
|
@ -292,11 +289,6 @@ end
|
||||||
|
|
||||||
function NazaraBuild:Initialize()
|
function NazaraBuild:Initialize()
|
||||||
-- Commençons par les options
|
-- Commençons par les options
|
||||||
newoption({
|
|
||||||
trigger = "x64",
|
|
||||||
description = "Setup build project for x64 arch"
|
|
||||||
})
|
|
||||||
|
|
||||||
newoption({
|
newoption({
|
||||||
trigger = "united",
|
trigger = "united",
|
||||||
description = "Builds all the modules as one united library"
|
description = "Builds all the modules as one united library"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue