1 --add the 0 so the solution comes first in the directory (when sorted on name)
\r
2 --print "uncomment this hello premake4 world for debugging the script"
\r
4 solution "0BulletSolution"
\r
9 trigger = "with-nacl",
\r
10 description = "Enable Native Client build"
\r
14 trigger = "with-dx11",
\r
15 description = "Enable DirectX11 build"
\r
19 trigger = "with-opencl",
\r
20 description = "Enable OpenCL builds (various SDKs)"
\r
24 trigger = "with-opencl-amd",
\r
25 description = "Enable OpenCL builds (AMD SDK)"
\r
29 trigger = "with-opencl-intel",
\r
30 description = "Enable OpenCL builds (Intel SDK)"
\r
33 trigger = "with-opencl-nvidia",
\r
34 description = "Enable OpenCL builds (NVIDIA SDK)"
\r
38 configurations {"Release", "Debug"}
\r
39 configuration "Release"
\r
40 flags { "Optimize", "StaticRuntime", "NoMinimalRebuild", "FloatFast"}
\r
41 configuration "Debug"
\r
42 flags { "Symbols", "StaticRuntime" , "NoMinimalRebuild", "NoEditAndContinue" ,"FloatFast"}
\r
44 platforms {"x32", "x64"}
\r
46 configuration "x64"
\r
48 configuration {"x64", "debug"}
\r
49 targetsuffix "_x64_debug"
\r
50 configuration {"x64", "release"}
\r
52 configuration {"x32", "debug"}
\r
53 targetsuffix "_debug"
\r
55 configuration {"Windows"}
\r
56 defines { "_CRT_SECURE_NO_WARNINGS","_CRT_SECURE_NO_DEPRECATE"}
\r
62 if not _OPTIONS["with-nacl"] then
\r
67 -- Disable exception handling on MSVC 2008 and higher. MSVC 2005 without service pack has some linker issue (ConvexDecompositionDemo uses STL through HACD library)
\r
68 if _ACTION == "vs2010" or _ACTION=="vs2008" then
\r
69 flags { "NoExceptions"}
\r
70 defines { "_HAS_EXCEPTIONS=0" }
\r
73 -- Multithreaded compiling
\r
74 if _ACTION == "vs2010" then
\r
75 buildoptions { "/MP" }
\r
80 targetdir "../bin_html"
\r
84 dofile ("findOpenCL.lua")
\r
85 dofile ("findDirectX11.lua")
\r
89 location("./" .. _ACTION)
\r
91 if _OPTIONS["with-dx11"] then
\r
92 include "../Demos/DX11ClothDemo"
\r
93 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/DX11"
\r
96 --choose any OpenCL sdk that is installed on the system
\r
97 if _OPTIONS["with-opencl"] then
\r
98 include "../Demos/OpenCLClothDemo/AMD"
\r
99 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD"
\r
100 include "../Demos/OpenCLClothDemo/NVidia"
\r
101 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia"
\r
102 include "../Demos/OpenCLClothDemo/Intel"
\r
103 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel"
\r
106 --choose a particular OpenCL sdk, this is useful for distributing project files that just work for one OpenCL SDK
\r
107 if _OPTIONS["with-opencl-amd"] then
\r
108 include "../Demos/OpenCLClothDemo/AMD"
\r
109 include "../Demos/OpenGL"
\r
110 include "../Demos/SoftDemo/AMD"
\r
111 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/AMD"
\r
114 if _OPTIONS["with-opencl-intel"] then
\r
115 include "../Demos/OpenCLClothDemo/Intel"
\r
116 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel"
\r
119 if _OPTIONS["with-opencl-nvidia"] then
\r
120 include "../Demos/OpenCLClothDemo/NVidia"
\r
121 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia"
\r
124 if not _OPTIONS["with-opencl-amd"] and
\r
125 not _OPTIONS["with-opencl-nvidia"] and
\r
126 not _OPTIONS["with-opencl-intel"] and
\r
127 not _OPTIONS["with-opencl"] and
\r
128 not _OPTIONS["with-dx11"] and
\r
129 not _OPTIONS["with-nacl"] then
\r
132 include "../Extras"
\r
135 if _OPTIONS["with-nacl"] then
\r
136 include "../Demos/NativeClient"
\r
138 include "../src/LinearMath"
\r
139 include "../src/BulletCollision"
\r
140 include "../src/BulletDynamics"
\r
141 include "../src/BulletSoftBody"
\r