Build: Fix OpenGL/Vulkan packages in static/embedded_renderer
Build: Fix circular dependencies when compiling static Update xmake.lua
This commit is contained in:
parent
8b9b47ba59
commit
91c9706016
36
xmake.lua
36
xmake.lua
|
|
@ -186,6 +186,14 @@ local modules = {
|
|||
add_defines("NAZARA_RENDERER_EMBEDDEDBACKENDS")
|
||||
for name, module in table.orderpairs(rendererBackends) do
|
||||
if not module.Option or has_config(module.Option) then
|
||||
if module.Deps then
|
||||
module = table.clone(module, 1) -- shallow clone
|
||||
module.Deps = table.remove_if(table.clone(module.Deps), function (idx, dep) return dep == "NazaraRenderer" end)
|
||||
if #module.Deps == 0 then
|
||||
module.Deps = nil
|
||||
end
|
||||
end
|
||||
|
||||
ModuleTargetConfig(name, module)
|
||||
end
|
||||
end
|
||||
|
|
@ -519,6 +527,20 @@ function ModuleTargetConfig(name, module)
|
|||
remove_files("src/Nazara/" .. name .. "/Posix/**")
|
||||
end
|
||||
|
||||
if module.Deps then
|
||||
add_deps(table.unpack(module.Deps))
|
||||
end
|
||||
|
||||
if module.Packages then
|
||||
add_packages(table.unpack(module.Packages))
|
||||
end
|
||||
|
||||
if module.PublicPackages then
|
||||
for _, pkg in ipairs(module.PublicPackages) do
|
||||
add_packages(pkg, { public = true })
|
||||
end
|
||||
end
|
||||
|
||||
if module.Custom then
|
||||
module.Custom()
|
||||
end
|
||||
|
|
@ -545,20 +567,6 @@ for name, module in pairs(modules) do
|
|||
add_packages("fmt") -- fmt is a special package that is not public but required by all Nazara modules
|
||||
add_rpathdirs("$ORIGIN")
|
||||
|
||||
if module.Deps then
|
||||
add_deps(table.unpack(module.Deps))
|
||||
end
|
||||
|
||||
if module.Packages then
|
||||
add_packages(table.unpack(module.Packages))
|
||||
end
|
||||
|
||||
if module.PublicPackages then
|
||||
for _, pkg in ipairs(module.PublicPackages) do
|
||||
add_packages(pkg, { public = true })
|
||||
end
|
||||
end
|
||||
|
||||
if has_config("usepch") then
|
||||
set_pcxxheader("include/Nazara/" .. name .. ".hpp")
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue