Build: Merged extern workspace to main (and only) workspace
Also removed extern libraries precompiled binaries
This commit is contained in:
parent
acc24158ec
commit
61ecedfe8c
|
|
@ -5,6 +5,7 @@ Build system/unit tests:
|
||||||
- Units tests are now part of the "test" exclusion category
|
- Units tests are now part of the "test" exclusion category
|
||||||
- Fix project exclusion not working (but correctly excluding projects relying upon it)
|
- Fix project exclusion not working (but correctly excluding projects relying upon it)
|
||||||
- Upgraded Catch to v2.0.1
|
- Upgraded Catch to v2.0.1
|
||||||
|
- ⚠️ Merged NazaraExtlibs workspace to main workspace (allowing `make` command to work without -f parameter) and removed extern libraries precompiled
|
||||||
|
|
||||||
Nazara Engine:
|
Nazara Engine:
|
||||||
- VertexMapper:GetComponentPtr no longer throw an error if component is disabled or incompatible with template type, instead a null pointer is returned.
|
- VertexMapper:GetComponentPtr no longer throw an error if component is disabled or incompatible with template type, instead a null pointer is returned.
|
||||||
|
|
|
||||||
|
|
@ -53,31 +53,33 @@ function NazaraBuild:Execute()
|
||||||
end
|
end
|
||||||
|
|
||||||
if (self.Actions[_ACTION] == nil) then
|
if (self.Actions[_ACTION] == nil) then
|
||||||
if (self.Config["BuildDependencies"]) then
|
-- Start defining projects
|
||||||
workspace("NazaraExtlibs")
|
workspace("NazaraEngine")
|
||||||
platforms(platformData)
|
platforms(platformData)
|
||||||
|
|
||||||
-- Configuration générale
|
|
||||||
configurations({
|
|
||||||
"DebugStatic",
|
|
||||||
"ReleaseStatic"
|
|
||||||
})
|
|
||||||
|
|
||||||
self:PrepareGeneric()
|
|
||||||
self:FilterLibDirectory("../extlibs/lib/", targetdir)
|
|
||||||
|
|
||||||
filter(clangGccActions)
|
|
||||||
buildoptions("-U__STRICT_ANSI__")
|
|
||||||
|
|
||||||
filter({})
|
|
||||||
|
|
||||||
includedirs("../extlibs/include")
|
|
||||||
libdirs("../extlibs/lib/common")
|
|
||||||
location(_ACTION)
|
location(_ACTION)
|
||||||
|
|
||||||
|
do
|
||||||
|
local linkTypes = {"Dynamic"} -- {"Static", "Dynamic"}
|
||||||
|
local configs = {}
|
||||||
|
for k,linkType in pairs(linkTypes) do
|
||||||
|
for k,config in pairs(self.Config["Configurations"]) do
|
||||||
|
table.insert(configs, config .. linkType)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
configurations(configs)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Extern libraries
|
||||||
|
if (self.Config["BuildDependencies"]) then
|
||||||
|
self:FilterLibDirectory("../extlibs/lib/", targetdir)
|
||||||
|
|
||||||
for k, libTable in ipairs(self.OrderedExtLibs) do
|
for k, libTable in ipairs(self.OrderedExtLibs) do
|
||||||
project(libTable.Name)
|
project(libTable.Name)
|
||||||
|
|
||||||
|
self:PrepareGeneric()
|
||||||
|
|
||||||
language(libTable.Language)
|
language(libTable.Language)
|
||||||
location(_ACTION .. "/extlibs")
|
location(_ACTION .. "/extlibs")
|
||||||
|
|
||||||
|
|
@ -86,8 +88,14 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
defines(libTable.Defines)
|
defines(libTable.Defines)
|
||||||
flags(libTable.Flags)
|
flags(libTable.Flags)
|
||||||
|
kind("StaticLib") -- Force them as static libs
|
||||||
|
includedirs("../extlibs/include")
|
||||||
includedirs(libTable.Includes)
|
includedirs(libTable.Includes)
|
||||||
links(libTable.Libraries)
|
links(libTable.Libraries)
|
||||||
|
libdirs("../extlibs/lib/common")
|
||||||
|
|
||||||
|
filter(clangGccActions)
|
||||||
|
buildoptions("-U__STRICT_ANSI__")
|
||||||
|
|
||||||
filter("architecture:x86")
|
filter("architecture:x86")
|
||||||
libdirs(libTable.LibraryPaths.x86)
|
libdirs(libTable.LibraryPaths.x86)
|
||||||
|
|
@ -104,30 +112,6 @@ function NazaraBuild:Execute()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Start defining projects
|
|
||||||
workspace("NazaraEngine")
|
|
||||||
platforms(platformData)
|
|
||||||
|
|
||||||
self:PrepareMainWorkspace()
|
|
||||||
|
|
||||||
-- Add lib/conf/arch to library search path
|
|
||||||
self:FilterLibDirectory("../lib/", libdirs)
|
|
||||||
|
|
||||||
do
|
|
||||||
local linkTypes = {"Dynamic"} -- {"Static", "Dynamic"}
|
|
||||||
local configs = {}
|
|
||||||
for k,linkType in pairs(linkTypes) do
|
|
||||||
for k,config in pairs(self.Config["Configurations"]) do
|
|
||||||
table.insert(configs, config .. linkType)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
configurations(configs)
|
|
||||||
end
|
|
||||||
|
|
||||||
language("C++")
|
|
||||||
location(_ACTION)
|
|
||||||
|
|
||||||
if (self.Config["PremakeProject"] and os.ishost("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")
|
||||||
|
|
@ -138,11 +122,15 @@ function NazaraBuild:Execute()
|
||||||
-- Modules
|
-- Modules
|
||||||
if (_OPTIONS["united"]) then
|
if (_OPTIONS["united"]) then
|
||||||
project("NazaraEngine")
|
project("NazaraEngine")
|
||||||
|
|
||||||
|
self:PrepareMainWorkspace()
|
||||||
end
|
end
|
||||||
|
|
||||||
for k, moduleTable in ipairs(self.OrderedModules) do
|
for k, moduleTable in ipairs(self.OrderedModules) do
|
||||||
if (not _OPTIONS["united"]) then
|
if (not _OPTIONS["united"]) then
|
||||||
project("Nazara" .. moduleTable.Name)
|
project("Nazara" .. moduleTable.Name)
|
||||||
|
|
||||||
|
self:PrepareMainWorkspace()
|
||||||
end
|
end
|
||||||
|
|
||||||
location(_ACTION .. "/modules")
|
location(_ACTION .. "/modules")
|
||||||
|
|
@ -195,6 +183,8 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
project(prefix .. toolTable.Name)
|
project(prefix .. toolTable.Name)
|
||||||
|
|
||||||
|
self:PrepareMainWorkspace()
|
||||||
|
|
||||||
location(_ACTION .. "/tools")
|
location(_ACTION .. "/tools")
|
||||||
|
|
||||||
if (toolTable.Kind == "plugin" or toolTable.Kind == "library") then
|
if (toolTable.Kind == "plugin" or toolTable.Kind == "library") then
|
||||||
|
|
@ -258,6 +248,8 @@ function NazaraBuild:Execute()
|
||||||
|
|
||||||
project("Demo" .. exampleTable.Name)
|
project("Demo" .. exampleTable.Name)
|
||||||
|
|
||||||
|
self:PrepareMainWorkspace()
|
||||||
|
|
||||||
location(_ACTION .. "/examples")
|
location(_ACTION .. "/examples")
|
||||||
|
|
||||||
if (exampleTable.Kind == "plugin" or exampleTable.Kind == "library") then
|
if (exampleTable.Kind == "plugin" or exampleTable.Kind == "library") then
|
||||||
|
|
@ -690,12 +682,16 @@ function NazaraBuild:Process(infoTable)
|
||||||
elseif (libraryTable.Type == "ExternLib") then
|
elseif (libraryTable.Type == "ExternLib") then
|
||||||
library = libraryTable.Name
|
library = libraryTable.Name
|
||||||
|
|
||||||
|
if (self.Config["BuildDependencies"]) then
|
||||||
|
table.insert(libraries, library)
|
||||||
|
else
|
||||||
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
table.insert(infoTable.ConfigurationLibraries.DebugStatic, library .. "-s-d")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseStatic, library .. "-s")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseWithDebugStatic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseWithDebugStatic, library .. "-s")
|
||||||
table.insert(infoTable.ConfigurationLibraries.DebugDynamic, library .. "-s-d")
|
table.insert(infoTable.ConfigurationLibraries.DebugDynamic, library .. "-s-d")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseDynamic, library .. "-s")
|
||||||
table.insert(infoTable.ConfigurationLibraries.ReleaseWithDebugDynamic, library .. "-s")
|
table.insert(infoTable.ConfigurationLibraries.ReleaseWithDebugDynamic, library .. "-s")
|
||||||
|
end
|
||||||
elseif (libraryTable.Type == "Tool") then
|
elseif (libraryTable.Type == "Tool") then
|
||||||
library = "Nazara" .. libraryTable.Name
|
library = "Nazara" .. libraryTable.Name
|
||||||
|
|
||||||
|
|
@ -805,13 +801,13 @@ function NazaraBuild:PrepareGeneric()
|
||||||
filter("kind:*Lib")
|
filter("kind:*Lib")
|
||||||
pic("On")
|
pic("On")
|
||||||
|
|
||||||
filter({"kind:*Lib", "configurations:DebugStatic"})
|
filter({"kind:StaticLib", "configurations:Debug*"})
|
||||||
targetsuffix("-s-d")
|
targetsuffix("-s-d")
|
||||||
|
|
||||||
filter({"kind:*Lib", "configurations:ReleaseStatic"})
|
filter({"kind:StaticLib", "configurations:Release*"})
|
||||||
targetsuffix("-s")
|
targetsuffix("-s")
|
||||||
|
|
||||||
filter({"kind:*Lib", "configurations:DebugDynamic"})
|
filter({"kind:SharedLib", "configurations:Debug*"})
|
||||||
targetsuffix("-d")
|
targetsuffix("-d")
|
||||||
|
|
||||||
filter("configurations:*Debug*")
|
filter("configurations:*Debug*")
|
||||||
|
|
@ -844,6 +840,11 @@ end
|
||||||
function NazaraBuild:PrepareMainWorkspace()
|
function NazaraBuild:PrepareMainWorkspace()
|
||||||
self:PrepareGeneric()
|
self:PrepareGeneric()
|
||||||
|
|
||||||
|
language("C++")
|
||||||
|
|
||||||
|
-- Add lib/conf/arch to library search path
|
||||||
|
self:FilterLibDirectory("../lib/", libdirs)
|
||||||
|
|
||||||
filter("action:vs*")
|
filter("action:vs*")
|
||||||
buildoptions({"/MP", "/bigobj"}) -- Multiprocessus build and big .obj
|
buildoptions({"/MP", "/bigobj"}) -- Multiprocessus build and big .obj
|
||||||
defines("_CRT_SECURE_NO_WARNINGS")
|
defines("_CRT_SECURE_NO_WARNINGS")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue