mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Added flag to control building examples.
This PR adds a new flag to `genie.lua` called `--with-examples` and uses it to control whether the example binaries are built or not. It also changes the default options in `makefile` to include this flag, such that the default behavior of `bgfx` compilation is unchanged. This allows users who are building with CI systems or as part of a larger automated build process to avoid having to compile examples each time they build `bgfx`. They can instead use `genie` directly to configure their project to build without examples.
This commit is contained in:
@@ -43,6 +43,11 @@ newoption {
|
||||
description = "Enable building tools.",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-examples",
|
||||
description = "Enable building examples.",
|
||||
}
|
||||
|
||||
solution "bgfx"
|
||||
configurations {
|
||||
"Debug",
|
||||
@@ -355,48 +360,51 @@ end
|
||||
|
||||
dofile "bgfx.lua"
|
||||
|
||||
-- Always build 'example-common' because 'texturev' uses it as well.
|
||||
group "examples"
|
||||
dofile "example-common.lua"
|
||||
|
||||
group "libs"
|
||||
bgfxProject("", "StaticLib", {})
|
||||
|
||||
group "examples"
|
||||
exampleProject("00-helloworld")
|
||||
exampleProject("01-cubes")
|
||||
exampleProject("02-metaballs")
|
||||
exampleProject("03-raymarch")
|
||||
exampleProject("04-mesh")
|
||||
exampleProject("05-instancing")
|
||||
exampleProject("06-bump")
|
||||
exampleProject("07-callback")
|
||||
exampleProject("08-update")
|
||||
exampleProject("09-hdr")
|
||||
exampleProject("10-font")
|
||||
exampleProject("11-fontsdf")
|
||||
exampleProject("12-lod")
|
||||
exampleProject("13-stencil")
|
||||
exampleProject("14-shadowvolumes")
|
||||
exampleProject("15-shadowmaps-simple")
|
||||
exampleProject("16-shadowmaps")
|
||||
exampleProject("17-drawstress")
|
||||
exampleProject("18-ibl")
|
||||
exampleProject("19-oit")
|
||||
exampleProject("20-nanovg")
|
||||
exampleProject("21-deferred")
|
||||
exampleProject("22-windows")
|
||||
exampleProject("23-vectordisplay")
|
||||
exampleProject("24-nbody")
|
||||
exampleProject("26-occlusion")
|
||||
exampleProject("27-terrain")
|
||||
exampleProject("28-wireframe")
|
||||
exampleProject("29-debugdraw")
|
||||
exampleProject("30-picking")
|
||||
exampleProject("31-rsm")
|
||||
if _OPTIONS["with-examples"] then
|
||||
group "examples"
|
||||
exampleProject("00-helloworld")
|
||||
exampleProject("01-cubes")
|
||||
exampleProject("02-metaballs")
|
||||
exampleProject("03-raymarch")
|
||||
exampleProject("04-mesh")
|
||||
exampleProject("05-instancing")
|
||||
exampleProject("06-bump")
|
||||
exampleProject("07-callback")
|
||||
exampleProject("08-update")
|
||||
exampleProject("09-hdr")
|
||||
exampleProject("10-font")
|
||||
exampleProject("11-fontsdf")
|
||||
exampleProject("12-lod")
|
||||
exampleProject("13-stencil")
|
||||
exampleProject("14-shadowvolumes")
|
||||
exampleProject("15-shadowmaps-simple")
|
||||
exampleProject("16-shadowmaps")
|
||||
exampleProject("17-drawstress")
|
||||
exampleProject("18-ibl")
|
||||
exampleProject("19-oit")
|
||||
exampleProject("20-nanovg")
|
||||
exampleProject("21-deferred")
|
||||
exampleProject("22-windows")
|
||||
exampleProject("23-vectordisplay")
|
||||
exampleProject("24-nbody")
|
||||
exampleProject("26-occlusion")
|
||||
exampleProject("27-terrain")
|
||||
exampleProject("28-wireframe")
|
||||
exampleProject("29-debugdraw")
|
||||
exampleProject("30-picking")
|
||||
exampleProject("31-rsm")
|
||||
|
||||
-- C99 source doesn't compile under WinRT settings
|
||||
if not premake.vstudio.iswinrt() then
|
||||
exampleProject("25-c99")
|
||||
-- C99 source doesn't compile under WinRT settings
|
||||
if not premake.vstudio.iswinrt() then
|
||||
exampleProject("25-c99")
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["with-shared-lib"] then
|
||||
|
||||
Reference in New Issue
Block a user