Jolt.cmake 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527
  1. # Requires C++ 17
  2. set(CMAKE_CXX_STANDARD 17)
  3. set(CMAKE_CXX_STANDARD_REQUIRED ON)
  4. set(CMAKE_CXX_EXTENSIONS OFF)
  5. # Root
  6. set(JOLT_PHYSICS_ROOT ${PHYSICS_REPO_ROOT}/Jolt)
  7. # Source files
  8. set(JOLT_PHYSICS_SRC_FILES
  9. ${JOLT_PHYSICS_ROOT}/AABBTree/AABBTreeBuilder.cpp
  10. ${JOLT_PHYSICS_ROOT}/AABBTree/AABBTreeBuilder.h
  11. ${JOLT_PHYSICS_ROOT}/AABBTree/AABBTreeToBuffer.h
  12. ${JOLT_PHYSICS_ROOT}/AABBTree/NodeCodec/NodeCodecQuadTreeHalfFloat.h
  13. ${JOLT_PHYSICS_ROOT}/AABBTree/TriangleCodec/TriangleCodecIndexed8BitPackSOA4Flags.h
  14. ${JOLT_PHYSICS_ROOT}/Core/ARMNeon.h
  15. ${JOLT_PHYSICS_ROOT}/Core/Atomics.h
  16. ${JOLT_PHYSICS_ROOT}/Core/ByteBuffer.h
  17. ${JOLT_PHYSICS_ROOT}/Core/Color.cpp
  18. ${JOLT_PHYSICS_ROOT}/Core/Color.h
  19. ${JOLT_PHYSICS_ROOT}/Core/Core.h
  20. ${JOLT_PHYSICS_ROOT}/Core/Factory.cpp
  21. ${JOLT_PHYSICS_ROOT}/Core/Factory.h
  22. ${JOLT_PHYSICS_ROOT}/Core/FixedSizeFreeList.h
  23. ${JOLT_PHYSICS_ROOT}/Core/FixedSizeFreeList.inl
  24. ${JOLT_PHYSICS_ROOT}/Core/FPControlWord.h
  25. ${JOLT_PHYSICS_ROOT}/Core/FPException.h
  26. ${JOLT_PHYSICS_ROOT}/Core/FPFlushDenormals.h
  27. ${JOLT_PHYSICS_ROOT}/Core/HashCombine.h
  28. ${JOLT_PHYSICS_ROOT}/Core/InsertionSort.h
  29. ${JOLT_PHYSICS_ROOT}/Core/IssueReporting.cpp
  30. ${JOLT_PHYSICS_ROOT}/Core/IssueReporting.h
  31. ${JOLT_PHYSICS_ROOT}/Core/JobSystem.h
  32. ${JOLT_PHYSICS_ROOT}/Core/JobSystem.inl
  33. ${JOLT_PHYSICS_ROOT}/Core/JobSystemThreadPool.cpp
  34. ${JOLT_PHYSICS_ROOT}/Core/JobSystemThreadPool.h
  35. ${JOLT_PHYSICS_ROOT}/Core/LinearCurve.cpp
  36. ${JOLT_PHYSICS_ROOT}/Core/LinearCurve.h
  37. ${JOLT_PHYSICS_ROOT}/Core/LockFreeHashMap.h
  38. ${JOLT_PHYSICS_ROOT}/Core/LockFreeHashMap.inl
  39. ${JOLT_PHYSICS_ROOT}/Core/Memory.cpp
  40. ${JOLT_PHYSICS_ROOT}/Core/Memory.h
  41. ${JOLT_PHYSICS_ROOT}/Core/Mutex.h
  42. ${JOLT_PHYSICS_ROOT}/Core/MutexArray.h
  43. ${JOLT_PHYSICS_ROOT}/Core/NonCopyable.h
  44. ${JOLT_PHYSICS_ROOT}/Core/Profiler.cpp
  45. ${JOLT_PHYSICS_ROOT}/Core/Profiler.h
  46. ${JOLT_PHYSICS_ROOT}/Core/Profiler.inl
  47. ${JOLT_PHYSICS_ROOT}/Core/QuickSort.h
  48. ${JOLT_PHYSICS_ROOT}/Core/Reference.h
  49. ${JOLT_PHYSICS_ROOT}/Core/Result.h
  50. ${JOLT_PHYSICS_ROOT}/Core/RTTI.cpp
  51. ${JOLT_PHYSICS_ROOT}/Core/RTTI.h
  52. ${JOLT_PHYSICS_ROOT}/Core/StaticArray.h
  53. ${JOLT_PHYSICS_ROOT}/Core/StreamIn.h
  54. ${JOLT_PHYSICS_ROOT}/Core/StreamOut.h
  55. ${JOLT_PHYSICS_ROOT}/Core/StreamWrapper.h
  56. ${JOLT_PHYSICS_ROOT}/Core/StringTools.cpp
  57. ${JOLT_PHYSICS_ROOT}/Core/StringTools.h
  58. ${JOLT_PHYSICS_ROOT}/Core/STLAlignedAllocator.h
  59. ${JOLT_PHYSICS_ROOT}/Core/STLAllocator.h
  60. ${JOLT_PHYSICS_ROOT}/Core/STLTempAllocator.h
  61. ${JOLT_PHYSICS_ROOT}/Core/TempAllocator.h
  62. ${JOLT_PHYSICS_ROOT}/Core/TickCounter.cpp
  63. ${JOLT_PHYSICS_ROOT}/Core/TickCounter.h
  64. ${JOLT_PHYSICS_ROOT}/Core/UnorderedMap.h
  65. ${JOLT_PHYSICS_ROOT}/Core/UnorderedSet.h
  66. ${JOLT_PHYSICS_ROOT}/Geometry/AABox.h
  67. ${JOLT_PHYSICS_ROOT}/Geometry/AABox4.h
  68. ${JOLT_PHYSICS_ROOT}/Geometry/ClipPoly.h
  69. ${JOLT_PHYSICS_ROOT}/Geometry/ClosestPoint.h
  70. ${JOLT_PHYSICS_ROOT}/Geometry/ConvexHullBuilder.cpp
  71. ${JOLT_PHYSICS_ROOT}/Geometry/ConvexHullBuilder.h
  72. ${JOLT_PHYSICS_ROOT}/Geometry/ConvexHullBuilder2D.cpp
  73. ${JOLT_PHYSICS_ROOT}/Geometry/ConvexHullBuilder2D.h
  74. ${JOLT_PHYSICS_ROOT}/Geometry/ConvexSupport.h
  75. ${JOLT_PHYSICS_ROOT}/Geometry/Ellipse.h
  76. ${JOLT_PHYSICS_ROOT}/Geometry/EPAConvexHullBuilder.h
  77. ${JOLT_PHYSICS_ROOT}/Geometry/EPAPenetrationDepth.h
  78. ${JOLT_PHYSICS_ROOT}/Geometry/GJKClosestPoint.h
  79. ${JOLT_PHYSICS_ROOT}/Geometry/IndexedTriangle.h
  80. ${JOLT_PHYSICS_ROOT}/Geometry/Indexify.cpp
  81. ${JOLT_PHYSICS_ROOT}/Geometry/Indexify.h
  82. ${JOLT_PHYSICS_ROOT}/Geometry/MortonCode.h
  83. ${JOLT_PHYSICS_ROOT}/Geometry/OrientedBox.cpp
  84. ${JOLT_PHYSICS_ROOT}/Geometry/OrientedBox.h
  85. ${JOLT_PHYSICS_ROOT}/Geometry/Plane.h
  86. ${JOLT_PHYSICS_ROOT}/Geometry/RayAABox.h
  87. ${JOLT_PHYSICS_ROOT}/Geometry/RayAABox8.h
  88. ${JOLT_PHYSICS_ROOT}/Geometry/RayCapsule.h
  89. ${JOLT_PHYSICS_ROOT}/Geometry/RayCylinder.h
  90. ${JOLT_PHYSICS_ROOT}/Geometry/RaySphere.h
  91. ${JOLT_PHYSICS_ROOT}/Geometry/RayTriangle.h
  92. ${JOLT_PHYSICS_ROOT}/Geometry/RayTriangle8.h
  93. ${JOLT_PHYSICS_ROOT}/Geometry/Sphere.h
  94. ${JOLT_PHYSICS_ROOT}/Geometry/Triangle.h
  95. ${JOLT_PHYSICS_ROOT}/Jolt.cmake
  96. ${JOLT_PHYSICS_ROOT}/Jolt.h
  97. ${JOLT_PHYSICS_ROOT}/Math/DMat44.h
  98. ${JOLT_PHYSICS_ROOT}/Math/DMat44.inl
  99. ${JOLT_PHYSICS_ROOT}/Math/Double3.h
  100. ${JOLT_PHYSICS_ROOT}/Math/DVec3.h
  101. ${JOLT_PHYSICS_ROOT}/Math/DVec3.inl
  102. ${JOLT_PHYSICS_ROOT}/Math/DynMatrix.h
  103. ${JOLT_PHYSICS_ROOT}/Math/EigenValueSymmetric.h
  104. ${JOLT_PHYSICS_ROOT}/Math/FindRoot.h
  105. ${JOLT_PHYSICS_ROOT}/Math/Float2.h
  106. ${JOLT_PHYSICS_ROOT}/Math/Float3.h
  107. ${JOLT_PHYSICS_ROOT}/Math/Float4.h
  108. ${JOLT_PHYSICS_ROOT}/Math/GaussianElimination.h
  109. ${JOLT_PHYSICS_ROOT}/Math/HalfFloat.h
  110. ${JOLT_PHYSICS_ROOT}/Math/Mat44.h
  111. ${JOLT_PHYSICS_ROOT}/Math/Mat44.inl
  112. ${JOLT_PHYSICS_ROOT}/Math/Math.h
  113. ${JOLT_PHYSICS_ROOT}/Math/MathTypes.h
  114. ${JOLT_PHYSICS_ROOT}/Math/Matrix.h
  115. ${JOLT_PHYSICS_ROOT}/Math/Quat.h
  116. ${JOLT_PHYSICS_ROOT}/Math/Quat.inl
  117. ${JOLT_PHYSICS_ROOT}/Math/Real.h
  118. ${JOLT_PHYSICS_ROOT}/Math/Swizzle.h
  119. ${JOLT_PHYSICS_ROOT}/Math/Trigonometry.h
  120. ${JOLT_PHYSICS_ROOT}/Math/UVec4.cpp
  121. ${JOLT_PHYSICS_ROOT}/Math/UVec4.h
  122. ${JOLT_PHYSICS_ROOT}/Math/UVec4.inl
  123. ${JOLT_PHYSICS_ROOT}/Math/UVec8.h
  124. ${JOLT_PHYSICS_ROOT}/Math/UVec8.inl
  125. ${JOLT_PHYSICS_ROOT}/Math/Vec3.cpp
  126. ${JOLT_PHYSICS_ROOT}/Math/Vec3.h
  127. ${JOLT_PHYSICS_ROOT}/Math/Vec3.inl
  128. ${JOLT_PHYSICS_ROOT}/Math/Vec4.h
  129. ${JOLT_PHYSICS_ROOT}/Math/Vec4.inl
  130. ${JOLT_PHYSICS_ROOT}/Math/Vec8.h
  131. ${JOLT_PHYSICS_ROOT}/Math/Vec8.inl
  132. ${JOLT_PHYSICS_ROOT}/Math/Vector.h
  133. ${JOLT_PHYSICS_ROOT}/ObjectStream/GetPrimitiveTypeOfType.h
  134. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStream.cpp
  135. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStream.h
  136. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamBinaryIn.cpp
  137. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamBinaryIn.h
  138. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamBinaryOut.cpp
  139. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamBinaryOut.h
  140. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamIn.cpp
  141. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamIn.h
  142. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamOut.cpp
  143. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamOut.h
  144. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamTextIn.cpp
  145. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamTextIn.h
  146. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamTextOut.cpp
  147. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamTextOut.h
  148. ${JOLT_PHYSICS_ROOT}/ObjectStream/ObjectStreamTypes.h
  149. ${JOLT_PHYSICS_ROOT}/ObjectStream/SerializableAttribute.h
  150. ${JOLT_PHYSICS_ROOT}/ObjectStream/SerializableAttributeEnum.h
  151. ${JOLT_PHYSICS_ROOT}/ObjectStream/SerializableAttributeTyped.h
  152. ${JOLT_PHYSICS_ROOT}/ObjectStream/SerializableObject.cpp
  153. ${JOLT_PHYSICS_ROOT}/ObjectStream/SerializableObject.h
  154. ${JOLT_PHYSICS_ROOT}/ObjectStream/TypeDeclarations.cpp
  155. ${JOLT_PHYSICS_ROOT}/ObjectStream/TypeDeclarations.h
  156. ${JOLT_PHYSICS_ROOT}/Physics/Body/Body.cpp
  157. ${JOLT_PHYSICS_ROOT}/Physics/Body/Body.h
  158. ${JOLT_PHYSICS_ROOT}/Physics/Body/Body.inl
  159. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyAccess.cpp
  160. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyAccess.h
  161. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyActivationListener.h
  162. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyCreationSettings.cpp
  163. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyCreationSettings.h
  164. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyFilter.h
  165. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyID.h
  166. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyInterface.cpp
  167. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyInterface.h
  168. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyLock.h
  169. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyLockInterface.h
  170. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyLockMulti.h
  171. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyManager.cpp
  172. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyManager.h
  173. ${JOLT_PHYSICS_ROOT}/Physics/Body/BodyPair.h
  174. ${JOLT_PHYSICS_ROOT}/Physics/Body/MassProperties.cpp
  175. ${JOLT_PHYSICS_ROOT}/Physics/Body/MassProperties.h
  176. ${JOLT_PHYSICS_ROOT}/Physics/Body/MotionProperties.cpp
  177. ${JOLT_PHYSICS_ROOT}/Physics/Body/MotionProperties.h
  178. ${JOLT_PHYSICS_ROOT}/Physics/Body/MotionProperties.inl
  179. ${JOLT_PHYSICS_ROOT}/Physics/Body/MotionQuality.h
  180. ${JOLT_PHYSICS_ROOT}/Physics/Body/MotionType.h
  181. ${JOLT_PHYSICS_ROOT}/Physics/Character/Character.cpp
  182. ${JOLT_PHYSICS_ROOT}/Physics/Character/Character.h
  183. ${JOLT_PHYSICS_ROOT}/Physics/Character/CharacterBase.cpp
  184. ${JOLT_PHYSICS_ROOT}/Physics/Character/CharacterBase.h
  185. ${JOLT_PHYSICS_ROOT}/Physics/Character/CharacterVirtual.cpp
  186. ${JOLT_PHYSICS_ROOT}/Physics/Character/CharacterVirtual.h
  187. ${JOLT_PHYSICS_ROOT}/Physics/Collision/AABoxCast.h
  188. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ActiveEdgeMode.h
  189. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ActiveEdges.h
  190. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BackFaceMode.h
  191. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhase.cpp
  192. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhase.h
  193. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseBruteForce.cpp
  194. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseBruteForce.h
  195. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseLayer.h
  196. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseQuadTree.cpp
  197. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseQuadTree.h
  198. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/BroadPhaseQuery.h
  199. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/QuadTree.cpp
  200. ${JOLT_PHYSICS_ROOT}/Physics/Collision/BroadPhase/QuadTree.h
  201. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CastConvexVsTriangles.cpp
  202. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CastConvexVsTriangles.h
  203. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CastSphereVsTriangles.cpp
  204. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CastSphereVsTriangles.h
  205. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CastResult.h
  206. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollectFacesMode.h
  207. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollideConvexVsTriangles.cpp
  208. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollideConvexVsTriangles.h
  209. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollidePointResult.h
  210. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollideShape.h
  211. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollideSphereVsTriangles.cpp
  212. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollideSphereVsTriangles.h
  213. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionCollector.h
  214. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionCollectorImpl.h
  215. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionDispatch.cpp
  216. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionDispatch.h
  217. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionGroup.cpp
  218. ${JOLT_PHYSICS_ROOT}/Physics/Collision/CollisionGroup.h
  219. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ContactListener.h
  220. ${JOLT_PHYSICS_ROOT}/Physics/Collision/EstimateCollisionResponse.cpp
  221. ${JOLT_PHYSICS_ROOT}/Physics/Collision/EstimateCollisionResponse.h
  222. ${JOLT_PHYSICS_ROOT}/Physics/Collision/GroupFilter.cpp
  223. ${JOLT_PHYSICS_ROOT}/Physics/Collision/GroupFilter.h
  224. ${JOLT_PHYSICS_ROOT}/Physics/Collision/GroupFilterTable.cpp
  225. ${JOLT_PHYSICS_ROOT}/Physics/Collision/GroupFilterTable.h
  226. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ManifoldBetweenTwoFaces.cpp
  227. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ManifoldBetweenTwoFaces.h
  228. ${JOLT_PHYSICS_ROOT}/Physics/Collision/NarrowPhaseQuery.cpp
  229. ${JOLT_PHYSICS_ROOT}/Physics/Collision/NarrowPhaseQuery.h
  230. ${JOLT_PHYSICS_ROOT}/Physics/Collision/NarrowPhaseStats.cpp
  231. ${JOLT_PHYSICS_ROOT}/Physics/Collision/NarrowPhaseStats.h
  232. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ObjectLayer.h
  233. ${JOLT_PHYSICS_ROOT}/Physics/Collision/PhysicsMaterial.cpp
  234. ${JOLT_PHYSICS_ROOT}/Physics/Collision/PhysicsMaterial.h
  235. ${JOLT_PHYSICS_ROOT}/Physics/Collision/PhysicsMaterialSimple.cpp
  236. ${JOLT_PHYSICS_ROOT}/Physics/Collision/PhysicsMaterialSimple.h
  237. ${JOLT_PHYSICS_ROOT}/Physics/Collision/RayCast.h
  238. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/BoxShape.cpp
  239. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/BoxShape.h
  240. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CapsuleShape.cpp
  241. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CapsuleShape.h
  242. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CompoundShape.cpp
  243. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CompoundShape.h
  244. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CompoundShapeVisitors.h
  245. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ConvexHullShape.cpp
  246. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ConvexHullShape.h
  247. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ConvexShape.cpp
  248. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ConvexShape.h
  249. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CylinderShape.cpp
  250. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/CylinderShape.h
  251. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/DecoratedShape.cpp
  252. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/DecoratedShape.h
  253. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/GetTrianglesContext.h
  254. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/HeightFieldShape.cpp
  255. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/HeightFieldShape.h
  256. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/MeshShape.cpp
  257. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/MeshShape.h
  258. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/MutableCompoundShape.cpp
  259. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/MutableCompoundShape.h
  260. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/OffsetCenterOfMassShape.cpp
  261. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/OffsetCenterOfMassShape.h
  262. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/PolyhedronSubmergedVolumeCalculator.h
  263. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/RotatedTranslatedShape.cpp
  264. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/RotatedTranslatedShape.h
  265. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ScaledShape.cpp
  266. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ScaledShape.h
  267. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/ScaleHelpers.h
  268. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/Shape.cpp
  269. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/Shape.h
  270. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/SphereShape.cpp
  271. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/SphereShape.h
  272. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/StaticCompoundShape.cpp
  273. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/StaticCompoundShape.h
  274. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/SubShapeID.h
  275. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/SubShapeIDPair.h
  276. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/TaperedCapsuleShape.cpp
  277. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/TaperedCapsuleShape.gliffy
  278. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/TaperedCapsuleShape.h
  279. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/TriangleShape.cpp
  280. ${JOLT_PHYSICS_ROOT}/Physics/Collision/Shape/TriangleShape.h
  281. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ShapeCast.h
  282. ${JOLT_PHYSICS_ROOT}/Physics/Collision/ShapeFilter.h
  283. ${JOLT_PHYSICS_ROOT}/Physics/Collision/SortReverseAndStore.h
  284. ${JOLT_PHYSICS_ROOT}/Physics/Collision/TransformedShape.cpp
  285. ${JOLT_PHYSICS_ROOT}/Physics/Collision/TransformedShape.h
  286. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConeConstraint.cpp
  287. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConeConstraint.h
  288. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/Constraint.cpp
  289. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/Constraint.h
  290. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintManager.cpp
  291. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintManager.h
  292. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/AngleConstraintPart.h
  293. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/AxisConstraintPart.h
  294. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/DualAxisConstraintPart.h
  295. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/GearConstraintPart.h
  296. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/HingeRotationConstraintPart.h
  297. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/IndependentAxisConstraintPart.h
  298. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/PointConstraintPart.h
  299. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/RackAndPinionConstraintPart.h
  300. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/RotationEulerConstraintPart.h
  301. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/RotationQuatConstraintPart.h
  302. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/SpringPart.h
  303. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ConstraintPart/SwingTwistConstraintPart.h
  304. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ContactConstraintManager.cpp
  305. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/ContactConstraintManager.h
  306. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/DistanceConstraint.cpp
  307. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/DistanceConstraint.h
  308. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/FixedConstraint.cpp
  309. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/FixedConstraint.h
  310. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/GearConstraint.cpp
  311. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/GearConstraint.h
  312. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/HingeConstraint.cpp
  313. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/HingeConstraint.h
  314. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/MotorSettings.cpp
  315. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/MotorSettings.h
  316. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraint.cpp
  317. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraint.h
  318. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraintPath.cpp
  319. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraintPath.h
  320. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraintPathHermite.cpp
  321. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PathConstraintPathHermite.h
  322. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PointConstraint.cpp
  323. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PointConstraint.h
  324. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PulleyConstraint.cpp
  325. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/PulleyConstraint.h
  326. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/RackAndPinionConstraint.cpp
  327. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/RackAndPinionConstraint.h
  328. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SixDOFConstraint.cpp
  329. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SixDOFConstraint.h
  330. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SliderConstraint.cpp
  331. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SliderConstraint.h
  332. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SwingTwistConstraint.cpp
  333. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/SwingTwistConstraint.h
  334. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/TwoBodyConstraint.cpp
  335. ${JOLT_PHYSICS_ROOT}/Physics/Constraints/TwoBodyConstraint.h
  336. ${JOLT_PHYSICS_ROOT}/Physics/DeterminismLog.cpp
  337. ${JOLT_PHYSICS_ROOT}/Physics/DeterminismLog.h
  338. ${JOLT_PHYSICS_ROOT}/Physics/EActivation.h
  339. ${JOLT_PHYSICS_ROOT}/Physics/IslandBuilder.cpp
  340. ${JOLT_PHYSICS_ROOT}/Physics/IslandBuilder.h
  341. ${JOLT_PHYSICS_ROOT}/Physics/LargeIslandSplitter.cpp
  342. ${JOLT_PHYSICS_ROOT}/Physics/LargeIslandSplitter.h
  343. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsLock.cpp
  344. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsLock.h
  345. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsScene.cpp
  346. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsScene.h
  347. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsSettings.h
  348. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsStepListener.h
  349. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsSystem.cpp
  350. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsSystem.h
  351. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsUpdateContext.cpp
  352. ${JOLT_PHYSICS_ROOT}/Physics/PhysicsUpdateContext.h
  353. ${JOLT_PHYSICS_ROOT}/Physics/Ragdoll/Ragdoll.cpp
  354. ${JOLT_PHYSICS_ROOT}/Physics/Ragdoll/Ragdoll.h
  355. ${JOLT_PHYSICS_ROOT}/Physics/StateRecorder.h
  356. ${JOLT_PHYSICS_ROOT}/Physics/StateRecorderImpl.cpp
  357. ${JOLT_PHYSICS_ROOT}/Physics/StateRecorderImpl.h
  358. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/TrackedVehicleController.cpp
  359. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/TrackedVehicleController.h
  360. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleAntiRollBar.cpp
  361. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleAntiRollBar.h
  362. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleCollisionTester.cpp
  363. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleCollisionTester.h
  364. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleConstraint.cpp
  365. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleConstraint.h
  366. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleController.cpp
  367. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleController.h
  368. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleDifferential.cpp
  369. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleDifferential.h
  370. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleEngine.cpp
  371. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleEngine.h
  372. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleTrack.cpp
  373. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleTrack.h
  374. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleTransmission.cpp
  375. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/VehicleTransmission.h
  376. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/Wheel.cpp
  377. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/Wheel.h
  378. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/WheeledVehicleController.cpp
  379. ${JOLT_PHYSICS_ROOT}/Physics/Vehicle/WheeledVehicleController.h
  380. ${JOLT_PHYSICS_ROOT}/RegisterTypes.cpp
  381. ${JOLT_PHYSICS_ROOT}/RegisterTypes.h
  382. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRenderer.cpp
  383. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRenderer.h
  384. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRendererPlayback.cpp
  385. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRendererPlayback.h
  386. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRendererRecorder.cpp
  387. ${JOLT_PHYSICS_ROOT}/Renderer/DebugRendererRecorder.h
  388. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletalAnimation.cpp
  389. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletalAnimation.h
  390. ${JOLT_PHYSICS_ROOT}/Skeleton/Skeleton.cpp
  391. ${JOLT_PHYSICS_ROOT}/Skeleton/Skeleton.h
  392. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletonMapper.cpp
  393. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletonMapper.h
  394. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletonPose.cpp
  395. ${JOLT_PHYSICS_ROOT}/Skeleton/SkeletonPose.h
  396. ${JOLT_PHYSICS_ROOT}/TriangleGrouper/TriangleGrouper.h
  397. ${JOLT_PHYSICS_ROOT}/TriangleGrouper/TriangleGrouperClosestCentroid.cpp
  398. ${JOLT_PHYSICS_ROOT}/TriangleGrouper/TriangleGrouperClosestCentroid.h
  399. ${JOLT_PHYSICS_ROOT}/TriangleGrouper/TriangleGrouperMorton.cpp
  400. ${JOLT_PHYSICS_ROOT}/TriangleGrouper/TriangleGrouperMorton.h
  401. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitter.cpp
  402. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitter.h
  403. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterBinning.cpp
  404. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterBinning.h
  405. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterFixedLeafSize.cpp
  406. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterFixedLeafSize.h
  407. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterLongestAxis.cpp
  408. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterLongestAxis.h
  409. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterMean.cpp
  410. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterMean.h
  411. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterMorton.cpp
  412. ${JOLT_PHYSICS_ROOT}/TriangleSplitter/TriangleSplitterMorton.h
  413. )
  414. if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
  415. # Add natvis file
  416. set(JOLT_PHYSICS_SRC_FILES ${JOLT_PHYSICS_SRC_FILES} ${JOLT_PHYSICS_ROOT}/Jolt.natvis)
  417. endif()
  418. # Group source files
  419. source_group(TREE ${JOLT_PHYSICS_ROOT} FILES ${JOLT_PHYSICS_SRC_FILES})
  420. # Create Jolt lib
  421. add_library(Jolt STATIC ${JOLT_PHYSICS_SRC_FILES})
  422. target_include_directories(Jolt PUBLIC ${PHYSICS_REPO_ROOT})
  423. target_precompile_headers(Jolt PRIVATE ${JOLT_PHYSICS_ROOT}/Jolt.h)
  424. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Debug>:_DEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")
  425. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Release>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")
  426. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Distribution>:NDEBUG>")
  427. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:ReleaseASAN>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DISABLE_TEMP_ALLOCATOR;JPH_DISABLE_CUSTOM_ALLOCATOR;JPH_DEBUG_RENDERER>")
  428. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:ReleaseUBSAN>:NDEBUG;JPH_PROFILE_ENABLED;JPH_DEBUG_RENDERER>")
  429. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:ReleaseCoverage>:NDEBUG>")
  430. # Setting floating point exceptions
  431. if (FLOATING_POINT_EXCEPTIONS_ENABLED AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  432. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Debug>:JPH_FLOATING_POINT_EXCEPTIONS_ENABLED>")
  433. target_compile_definitions(Jolt PUBLIC "$<$<CONFIG:Release>:JPH_FLOATING_POINT_EXCEPTIONS_ENABLED>")
  434. endif()
  435. # Setting double precision flag
  436. if (DOUBLE_PRECISION)
  437. target_compile_definitions(Jolt PUBLIC JPH_DOUBLE_PRECISION)
  438. endif()
  439. # Setting to attempt cross platform determinism
  440. if (CROSS_PLATFORM_DETERMINISTIC)
  441. target_compile_definitions(Jolt PUBLIC JPH_CROSS_PLATFORM_DETERMINISTIC)
  442. endif()
  443. # Emit the instruction set definitions to ensure that child projects use the same settings even if they override the used instruction sets (a mismatch causes link errors)
  444. function(EMIT_X86_INSTRUCTION_SET_DEFINITIONS)
  445. if (USE_AVX512)
  446. target_compile_definitions(Jolt PUBLIC JPH_USE_AVX512)
  447. endif()
  448. if (USE_AVX2)
  449. target_compile_definitions(Jolt PUBLIC JPH_USE_AVX2)
  450. endif()
  451. if (USE_AVX)
  452. target_compile_definitions(Jolt PUBLIC JPH_USE_AVX)
  453. endif()
  454. if (USE_SSE4_1)
  455. target_compile_definitions(Jolt PUBLIC JPH_USE_SSE4_1)
  456. endif()
  457. if (USE_SSE4_2)
  458. target_compile_definitions(Jolt PUBLIC JPH_USE_SSE4_2)
  459. endif()
  460. if (USE_LZCNT)
  461. target_compile_definitions(Jolt PUBLIC JPH_USE_LZCNT)
  462. endif()
  463. if (USE_TZCNT)
  464. target_compile_definitions(Jolt PUBLIC JPH_USE_TZCNT)
  465. endif()
  466. if (USE_F16C)
  467. target_compile_definitions(Jolt PUBLIC JPH_USE_F16C)
  468. endif()
  469. if (USE_FMADD AND NOT CROSS_PLATFORM_DETERMINISTIC)
  470. target_compile_definitions(Jolt PUBLIC JPH_USE_FMADD)
  471. endif()
  472. endfunction()
  473. # Add the compiler commandline flags to select the right instruction sets
  474. if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
  475. if ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x86" OR "${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
  476. if (USE_AVX512)
  477. target_compile_options(Jolt PUBLIC /arch:AVX512)
  478. elseif (USE_AVX2)
  479. target_compile_options(Jolt PUBLIC /arch:AVX2)
  480. elseif (USE_AVX)
  481. target_compile_options(Jolt PUBLIC /arch:AVX)
  482. endif()
  483. EMIT_X86_INSTRUCTION_SET_DEFINITIONS()
  484. endif()
  485. else()
  486. if (CROSS_COMPILE_ARM OR CMAKE_OSX_ARCHITECTURES MATCHES "arm64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
  487. # ARM64 uses no special commandline flags
  488. elseif ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "x86_64" OR "${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "AMD64")
  489. # x64
  490. if (USE_AVX512)
  491. target_compile_options(Jolt PUBLIC -mavx512f -mavx512vl -mavx512dq -mavx2 -mbmi -mpopcnt -mlzcnt -mf16c)
  492. elseif (USE_AVX2)
  493. target_compile_options(Jolt PUBLIC -mavx2 -mbmi -mpopcnt -mlzcnt -mf16c)
  494. elseif (USE_AVX)
  495. target_compile_options(Jolt PUBLIC -mavx -mpopcnt)
  496. elseif (USE_SSE4_2)
  497. target_compile_options(Jolt PUBLIC -msse4.2 -mpopcnt)
  498. elseif (USE_SSE4_1)
  499. target_compile_options(Jolt PUBLIC -msse4.1)
  500. else()
  501. target_compile_options(Jolt PUBLIC -msse2)
  502. endif()
  503. if (USE_LZCNT)
  504. target_compile_options(Jolt PUBLIC -mlzcnt)
  505. endif()
  506. if (USE_TZCNT)
  507. target_compile_options(Jolt PUBLIC -mbmi)
  508. endif()
  509. if (USE_F16C)
  510. target_compile_options(Jolt PUBLIC -mf16c)
  511. endif()
  512. if (USE_FMADD AND NOT CROSS_PLATFORM_DETERMINISTIC)
  513. target_compile_options(Jolt PUBLIC -mfma)
  514. endif()
  515. EMIT_X86_INSTRUCTION_SET_DEFINITIONS()
  516. endif()
  517. endif()