cleanup main premake script

added premake options:
  --no-demos
  --no-test
  --no-bullet3
This commit is contained in:
Andrew Meadows
2015-12-03 18:58:10 -08:00
parent 01c4720d62
commit f385bffffb

View File

@@ -51,8 +51,8 @@
newoption
{
trigger = "bullet2demos",
description = "Compile the Bullet 2 demos (Demo/Extra folder)"
trigger = "no-demos",
description = "Don't build demos"
}
newoption
@@ -60,6 +60,7 @@
trigger = "enet",
description = "Enable enet NAT punchthrough test"
}
newoption
{
trigger = "lua",
@@ -72,13 +73,24 @@
description = "Set the output location for the generated project files"
}
newoption
{
trigger = "no-test",
description = "Disable all tests"
}
newoption
{
trigger = "without-gtest",
trigger = "no-gtest",
description = "Disable unit tests using gtest"
}
newoption
{
trigger = "no-bullet3",
description = "Do not build bullet3 libs"
}
configurations {"Release", "Debug"}
configuration "Release"
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
@@ -155,47 +167,73 @@
language "C++"
if not _OPTIONS["ios"] then
include "../examples/ExampleBrowser"
include "../examples/OpenGLWindow"
include "../examples/SharedMemory"
include "../examples/MultiThreading"
include "../examples/ThirdPartyLibs/Gwen"
include "../Extras"
include "../examples/HelloWorld"
include "../examples/BasicDemo"
include "../test/SharedMemory"
if _OPTIONS["enet"] then
include "../examples/ThirdPartyLibs/enet"
include "../test/enet/client"
include "../test/enet/server"
end
if _OPTIONS["lua"] then
include "../examples/ThirdPartyLibs/lua-5.2.3"
if _OPTIONS["ios"] then
_OPTIONS["no-bullet3"] = "1"
_OPTIONS["no-gtest"] = "1"
end
if _OPTIONS["no-bullet3"] then
_OPTIONS["no-demos"] = "1"
else
include "../src/Bullet3Common"
include "../src/Bullet3Geometry"
include "../src/Bullet3Collision"
include "../src/Bullet3Dynamics"
include "../src/Bullet3OpenCL"
include "../src/Bullet3Serialize/Bullet2FileLoader"
end
if not _OPTIONS["without-gtest"] then
if _OPTIONS["no-extras"] then
_OPTIONS["no-demos"] = "1"
else
include "../Extras"
end
if not _OPTIONS["no-demos"] then
include "../examples/ExampleBrowser"
include "../examples/OpenGLWindow"
include "../examples/ThirdPartyLibs/Gwen"
include "../examples/HelloWorld"
include "../examples/BasicDemo"
include "../examples/SharedMemory"
include "../examples/MultiThreading"
if _OPTIONS["lua"] then
include "../examples/ThirdPartyLibs/lua-5.2.3"
end
if not _OPTIONS["no-test"] then
include "../test/SharedMemory"
if _OPTIONS["enet"] then
include "../examples/ThirdPartyLibs/enet"
include "../test/enet/client"
include "../test/enet/server"
end
end
end
if not _OPTIONS["no-test"] then
include "../test/Bullet2"
if not _OPTIONS["no-gtest"] then
include "../test/gtest-1.7.0"
-- include "../test/hello_gtest"
include "../test/collision"
if not _OPTIONS["no-bullet3"] then
if _OPTIONS["no-extras"] then
include "../test/InverseDynamics"
end
include "../test/TestBullet3OpenCL"
end
if not _OPTIONS["no-demos"] then
-- Gwen is only used for demos
include "../test/GwenOpenGLTest"
end
end
end
include "../test/Bullet2"
include "../src/BulletInverseDynamics"
include "../src/BulletSoftBody"
include "../src/BulletDynamics"