SCsub 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. #!/usr/bin/env python
  2. Import('env')
  3. Import('env_modules')
  4. env_bullet = env_modules.Clone()
  5. # Thirdparty source files
  6. if env['builtin_bullet']:
  7. # Build only version 2 for now (as of 2.87)
  8. thirdparty_dir = "#thirdparty/bullet/"
  9. bullet2_src = [
  10. # BulletCollision
  11. "BulletCollision/BroadphaseCollision/btAxisSweep3.cpp"
  12. , "BulletCollision/BroadphaseCollision/btBroadphaseProxy.cpp"
  13. , "BulletCollision/BroadphaseCollision/btCollisionAlgorithm.cpp"
  14. , "BulletCollision/BroadphaseCollision/btDbvt.cpp"
  15. , "BulletCollision/BroadphaseCollision/btDbvtBroadphase.cpp"
  16. , "BulletCollision/BroadphaseCollision/btDispatcher.cpp"
  17. , "BulletCollision/BroadphaseCollision/btOverlappingPairCache.cpp"
  18. , "BulletCollision/BroadphaseCollision/btQuantizedBvh.cpp"
  19. , "BulletCollision/BroadphaseCollision/btSimpleBroadphase.cpp"
  20. , "BulletCollision/CollisionDispatch/btActivatingCollisionAlgorithm.cpp"
  21. , "BulletCollision/CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp"
  22. , "BulletCollision/CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp"
  23. , "BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp"
  24. , "BulletCollision/CollisionDispatch/btCollisionDispatcher.cpp"
  25. , "BulletCollision/CollisionDispatch/btCollisionDispatcherMt.cpp"
  26. , "BulletCollision/CollisionDispatch/btCollisionObject.cpp"
  27. , "BulletCollision/CollisionDispatch/btCollisionWorld.cpp"
  28. , "BulletCollision/CollisionDispatch/btCollisionWorldImporter.cpp"
  29. , "BulletCollision/CollisionDispatch/btCompoundCollisionAlgorithm.cpp"
  30. , "BulletCollision/CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp"
  31. , "BulletCollision/CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp"
  32. , "BulletCollision/CollisionDispatch/btConvexConvexAlgorithm.cpp"
  33. , "BulletCollision/CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp"
  34. , "BulletCollision/CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp"
  35. , "BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.cpp"
  36. , "BulletCollision/CollisionDispatch/btEmptyCollisionAlgorithm.cpp"
  37. , "BulletCollision/CollisionDispatch/btGhostObject.cpp"
  38. , "BulletCollision/CollisionDispatch/btHashedSimplePairCache.cpp"
  39. , "BulletCollision/CollisionDispatch/btInternalEdgeUtility.cpp"
  40. , "BulletCollision/CollisionDispatch/btManifoldResult.cpp"
  41. , "BulletCollision/CollisionDispatch/btSimulationIslandManager.cpp"
  42. , "BulletCollision/CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp"
  43. , "BulletCollision/CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp"
  44. , "BulletCollision/CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp"
  45. , "BulletCollision/CollisionDispatch/btUnionFind.cpp"
  46. , "BulletCollision/CollisionDispatch/SphereTriangleDetector.cpp"
  47. , "BulletCollision/CollisionShapes/btBoxShape.cpp"
  48. , "BulletCollision/CollisionShapes/btBox2dShape.cpp"
  49. , "BulletCollision/CollisionShapes/btBvhTriangleMeshShape.cpp"
  50. , "BulletCollision/CollisionShapes/btCapsuleShape.cpp"
  51. , "BulletCollision/CollisionShapes/btCollisionShape.cpp"
  52. , "BulletCollision/CollisionShapes/btCompoundShape.cpp"
  53. , "BulletCollision/CollisionShapes/btConcaveShape.cpp"
  54. , "BulletCollision/CollisionShapes/btConeShape.cpp"
  55. , "BulletCollision/CollisionShapes/btConvexHullShape.cpp"
  56. , "BulletCollision/CollisionShapes/btConvexInternalShape.cpp"
  57. , "BulletCollision/CollisionShapes/btConvexPointCloudShape.cpp"
  58. , "BulletCollision/CollisionShapes/btConvexPolyhedron.cpp"
  59. , "BulletCollision/CollisionShapes/btConvexShape.cpp"
  60. , "BulletCollision/CollisionShapes/btConvex2dShape.cpp"
  61. , "BulletCollision/CollisionShapes/btConvexTriangleMeshShape.cpp"
  62. , "BulletCollision/CollisionShapes/btCylinderShape.cpp"
  63. , "BulletCollision/CollisionShapes/btEmptyShape.cpp"
  64. , "BulletCollision/CollisionShapes/btHeightfieldTerrainShape.cpp"
  65. , "BulletCollision/CollisionShapes/btMinkowskiSumShape.cpp"
  66. , "BulletCollision/CollisionShapes/btMiniSDF.cpp"
  67. , "BulletCollision/CollisionShapes/btMultimaterialTriangleMeshShape.cpp"
  68. , "BulletCollision/CollisionShapes/btMultiSphereShape.cpp"
  69. , "BulletCollision/CollisionShapes/btOptimizedBvh.cpp"
  70. , "BulletCollision/CollisionShapes/btPolyhedralConvexShape.cpp"
  71. , "BulletCollision/CollisionShapes/btScaledBvhTriangleMeshShape.cpp"
  72. , "BulletCollision/CollisionShapes/btSdfCollisionShape.cpp"
  73. , "BulletCollision/CollisionShapes/btShapeHull.cpp"
  74. , "BulletCollision/CollisionShapes/btSphereShape.cpp"
  75. , "BulletCollision/CollisionShapes/btStaticPlaneShape.cpp"
  76. , "BulletCollision/CollisionShapes/btStridingMeshInterface.cpp"
  77. , "BulletCollision/CollisionShapes/btTetrahedronShape.cpp"
  78. , "BulletCollision/CollisionShapes/btTriangleBuffer.cpp"
  79. , "BulletCollision/CollisionShapes/btTriangleCallback.cpp"
  80. , "BulletCollision/CollisionShapes/btTriangleIndexVertexArray.cpp"
  81. , "BulletCollision/CollisionShapes/btTriangleIndexVertexMaterialArray.cpp"
  82. , "BulletCollision/CollisionShapes/btTriangleMesh.cpp"
  83. , "BulletCollision/CollisionShapes/btTriangleMeshShape.cpp"
  84. , "BulletCollision/CollisionShapes/btUniformScalingShape.cpp"
  85. , "BulletCollision/Gimpact/btContactProcessing.cpp"
  86. , "BulletCollision/Gimpact/btGenericPoolAllocator.cpp"
  87. , "BulletCollision/Gimpact/btGImpactBvh.cpp"
  88. , "BulletCollision/Gimpact/btGImpactCollisionAlgorithm.cpp"
  89. , "BulletCollision/Gimpact/btGImpactQuantizedBvh.cpp"
  90. , "BulletCollision/Gimpact/btGImpactShape.cpp"
  91. , "BulletCollision/Gimpact/btTriangleShapeEx.cpp"
  92. , "BulletCollision/Gimpact/gim_box_set.cpp"
  93. , "BulletCollision/Gimpact/gim_contact.cpp"
  94. , "BulletCollision/Gimpact/gim_memory.cpp"
  95. , "BulletCollision/Gimpact/gim_tri_collision.cpp"
  96. , "BulletCollision/NarrowPhaseCollision/btContinuousConvexCollision.cpp"
  97. , "BulletCollision/NarrowPhaseCollision/btConvexCast.cpp"
  98. , "BulletCollision/NarrowPhaseCollision/btGjkConvexCast.cpp"
  99. , "BulletCollision/NarrowPhaseCollision/btGjkEpa2.cpp"
  100. , "BulletCollision/NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp"
  101. , "BulletCollision/NarrowPhaseCollision/btGjkPairDetector.cpp"
  102. , "BulletCollision/NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp"
  103. , "BulletCollision/NarrowPhaseCollision/btPersistentManifold.cpp"
  104. , "BulletCollision/NarrowPhaseCollision/btRaycastCallback.cpp"
  105. , "BulletCollision/NarrowPhaseCollision/btSubSimplexConvexCast.cpp"
  106. , "BulletCollision/NarrowPhaseCollision/btVoronoiSimplexSolver.cpp"
  107. , "BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp"
  108. # BulletDynamics
  109. , "BulletDynamics/Character/btKinematicCharacterController.cpp"
  110. , "BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp"
  111. , "BulletDynamics/ConstraintSolver/btContactConstraint.cpp"
  112. , "BulletDynamics/ConstraintSolver/btFixedConstraint.cpp"
  113. , "BulletDynamics/ConstraintSolver/btGearConstraint.cpp"
  114. , "BulletDynamics/ConstraintSolver/btGeneric6DofConstraint.cpp"
  115. , "BulletDynamics/ConstraintSolver/btGeneric6DofSpringConstraint.cpp"
  116. , "BulletDynamics/ConstraintSolver/btGeneric6DofSpring2Constraint.cpp"
  117. , "BulletDynamics/ConstraintSolver/btHinge2Constraint.cpp"
  118. , "BulletDynamics/ConstraintSolver/btHingeConstraint.cpp"
  119. , "BulletDynamics/ConstraintSolver/btPoint2PointConstraint.cpp"
  120. , "BulletDynamics/ConstraintSolver/btSequentialImpulseConstraintSolver.cpp"
  121. , "BulletDynamics/ConstraintSolver/btNNCGConstraintSolver.cpp"
  122. , "BulletDynamics/ConstraintSolver/btSliderConstraint.cpp"
  123. , "BulletDynamics/ConstraintSolver/btSolve2LinearConstraint.cpp"
  124. , "BulletDynamics/ConstraintSolver/btTypedConstraint.cpp"
  125. , "BulletDynamics/ConstraintSolver/btUniversalConstraint.cpp"
  126. , "BulletDynamics/Dynamics/btDiscreteDynamicsWorld.cpp"
  127. , "BulletDynamics/Dynamics/btDiscreteDynamicsWorldMt.cpp"
  128. , "BulletDynamics/Dynamics/btSimulationIslandManagerMt.cpp"
  129. , "BulletDynamics/Dynamics/btRigidBody.cpp"
  130. , "BulletDynamics/Dynamics/btSimpleDynamicsWorld.cpp"
  131. #, "BulletDynamics/Dynamics/Bullet-C-API.cpp"
  132. , "BulletDynamics/Vehicle/btRaycastVehicle.cpp"
  133. , "BulletDynamics/Vehicle/btWheelInfo.cpp"
  134. , "BulletDynamics/Featherstone/btMultiBody.cpp"
  135. , "BulletDynamics/Featherstone/btMultiBodyConstraintSolver.cpp"
  136. , "BulletDynamics/Featherstone/btMultiBodyDynamicsWorld.cpp"
  137. , "BulletDynamics/Featherstone/btMultiBodyJointLimitConstraint.cpp"
  138. , "BulletDynamics/Featherstone/btMultiBodyConstraint.cpp"
  139. , "BulletDynamics/Featherstone/btMultiBodyPoint2Point.cpp"
  140. , "BulletDynamics/Featherstone/btMultiBodyFixedConstraint.cpp"
  141. , "BulletDynamics/Featherstone/btMultiBodySliderConstraint.cpp"
  142. , "BulletDynamics/Featherstone/btMultiBodyJointMotor.cpp"
  143. , "BulletDynamics/Featherstone/btMultiBodyGearConstraint.cpp"
  144. , "BulletDynamics/MLCPSolvers/btDantzigLCP.cpp"
  145. , "BulletDynamics/MLCPSolvers/btMLCPSolver.cpp"
  146. , "BulletDynamics/MLCPSolvers/btLemkeAlgorithm.cpp"
  147. # BulletInverseDynamics
  148. , "BulletInverseDynamics/IDMath.cpp"
  149. , "BulletInverseDynamics/MultiBodyTree.cpp"
  150. , "BulletInverseDynamics/details/MultiBodyTreeInitCache.cpp"
  151. , "BulletInverseDynamics/details/MultiBodyTreeImpl.cpp"
  152. # BulletSoftBody
  153. , "BulletSoftBody/btSoftBody.cpp"
  154. , "BulletSoftBody/btSoftBodyConcaveCollisionAlgorithm.cpp"
  155. , "BulletSoftBody/btSoftBodyHelpers.cpp"
  156. , "BulletSoftBody/btSoftBodyRigidBodyCollisionConfiguration.cpp"
  157. , "BulletSoftBody/btSoftRigidCollisionAlgorithm.cpp"
  158. , "BulletSoftBody/btSoftRigidDynamicsWorld.cpp"
  159. , "BulletSoftBody/btSoftMultiBodyDynamicsWorld.cpp"
  160. , "BulletSoftBody/btSoftSoftCollisionAlgorithm.cpp"
  161. , "BulletSoftBody/btDefaultSoftBodySolver.cpp"
  162. # clew
  163. , "clew/clew.c"
  164. # LinearMath
  165. , "LinearMath/btAlignedAllocator.cpp"
  166. , "LinearMath/btConvexHull.cpp"
  167. , "LinearMath/btConvexHullComputer.cpp"
  168. , "LinearMath/btGeometryUtil.cpp"
  169. , "LinearMath/btPolarDecomposition.cpp"
  170. , "LinearMath/btQuickprof.cpp"
  171. , "LinearMath/btSerializer.cpp"
  172. , "LinearMath/btSerializer64.cpp"
  173. , "LinearMath/btThreads.cpp"
  174. , "LinearMath/btVector3.cpp"
  175. ]
  176. thirdparty_sources = [thirdparty_dir + file for file in bullet2_src]
  177. env_bullet.Append(CPPPATH=[thirdparty_dir])
  178. env_thirdparty = env_bullet.Clone()
  179. env_thirdparty.disable_warnings()
  180. env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
  181. # Godot source files
  182. env_bullet.add_source_files(env.modules_sources, "*.cpp")