CMakeLists.txt 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src )
  2. SET(BulletDynamics_SRCS
  3. Character/btKinematicCharacterController.cpp
  4. ConstraintSolver/btConeTwistConstraint.cpp
  5. ConstraintSolver/btContactConstraint.cpp
  6. ConstraintSolver/btFixedConstraint.cpp
  7. ConstraintSolver/btGearConstraint.cpp
  8. ConstraintSolver/btGeneric6DofConstraint.cpp
  9. ConstraintSolver/btGeneric6DofSpringConstraint.cpp
  10. ConstraintSolver/btGeneric6DofSpring2Constraint.cpp
  11. ConstraintSolver/btHinge2Constraint.cpp
  12. ConstraintSolver/btHingeConstraint.cpp
  13. ConstraintSolver/btPoint2PointConstraint.cpp
  14. ConstraintSolver/btSequentialImpulseConstraintSolver.cpp
  15. ConstraintSolver/btSequentialImpulseConstraintSolverMt.cpp
  16. ConstraintSolver/btBatchedConstraints.cpp
  17. ConstraintSolver/btNNCGConstraintSolver.cpp
  18. ConstraintSolver/btSliderConstraint.cpp
  19. ConstraintSolver/btSolve2LinearConstraint.cpp
  20. ConstraintSolver/btTypedConstraint.cpp
  21. ConstraintSolver/btUniversalConstraint.cpp
  22. Dynamics/btDiscreteDynamicsWorld.cpp
  23. Dynamics/btDiscreteDynamicsWorldMt.cpp
  24. Dynamics/btSimulationIslandManagerMt.cpp
  25. Dynamics/btRigidBody.cpp
  26. Dynamics/btSimpleDynamicsWorld.cpp
  27. # Dynamics/Bullet-C-API.cpp
  28. Vehicle/btRaycastVehicle.cpp
  29. Vehicle/btWheelInfo.cpp
  30. Featherstone/btMultiBody.cpp
  31. Featherstone/btMultiBodyConstraint.cpp
  32. Featherstone/btMultiBodyConstraintSolver.cpp
  33. Featherstone/btMultiBodyDynamicsWorld.cpp
  34. Featherstone/btMultiBodyFixedConstraint.cpp
  35. Featherstone/btMultiBodyGearConstraint.cpp
  36. Featherstone/btMultiBodyJointLimitConstraint.cpp
  37. Featherstone/btMultiBodyJointMotor.cpp
  38. Featherstone/btMultiBodyMLCPConstraintSolver.cpp
  39. Featherstone/btMultiBodyPoint2Point.cpp
  40. Featherstone/btMultiBodySliderConstraint.cpp
  41. Featherstone/btMultiBodySphericalJointMotor.cpp
  42. Featherstone/btMultiBodySphericalJointLimit.cpp
  43. MLCPSolvers/btDantzigLCP.cpp
  44. MLCPSolvers/btMLCPSolver.cpp
  45. MLCPSolvers/btLemkeAlgorithm.cpp
  46. )
  47. SET(Root_HDRS
  48. ../btBulletDynamicsCommon.h
  49. ../btBulletCollisionCommon.h
  50. )
  51. SET(ConstraintSolver_HDRS
  52. ConstraintSolver/btConeTwistConstraint.h
  53. ConstraintSolver/btConstraintSolver.h
  54. ConstraintSolver/btContactConstraint.h
  55. ConstraintSolver/btContactSolverInfo.h
  56. ConstraintSolver/btFixedConstraint.h
  57. ConstraintSolver/btGearConstraint.h
  58. ConstraintSolver/btGeneric6DofConstraint.h
  59. ConstraintSolver/btGeneric6DofSpringConstraint.h
  60. ConstraintSolver/btGeneric6DofSpring2Constraint.h
  61. ConstraintSolver/btHinge2Constraint.h
  62. ConstraintSolver/btHingeConstraint.h
  63. ConstraintSolver/btJacobianEntry.h
  64. ConstraintSolver/btPoint2PointConstraint.h
  65. ConstraintSolver/btSequentialImpulseConstraintSolver.h
  66. ConstraintSolver/btSequentialImpulseConstraintSolverMt.h
  67. ConstraintSolver/btNNCGConstraintSolver.h
  68. ConstraintSolver/btSliderConstraint.h
  69. ConstraintSolver/btSolve2LinearConstraint.h
  70. ConstraintSolver/btSolverBody.h
  71. ConstraintSolver/btSolverConstraint.h
  72. ConstraintSolver/btTypedConstraint.h
  73. ConstraintSolver/btUniversalConstraint.h
  74. )
  75. SET(Dynamics_HDRS
  76. Dynamics/btActionInterface.h
  77. Dynamics/btDiscreteDynamicsWorld.h
  78. Dynamics/btDiscreteDynamicsWorldMt.h
  79. Dynamics/btSimulationIslandManagerMt.h
  80. Dynamics/btDynamicsWorld.h
  81. Dynamics/btSimpleDynamicsWorld.h
  82. Dynamics/btRigidBody.h
  83. )
  84. SET(Vehicle_HDRS
  85. Vehicle/btRaycastVehicle.h
  86. Vehicle/btVehicleRaycaster.h
  87. Vehicle/btWheelInfo.h
  88. )
  89. SET(Featherstone_HDRS
  90. Featherstone/btMultiBody.h
  91. Featherstone/btMultiBodyConstraint.h
  92. Featherstone/btMultiBodyConstraintSolver.h
  93. Featherstone/btMultiBodyDynamicsWorld.h
  94. Featherstone/btMultiBodyFixedConstraint.h
  95. Featherstone/btMultiBodyGearConstraint.h
  96. Featherstone/btMultiBodyJointLimitConstraint.h
  97. Featherstone/btMultiBodyJointMotor.h
  98. Featherstone/btMultiBodyLink.h
  99. Featherstone/btMultiBodyLinkCollider.h
  100. Featherstone/btMultiBodyMLCPConstraintSolver.h
  101. Featherstone/btMultiBodyPoint2Point.h
  102. Featherstone/btMultiBodySliderConstraint.h
  103. Featherstone/btMultiBodySolverConstraint.h
  104. Featherstone/btMultiBodySphericalJointMotor.h
  105. Featherstone/btMultiBodySphericalJointLimit.h
  106. )
  107. SET(MLCPSolvers_HDRS
  108. MLCPSolvers/btDantzigLCP.h
  109. MLCPSolvers/btDantzigSolver.h
  110. MLCPSolvers/btMLCPSolver.h
  111. MLCPSolvers/btMLCPSolverInterface.h
  112. MLCPSolvers/btPATHSolver.h
  113. MLCPSolvers/btSolveProjectedGaussSeidel.h
  114. MLCPSolvers/btLemkeSolver.h
  115. MLCPSolvers/btLemkeAlgorithm.h
  116. )
  117. SET(Character_HDRS
  118. Character/btCharacterControllerInterface.h
  119. Character/btKinematicCharacterController.h
  120. )
  121. SET(BulletDynamics_HDRS
  122. ${Root_HDRS}
  123. ${ConstraintSolver_HDRS}
  124. ${Dynamics_HDRS}
  125. ${Vehicle_HDRS}
  126. ${Character_HDRS}
  127. ${Featherstone_HDRS}
  128. ${MLCPSolvers_HDRS}
  129. )
  130. ADD_LIBRARY(BulletDynamics ${BulletDynamics_SRCS} ${BulletDynamics_HDRS})
  131. SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES VERSION ${BULLET_VERSION})
  132. SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES SOVERSION ${BULLET_VERSION})
  133. IF (BUILD_SHARED_LIBS)
  134. TARGET_LINK_LIBRARIES(BulletDynamics BulletCollision LinearMath)
  135. ENDIF (BUILD_SHARED_LIBS)
  136. IF (INSTALL_LIBS)
  137. IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
  138. IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
  139. IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  140. INSTALL(TARGETS BulletDynamics DESTINATION .)
  141. ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  142. INSTALL(TARGETS BulletDynamics RUNTIME DESTINATION bin
  143. LIBRARY DESTINATION lib${LIB_SUFFIX}
  144. ARCHIVE DESTINATION lib${LIB_SUFFIX})
  145. INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
  146. DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
  147. ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
  148. INSTALL(FILES ../btBulletDynamicsCommon.h
  149. DESTINATION ${INCLUDE_INSTALL_DIR}/BulletDynamics)
  150. ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  151. ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
  152. IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  153. SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES FRAMEWORK true)
  154. SET_TARGET_PROPERTIES(BulletDynamics PROPERTIES PUBLIC_HEADER "${Root_HDRS}")
  155. # Have to list out sub-directories manually:
  156. SET_PROPERTY(SOURCE ${ConstraintSolver_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/ConstraintSolver)
  157. SET_PROPERTY(SOURCE ${Dynamics_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Dynamics)
  158. SET_PROPERTY(SOURCE ${Vehicle_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Vehicle)
  159. SET_PROPERTY(SOURCE ${Character_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Character)
  160. SET_PROPERTY(SOURCE ${Featherstone_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Featherstone)
  161. SET_PROPERTY(SOURCE ${MLCPSolvers_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/MLCPSolvers)
  162. ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
  163. ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
  164. ENDIF (INSTALL_LIBS)