Initialize libbullet git in 2.0_beta.
[platform/upstream/libbullet.git] / msvc / premake4.lua
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
3 \r
4 solution "0BulletSolution"\r
5 \r
6         \r
7         \r
8         newoption {\r
9     trigger     = "with-nacl",\r
10     description = "Enable Native Client build"\r
11   }\r
12   \r
13   newoption {\r
14     trigger     = "with-dx11",\r
15     description = "Enable DirectX11 build"\r
16   }\r
17   \r
18    newoption {\r
19     trigger     = "with-opencl",\r
20     description = "Enable OpenCL builds (various SDKs)"\r
21   }\r
22 \r
23    newoption {\r
24     trigger     = "with-opencl-amd",\r
25     description = "Enable OpenCL builds (AMD SDK)"\r
26   }\r
27 \r
28    newoption {\r
29     trigger     = "with-opencl-intel",\r
30     description = "Enable OpenCL builds (Intel SDK)"\r
31   }\r
32    newoption {\r
33     trigger     = "with-opencl-nvidia",\r
34     description = "Enable OpenCL builds (NVIDIA SDK)"\r
35   }\r
36 \r
37   \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
43                 \r
44         platforms {"x32", "x64"}\r
45 \r
46         configuration "x64"             \r
47                 targetsuffix "_64"\r
48         configuration {"x64", "debug"}\r
49                 targetsuffix "_x64_debug"\r
50         configuration {"x64", "release"}\r
51                 targetsuffix "_x64"\r
52         configuration {"x32", "debug"}\r
53                 targetsuffix "_debug"\r
54 \r
55   configuration {"Windows"}\r
56         defines { "_CRT_SECURE_NO_WARNINGS","_CRT_SECURE_NO_DEPRECATE"}\r
57   \r
58         configuration{}\r
59 \r
60 \r
61 \r
62 if not _OPTIONS["with-nacl"] then\r
63 \r
64         flags { "NoRTTI"}\r
65         targetdir "../bin"\r
66 \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
71         end\r
72 \r
73         -- Multithreaded compiling\r
74         if _ACTION == "vs2010" then\r
75                 buildoptions { "/MP"  }\r
76         end \r
77 \r
78 \r
79 else\r
80         targetdir "../bin_html"\r
81 end\r
82 \r
83 \r
84         dofile ("findOpenCL.lua")\r
85         dofile ("findDirectX11.lua")\r
86         \r
87         language "C++"\r
88         \r
89         location("./" .. _ACTION)\r
90 \r
91         if _OPTIONS["with-dx11"] then\r
92                 include "../Demos/DX11ClothDemo"\r
93                 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/DX11"\r
94         end\r
95 \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
104         end\r
105 \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
112         end\r
113   \r
114   if _OPTIONS["with-opencl-intel"] then\r
115                 include "../Demos/OpenCLClothDemo/Intel"\r
116                 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/Intel"\r
117         end\r
118 \r
119   if _OPTIONS["with-opencl-nvidia"] then\r
120                 include "../Demos/OpenCLClothDemo/NVidia"\r
121                 include "../src/BulletMultiThreaded/GpuSoftBodySolvers/OpenCL/NVidia"\r
122         end\r
123 \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
130                         \r
131                 include "../Demos"\r
132         include "../Extras"\r
133   end\r
134   \r
135    if _OPTIONS["with-nacl"] then\r
136         include "../Demos/NativeClient"\r
137   else\r
138         include "../src/LinearMath"     \r
139                 include "../src/BulletCollision"        \r
140                 include "../src/BulletDynamics" \r
141                 include "../src/BulletSoftBody" \r
142         end\r