CMakeLists.txt 6.1 KB

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