From 26ccf59ddd0620b397f7dcc49e619694a6e26212 Mon Sep 17 00:00:00 2001 From: Lynix Date: Wed, 1 Jun 2016 13:52:59 +0200 Subject: [PATCH] Build: Fix with-extlibs option being required for compilation Former-commit-id: d6045b270db38412f5f323f025afb3fb85f703aa [formerly e5d7be10ada92f2351a4349b57c59b637108c4a3] Former-commit-id: 93146150699c9d9c7ad524eeccb126ea66257f26 --- build/scripts/common.lua | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/build/scripts/common.lua b/build/scripts/common.lua index 6cf0025ba..7e3cb2c33 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -15,7 +15,7 @@ function NazaraBuild:Execute() if (self.Actions[_ACTION] == nil) then local makeLibDir = os.is("windows") and "mingw" or "gmake" - if (#self.OrderedExtLibs > 0) then + if (_OPTIONS["with-extlibs"]) then workspace("NazaraExtlibs") platforms(platformData) @@ -494,26 +494,24 @@ function NazaraBuild:Initialize() ACTION = nil -- Extern libraries - if (_OPTIONS["with-extlibs"]) then - local extlibs = os.matchfiles("../extlibs/build/*.lua") - for k,v in pairs(extlibs) do - local f, err = loadfile(v) - if (f) then - LIBRARY = {} - self:SetupInfoTable(LIBRARY) + local extlibs = os.matchfiles("../extlibs/build/*.lua") + for k,v in pairs(extlibs) do + local f, err = loadfile(v) + if (f) then + LIBRARY = {} + self:SetupInfoTable(LIBRARY) - f() + f() - 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 - end + 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 -- Then the modules local modules = os.matchfiles("scripts/modules/*.lua")