From 973e3b094aa5cbc9751286e02c140aef9a900c39 Mon Sep 17 00:00:00 2001 From: Lynix Date: Mon, 14 Aug 2017 01:59:17 +0200 Subject: [PATCH] Build: Add PremakeProject option --- build/scripts/common.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/build/scripts/common.lua b/build/scripts/common.lua index ea7097e97..220d2084b 100644 --- a/build/scripts/common.lua +++ b/build/scripts/common.lua @@ -42,7 +42,7 @@ end function NazaraBuild:Execute() 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 end local platformData @@ -74,7 +74,6 @@ function NazaraBuild:Execute() includedirs("../extlibs/include") libdirs("../extlibs/lib/common") location(_ACTION) - kind("StaticLib") for k, libTable in ipairs(self.OrderedExtLibs) do project(libTable.Name) @@ -129,6 +128,13 @@ function NazaraBuild:Execute() language("C++") location(_ACTION) + if (self.Config["PremakeProject"]) then + local commandLine = "premake5.exe " .. table.concat(_ARGV, ' ') + project("_PremakeProject") + kind("Utility") + prebuildcommands("cd .. && " .. commandLine) + end + -- Modules if (_OPTIONS["united"]) then project("NazaraEngine") @@ -517,9 +523,9 @@ function NazaraBuild:LoadConfig() end end - AddBoolOption("BuildDependencies", "with-extlibs", "Builds the extern libraries") AddBoolOption("BuildExamples", "with-examples", "Builds the examples") + AddBoolOption("PremakeProject", "premakeproject", "Add a PremakeProject as a shortcut to call Premake") AddBoolOption("ServerMode", "server", "Excludes client-only modules/tools/examples") AddBoolOption("UniteModules", "united", "Builds all the modules as one united library")