Update build script to match Lua 5.3 and new Premake version
This commit is contained in:
parent
2e832984ca
commit
3d7799ec62
|
|
@ -128,7 +128,7 @@ function NazaraBuild:Execute()
|
||||||
language("C++")
|
language("C++")
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
|
|
||||||
if (self.Config["PremakeProject"] and os.is("windows")) then
|
if (self.Config["PremakeProject"] and os.ishost("windows")) then
|
||||||
local commandLine = "premake5.exe " .. table.concat(_ARGV, ' ')
|
local commandLine = "premake5.exe " .. table.concat(_ARGV, ' ')
|
||||||
project("_PremakeProject")
|
project("_PremakeProject")
|
||||||
kind("Utility")
|
kind("Utility")
|
||||||
|
|
@ -477,10 +477,8 @@ function NazaraBuild:LoadConfig()
|
||||||
local content = f:read("*a")
|
local content = f:read("*a")
|
||||||
f:close()
|
f:close()
|
||||||
|
|
||||||
local func, err = loadstring(content)
|
local func, err = load(content, "Config file", "t", self.Config)
|
||||||
if (func) then
|
if (func) then
|
||||||
setfenv(func, self.Config)
|
|
||||||
|
|
||||||
local status, err = pcall(func)
|
local status, err = pcall(func)
|
||||||
if (not status) then
|
if (not status) then
|
||||||
print("Failed to load config.lua: " .. err)
|
print("Failed to load config.lua: " .. err)
|
||||||
|
|
@ -607,7 +605,7 @@ function NazaraBuild:LoadConfig()
|
||||||
end
|
end
|
||||||
|
|
||||||
function NazaraBuild:MakeInstallCommands(infoTable)
|
function NazaraBuild:MakeInstallCommands(infoTable)
|
||||||
if (os.is("windows")) then
|
if (os.istarget("windows")) then
|
||||||
filter("kind:SharedLib")
|
filter("kind:SharedLib")
|
||||||
|
|
||||||
postbuildmessage("Copying " .. infoTable.Name .. " library and its dependencies to install/executable directories...")
|
postbuildmessage("Copying " .. infoTable.Name .. " library and its dependencies to install/executable directories...")
|
||||||
|
|
@ -739,13 +737,13 @@ function NazaraBuild:Process(infoTable)
|
||||||
for platform, defineTable in pairs(v) do
|
for platform, defineTable in pairs(v) do
|
||||||
platform = string.lower(platform)
|
platform = string.lower(platform)
|
||||||
if (platform == "posix") then
|
if (platform == "posix") then
|
||||||
local osname = os.get()
|
local osname = os.target()
|
||||||
if (PosixOSes[osname]) then
|
if (PosixOSes[osname]) then
|
||||||
platform = osname
|
platform = osname
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if (os.is(platform)) then
|
if (os.istarget(platform)) then
|
||||||
for k,v in ipairs(defineTable) do
|
for k,v in ipairs(defineTable) do
|
||||||
table.insert(targetTable, v)
|
table.insert(targetTable, v)
|
||||||
end
|
end
|
||||||
|
|
@ -779,7 +777,6 @@ end
|
||||||
|
|
||||||
function NazaraBuild:PrepareGeneric()
|
function NazaraBuild:PrepareGeneric()
|
||||||
flags({
|
flags({
|
||||||
"C++14",
|
|
||||||
"MultiProcessorCompile",
|
"MultiProcessorCompile",
|
||||||
"NoMinimalRebuild",
|
"NoMinimalRebuild",
|
||||||
"RelativeLinks",
|
"RelativeLinks",
|
||||||
|
|
@ -787,6 +784,8 @@ function NazaraBuild:PrepareGeneric()
|
||||||
"UndefinedIdentifiers"
|
"UndefinedIdentifiers"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
cppdialect("C++14")
|
||||||
|
|
||||||
self:FilterLibDirectory("../extlibs/lib/", libdirs)
|
self:FilterLibDirectory("../extlibs/lib/", libdirs)
|
||||||
|
|
||||||
-- Fixes Premake stuff
|
-- Fixes Premake stuff
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue