Build: Fix with-extlibs option being required for compilation

Former-commit-id: d549ed954e4285f34399e610e3dcfde33c0ad83d [formerly 239e7cd99680e8bd35fdde4e0e137818f1b1bce9]
Former-commit-id: 5233a5e6923162f630bfa186192259123d1ab3da
This commit is contained in:
Lynix 2016-06-01 13:52:59 +02:00
parent b6be16b3c3
commit 14541deb76
1 changed files with 17 additions and 19 deletions

View File

@ -15,7 +15,7 @@ function NazaraBuild:Execute()
if (self.Actions[_ACTION] == nil) then if (self.Actions[_ACTION] == nil) then
local makeLibDir = os.is("windows") and "mingw" or "gmake" local makeLibDir = os.is("windows") and "mingw" or "gmake"
if (#self.OrderedExtLibs > 0) then if (_OPTIONS["with-extlibs"]) then
workspace("NazaraExtlibs") workspace("NazaraExtlibs")
platforms(platformData) platforms(platformData)
@ -494,26 +494,24 @@ function NazaraBuild:Initialize()
ACTION = nil ACTION = nil
-- Extern libraries -- Extern libraries
if (_OPTIONS["with-extlibs"]) then local extlibs = os.matchfiles("../extlibs/build/*.lua")
local extlibs = os.matchfiles("../extlibs/build/*.lua") for k,v in pairs(extlibs) do
for k,v in pairs(extlibs) do local f, err = loadfile(v)
local f, err = loadfile(v) if (f) then
if (f) then LIBRARY = {}
LIBRARY = {} self:SetupInfoTable(LIBRARY)
self:SetupInfoTable(LIBRARY)
f() f()
local succeed, err = self:RegisterExternLibrary(LIBRARY) local succeed, err = self:RegisterExternLibrary(LIBRARY)
if (not succeed) then if (not succeed) then
print("Unable to register extern library: " .. err) print("Unable to register extern library: " .. err)
end end
else else
print("Unable to load extern library file: " .. err) print("Unable to load extern library file: " .. err)
end end
end end
LIBRARY = nil LIBRARY = nil
end
-- Then the modules -- Then the modules
local modules = os.matchfiles("scripts/modules/*.lua") local modules = os.matchfiles("scripts/modules/*.lua")