premake4.lua 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. project "App_SharedMemoryPhysics"
  2. if _OPTIONS["ios"] then
  3. kind "WindowedApp"
  4. else
  5. kind "ConsoleApp"
  6. end
  7. includedirs {".","../../src", "../ThirdPartyLibs",}
  8. links {
  9. "Bullet3Common","BulletInverseDynamicsUtils", "BulletInverseDynamics", "BulletDynamics","BulletCollision", "LinearMath", "BussIK"
  10. }
  11. language "C++"
  12. myfiles =
  13. {
  14. "IKTrajectoryHelper.cpp",
  15. "IKTrajectoryHelper.h",
  16. "PhysicsClient.cpp",
  17. "PhysicsClientSharedMemory.cpp",
  18. "PhysicsClientExample.cpp",
  19. "PhysicsServerExample.cpp",
  20. "PhysicsServerSharedMemory.cpp",
  21. "PhysicsServerSharedMemory.h",
  22. "PhysicsServer.cpp",
  23. "PhysicsServer.h",
  24. "PhysicsClientC_API.cpp",
  25. "SharedMemoryCommands.h",
  26. "SharedMemoryPublic.h",
  27. "PhysicsServer.cpp",
  28. "PosixSharedMemory.cpp",
  29. "Win32SharedMemory.cpp",
  30. "InProcessMemory.cpp",
  31. "PhysicsDirect.cpp",
  32. "PhysicsDirect.h",
  33. "PhysicsDirectC_API.cpp",
  34. "PhysicsDirectC_API.h",
  35. "PhysicsLoopBack.cpp",
  36. "PhysicsLoopBack.h",
  37. "PhysicsLoopBackC_API.cpp",
  38. "PhysicsLoopBackC_API.h",
  39. "PhysicsServerCommandProcessor.cpp",
  40. "PhysicsServerCommandProcessor.h",
  41. "TinyRendererVisualShapeConverter.cpp",
  42. "TinyRendererVisualShapeConverter.h",
  43. "../TinyRenderer/geometry.cpp",
  44. "../TinyRenderer/model.cpp",
  45. "../TinyRenderer/tgaimage.cpp",
  46. "../TinyRenderer/our_gl.cpp",
  47. "../TinyRenderer/TinyRenderer.cpp",
  48. "../OpenGLWindow/SimpleCamera.cpp",
  49. "../OpenGLWindow/SimpleCamera.h",
  50. "../Importers/ImportURDFDemo/ConvertRigidBodies2MultiBody.h",
  51. "../Importers/ImportURDFDemo/MultiBodyCreationInterface.h",
  52. "../Importers/ImportURDFDemo/MyMultiBodyCreator.cpp",
  53. "../Importers/ImportURDFDemo/MyMultiBodyCreator.h",
  54. "../Importers/ImportURDFDemo/BulletUrdfImporter.cpp",
  55. "../Importers/ImportURDFDemo/BulletUrdfImporter.h",
  56. "../Importers/ImportURDFDemo/UrdfParser.cpp",
  57. "../Importers/ImportURDFDemo/urdfStringSplit.cpp",
  58. "../Importers/ImportURDFDemo/UrdfParser.cpp",
  59. "../Importers/ImportURDFDemo/UrdfParser.h",
  60. "../Importers/ImportURDFDemo/URDF2Bullet.cpp",
  61. "../Importers/ImportURDFDemo/URDF2Bullet.h",
  62. "../Utils/b3ResourcePath.cpp",
  63. "../Utils/b3Clock.cpp",
  64. "../../Extras/Serialize/BulletWorldImporter/*",
  65. "../../Extras/Serialize/BulletFileLoader/*",
  66. "../Importers/ImportURDFDemo/URDFImporterInterface.h",
  67. "../Importers/ImportURDFDemo/URDFJointTypes.h",
  68. "../Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp",
  69. "../Importers/ImportObjDemo/LoadMeshFromObj.cpp",
  70. "../Importers/ImportSTLDemo/ImportSTLSetup.h",
  71. "../Importers/ImportSTLDemo/LoadMeshFromSTL.h",
  72. "../Importers/ImportColladaDemo/LoadMeshFromCollada.cpp",
  73. "../Importers/ImportColladaDemo/ColladaGraphicsInstance.h",
  74. "../ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp",
  75. "../ThirdPartyLibs/tinyxml/tinystr.cpp",
  76. "../ThirdPartyLibs/tinyxml/tinyxml.cpp",
  77. "../ThirdPartyLibs/tinyxml/tinyxmlerror.cpp",
  78. "../ThirdPartyLibs/tinyxml/tinyxmlparser.cpp",
  79. "../Importers/ImportMeshUtility/b3ImportMeshUtility.cpp",
  80. "../ThirdPartyLibs/stb_image/stb_image.cpp",
  81. }
  82. files {
  83. myfiles,
  84. "main.cpp",
  85. }
  86. files {
  87. "../MultiThreading/b3ThreadSupportInterface.cpp",
  88. "../MultiThreading/b3ThreadSupportInterface.h"
  89. }
  90. if os.is("Windows") then
  91. files {
  92. "../MultiThreading/b3Win32ThreadSupport.cpp",
  93. "../MultiThreading/b3Win32ThreadSupport.h"
  94. }
  95. --links {"winmm"}
  96. --defines {"__WINDOWS_MM__", "WIN32"}
  97. end
  98. if os.is("Linux") then
  99. files {
  100. "../MultiThreading/b3PosixThreadSupport.cpp",
  101. "../MultiThreading/b3PosixThreadSupport.h"
  102. }
  103. links {"pthread"}
  104. end
  105. if os.is("MacOSX") then
  106. files {
  107. "../MultiThreading/b3PosixThreadSupport.cpp",
  108. "../MultiThreading/b3PosixThreadSupport.h"
  109. }
  110. links {"pthread"}
  111. --links{"CoreAudio.framework", "coreMIDI.framework", "Cocoa.framework"}
  112. --defines {"__MACOSX_CORE__"}
  113. end
  114. project "App_SharedMemoryPhysics_GUI"
  115. if _OPTIONS["ios"] then
  116. kind "WindowedApp"
  117. else
  118. kind "ConsoleApp"
  119. end
  120. defines {"B3_USE_STANDALONE_EXAMPLE"}
  121. includedirs {"../../src", "../ThirdPartyLibs"}
  122. links {
  123. "BulletInverseDynamicsUtils", "BulletInverseDynamics", "BulletDynamics","BulletCollision", "LinearMath", "OpenGL_Window","Bullet3Common","BussIK"
  124. }
  125. initOpenGL()
  126. initGlew()
  127. language "C++"
  128. files {
  129. myfiles,
  130. "../StandaloneMain/main_opengl_single_example.cpp",
  131. "../ExampleBrowser/OpenGLGuiHelper.cpp",
  132. "../ExampleBrowser/GL_ShapeDrawer.cpp",
  133. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  134. }
  135. if os.is("Linux") then initX11() end
  136. if os.is("MacOSX") then
  137. links{"Cocoa.framework"}
  138. end
  139. files {
  140. "../MultiThreading/b3ThreadSupportInterface.cpp",
  141. "../MultiThreading/b3ThreadSupportInterface.h"
  142. }
  143. if os.is("Windows") then
  144. files {
  145. "../MultiThreading/b3Win32ThreadSupport.cpp",
  146. "../MultiThreading/b3Win32ThreadSupport.h"
  147. }
  148. --links {"winmm"}
  149. --defines {"__WINDOWS_MM__", "WIN32"}
  150. end
  151. if os.is("Linux") then
  152. files {
  153. "../MultiThreading/b3PosixThreadSupport.cpp",
  154. "../MultiThreading/b3PosixThreadSupport.h"
  155. }
  156. links {"pthread"}
  157. end
  158. if os.is("MacOSX") then
  159. files {
  160. "../MultiThreading/b3PosixThreadSupport.cpp",
  161. "../MultiThreading/b3PosixThreadSupport.h"
  162. }
  163. links {"pthread"}
  164. --links{"CoreAudio.framework", "coreMIDI.framework", "Cocoa.framework"}
  165. --defines {"__MACOSX_CORE__"}
  166. end
  167. if os.is("Windows") then
  168. project "App_SharedMemoryPhysics_VR"
  169. --for now, only enable VR under Windows, until compilation issues are resolved on Mac/Linux
  170. defines {"B3_USE_STANDALONE_EXAMPLE","BT_ENABLE_VR"}
  171. if _OPTIONS["ios"] then
  172. kind "WindowedApp"
  173. else
  174. kind "ConsoleApp"
  175. end
  176. includedirs {
  177. ".","../../src", "../ThirdPartyLibs",
  178. "../ThirdPartyLibs/openvr/headers",
  179. "../ThirdPartyLibs/openvr/samples/shared"
  180. }
  181. links {
  182. "BulletInverseDynamicsUtils", "BulletInverseDynamics","Bullet3Common", "BulletDynamics","BulletCollision", "LinearMath","OpenGL_Window","openvr_api","BussIK"
  183. }
  184. language "C++"
  185. initOpenGL()
  186. initGlew()
  187. files
  188. {
  189. myfiles,
  190. "../StandaloneMain/hellovr_opengl_main.cpp",
  191. "../ExampleBrowser/OpenGLGuiHelper.cpp",
  192. "../ExampleBrowser/GL_ShapeDrawer.cpp",
  193. "../ExampleBrowser/CollisionShape2TriangleMesh.cpp",
  194. "../RenderingExamples/TinyVRGui.cpp",
  195. "../RenderingExamples/TimeSeriesCanvas.cpp",
  196. "../RenderingExamples/TimeSeriesFontData.cpp",
  197. "../ThirdPartyLibs/openvr/samples/shared/lodepng.cpp",
  198. "../ThirdPartyLibs/openvr/samples/shared/lodepng.h",
  199. "../ThirdPartyLibs/openvr/samples/shared/Matrices.cpp",
  200. "../ThirdPartyLibs/openvr/samples/shared/Matrices.h",
  201. "../ThirdPartyLibs/openvr/samples/shared/pathtools.cpp",
  202. "../ThirdPartyLibs/openvr/samples/shared/pathtools.h",
  203. "../ThirdPartyLibs/openvr/samples/shared/Vectors.h",
  204. }
  205. if os.is("Windows") then
  206. libdirs {"../ThirdPartyLibs/openvr/lib/win32"}
  207. end
  208. if os.is("Linux") then initX11() end
  209. if os.is("MacOSX") then
  210. links{"Cocoa.framework"}
  211. end
  212. files {
  213. "../MultiThreading/b3ThreadSupportInterface.cpp",
  214. "../MultiThreading/b3ThreadSupportInterface.h"
  215. }
  216. if os.is("Windows") then
  217. files {
  218. "../MultiThreading/b3Win32ThreadSupport.cpp",
  219. "../MultiThreading/b3Win32ThreadSupport.h"
  220. }
  221. --links {"winmm"}
  222. --defines {"__WINDOWS_MM__", "WIN32"}
  223. end
  224. if os.is("Linux") then
  225. files {
  226. "../MultiThreading/b3PosixThreadSupport.cpp",
  227. "../MultiThreading/b3PosixThreadSupport.h"
  228. }
  229. links {"pthread"}
  230. end
  231. if os.is("MacOSX") then
  232. files {
  233. "../MultiThreading/b3PosixThreadSupport.cpp",
  234. "../MultiThreading/b3PosixThreadSupport.h"
  235. }
  236. links {"pthread"}
  237. --links{"CoreAudio.framework", "coreMIDI.framework", "Cocoa.framework"}
  238. --defines {"__MACOSX_CORE__"}
  239. end
  240. end