1 INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src ) 2 3 SET(BulletCollision_SRCS 4 BroadphaseCollision/btAxisSweep3.cpp 5 BroadphaseCollision/btBroadphaseProxy.cpp 6 BroadphaseCollision/btCollisionAlgorithm.cpp 7 BroadphaseCollision/btDbvt.cpp 8 BroadphaseCollision/btDbvtBroadphase.cpp 9 BroadphaseCollision/btDispatcher.cpp 10 BroadphaseCollision/btMultiSapBroadphase.cpp 11 BroadphaseCollision/btOverlappingPairCache.cpp 12 BroadphaseCollision/btQuantizedBvh.cpp 13 BroadphaseCollision/btSimpleBroadphase.cpp 14 CollisionDispatch/btActivatingCollisionAlgorithm.cpp 15 CollisionDispatch/btBoxBoxCollisionAlgorithm.cpp 16 CollisionDispatch/btBox2dBox2dCollisionAlgorithm.cpp 17 CollisionDispatch/btBoxBoxDetector.cpp 18 CollisionDispatch/btCollisionDispatcher.cpp 19 CollisionDispatch/btCollisionObject.cpp 20 CollisionDispatch/btCollisionWorld.cpp 21 CollisionDispatch/btCollisionWorldImporter.cpp 22 CollisionDispatch/btCompoundCollisionAlgorithm.cpp 23 CollisionDispatch/btCompoundCompoundCollisionAlgorithm.cpp 24 CollisionDispatch/btConvexConcaveCollisionAlgorithm.cpp 25 CollisionDispatch/btConvexConvexAlgorithm.cpp 26 CollisionDispatch/btConvexPlaneCollisionAlgorithm.cpp 27 CollisionDispatch/btConvex2dConvex2dAlgorithm.cpp 28 CollisionDispatch/btDefaultCollisionConfiguration.cpp 29 CollisionDispatch/btEmptyCollisionAlgorithm.cpp 30 CollisionDispatch/btGhostObject.cpp 31 CollisionDispatch/btHashedSimplePairCache.cpp 32 CollisionDispatch/btInternalEdgeUtility.cpp 33 CollisionDispatch/btInternalEdgeUtility.h 34 CollisionDispatch/btManifoldResult.cpp 35 CollisionDispatch/btSimulationIslandManager.cpp 36 CollisionDispatch/btSphereBoxCollisionAlgorithm.cpp 37 CollisionDispatch/btSphereSphereCollisionAlgorithm.cpp 38 CollisionDispatch/btSphereTriangleCollisionAlgorithm.cpp 39 CollisionDispatch/btUnionFind.cpp 40 CollisionDispatch/SphereTriangleDetector.cpp 41 CollisionShapes/btBoxShape.cpp 42 CollisionShapes/btBox2dShape.cpp 43 CollisionShapes/btBvhTriangleMeshShape.cpp 44 CollisionShapes/btCapsuleShape.cpp 45 CollisionShapes/btCollisionShape.cpp 46 CollisionShapes/btCompoundShape.cpp 47 CollisionShapes/btConcaveShape.cpp 48 CollisionShapes/btConeShape.cpp 49 CollisionShapes/btConvexHullShape.cpp 50 CollisionShapes/btConvexInternalShape.cpp 51 CollisionShapes/btConvexPointCloudShape.cpp 52 CollisionShapes/btConvexPolyhedron.cpp 53 CollisionShapes/btConvexShape.cpp 54 CollisionShapes/btConvex2dShape.cpp 55 CollisionShapes/btConvexTriangleMeshShape.cpp 56 CollisionShapes/btCylinderShape.cpp 57 CollisionShapes/btEmptyShape.cpp 58 CollisionShapes/btHeightfieldTerrainShape.cpp 59 CollisionShapes/btMinkowskiSumShape.cpp 60 CollisionShapes/btMultimaterialTriangleMeshShape.cpp 61 CollisionShapes/btMultiSphereShape.cpp 62 CollisionShapes/btOptimizedBvh.cpp 63 CollisionShapes/btPolyhedralConvexShape.cpp 64 CollisionShapes/btScaledBvhTriangleMeshShape.cpp 65 CollisionShapes/btShapeHull.cpp 66 CollisionShapes/btSphereShape.cpp 67 CollisionShapes/btStaticPlaneShape.cpp 68 CollisionShapes/btStridingMeshInterface.cpp 69 CollisionShapes/btTetrahedronShape.cpp 70 CollisionShapes/btTriangleBuffer.cpp 71 CollisionShapes/btTriangleCallback.cpp 72 CollisionShapes/btTriangleIndexVertexArray.cpp 73 CollisionShapes/btTriangleIndexVertexMaterialArray.cpp 74 CollisionShapes/btTriangleMesh.cpp 75 CollisionShapes/btTriangleMeshShape.cpp 76 CollisionShapes/btUniformScalingShape.cpp 77 Gimpact/btContactProcessing.cpp 78 Gimpact/btGenericPoolAllocator.cpp 79 Gimpact/btGImpactBvh.cpp 80 Gimpact/btGImpactCollisionAlgorithm.cpp 81 Gimpact/btGImpactQuantizedBvh.cpp 82 Gimpact/btGImpactShape.cpp 83 Gimpact/btTriangleShapeEx.cpp 84 Gimpact/gim_box_set.cpp 85 Gimpact/gim_contact.cpp 86 Gimpact/gim_memory.cpp 87 Gimpact/gim_tri_collision.cpp 88 NarrowPhaseCollision/btContinuousConvexCollision.cpp 89 NarrowPhaseCollision/btConvexCast.cpp 90 NarrowPhaseCollision/btGjkConvexCast.cpp 91 NarrowPhaseCollision/btGjkEpa2.cpp 92 NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.cpp 93 NarrowPhaseCollision/btGjkPairDetector.cpp 94 NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp 95 NarrowPhaseCollision/btPersistentManifold.cpp 96 NarrowPhaseCollision/btRaycastCallback.cpp 97 NarrowPhaseCollision/btSubSimplexConvexCast.cpp 98 NarrowPhaseCollision/btVoronoiSimplexSolver.cpp 99 NarrowPhaseCollision/btPolyhedralContactClipping.cpp 100 ) 101 102 SET(Root_HDRS 103 ../btBulletCollisionCommon.h 104 ) 105 SET(BroadphaseCollision_HDRS 106 BroadphaseCollision/btAxisSweep3.h 107 BroadphaseCollision/btBroadphaseInterface.h 108 BroadphaseCollision/btBroadphaseProxy.h 109 BroadphaseCollision/btCollisionAlgorithm.h 110 BroadphaseCollision/btDbvt.h 111 BroadphaseCollision/btDbvtBroadphase.h 112 BroadphaseCollision/btDispatcher.h 113 BroadphaseCollision/btMultiSapBroadphase.h 114 BroadphaseCollision/btOverlappingPairCache.h 115 BroadphaseCollision/btOverlappingPairCallback.h 116 BroadphaseCollision/btQuantizedBvh.h 117 BroadphaseCollision/btSimpleBroadphase.h 118 ) 119 SET(CollisionDispatch_HDRS 120 CollisionDispatch/btActivatingCollisionAlgorithm.h 121 CollisionDispatch/btBoxBoxCollisionAlgorithm.h 122 CollisionDispatch/btBox2dBox2dCollisionAlgorithm.h 123 CollisionDispatch/btBoxBoxDetector.h 124 CollisionDispatch/btCollisionConfiguration.h 125 CollisionDispatch/btCollisionCreateFunc.h 126 CollisionDispatch/btCollisionDispatcher.h 127 CollisionDispatch/btCollisionObject.h 128 CollisionDispatch/btCollisionObjectWrapper.h 129 CollisionDispatch/btCollisionWorld.h 130 CollisionDispatch/btCollisionWorldImporter.h 131 CollisionDispatch/btCompoundCollisionAlgorithm.h 132 CollisionDispatch/btCompoundCompoundCollisionAlgorithm.h 133 CollisionDispatch/btConvexConcaveCollisionAlgorithm.h 134 CollisionDispatch/btConvexConvexAlgorithm.h 135 CollisionDispatch/btConvex2dConvex2dAlgorithm.h 136 CollisionDispatch/btConvexPlaneCollisionAlgorithm.h 137 CollisionDispatch/btDefaultCollisionConfiguration.h 138 CollisionDispatch/btEmptyCollisionAlgorithm.h 139 CollisionDispatch/btGhostObject.h 140 CollisionDispatch/btHashedSimplePairCache.h 141 CollisionDispatch/btManifoldResult.h 142 CollisionDispatch/btSimulationIslandManager.h 143 CollisionDispatch/btSphereBoxCollisionAlgorithm.h 144 CollisionDispatch/btSphereSphereCollisionAlgorithm.h 145 CollisionDispatch/btSphereTriangleCollisionAlgorithm.h 146 CollisionDispatch/btUnionFind.h 147 CollisionDispatch/SphereTriangleDetector.h 148 ) 149 SET(CollisionShapes_HDRS 150 CollisionShapes/btBoxShape.h 151 CollisionShapes/btBox2dShape.h 152 CollisionShapes/btBvhTriangleMeshShape.h 153 CollisionShapes/btCapsuleShape.h 154 CollisionShapes/btCollisionMargin.h 155 CollisionShapes/btCollisionShape.h 156 CollisionShapes/btCompoundShape.h 157 CollisionShapes/btConcaveShape.h 158 CollisionShapes/btConeShape.h 159 CollisionShapes/btConvexHullShape.h 160 CollisionShapes/btConvexInternalShape.h 161 CollisionShapes/btConvexPointCloudShape.h 162 CollisionShapes/btConvexPolyhedron.h 163 CollisionShapes/btConvexShape.h 164 CollisionShapes/btConvex2dShape.h 165 CollisionShapes/btConvexTriangleMeshShape.h 166 CollisionShapes/btCylinderShape.h 167 CollisionShapes/btEmptyShape.h 168 CollisionShapes/btHeightfieldTerrainShape.h 169 CollisionShapes/btMaterial.h 170 CollisionShapes/btMinkowskiSumShape.h 171 CollisionShapes/btMultimaterialTriangleMeshShape.h 172 CollisionShapes/btMultiSphereShape.h 173 CollisionShapes/btOptimizedBvh.h 174 CollisionShapes/btPolyhedralConvexShape.h 175 CollisionShapes/btScaledBvhTriangleMeshShape.h 176 CollisionShapes/btShapeHull.h 177 CollisionShapes/btSphereShape.h 178 CollisionShapes/btStaticPlaneShape.h 179 CollisionShapes/btStridingMeshInterface.h 180 CollisionShapes/btTetrahedronShape.h 181 CollisionShapes/btTriangleBuffer.h 182 CollisionShapes/btTriangleCallback.h 183 CollisionShapes/btTriangleIndexVertexArray.h 184 CollisionShapes/btTriangleIndexVertexMaterialArray.h 185 CollisionShapes/btTriangleInfoMap.h 186 CollisionShapes/btTriangleMesh.h 187 CollisionShapes/btTriangleMeshShape.h 188 CollisionShapes/btTriangleShape.h 189 CollisionShapes/btUniformScalingShape.h 190 ) 191 SET(Gimpact_HDRS 192 Gimpact/btBoxCollision.h 193 Gimpact/btClipPolygon.h 194 Gimpact/btContactProcessing.h 195 Gimpact/btGenericPoolAllocator.h 196 Gimpact/btGeometryOperations.h 197 Gimpact/btGImpactBvh.h 198 Gimpact/btGImpactCollisionAlgorithm.h 199 Gimpact/btGImpactMassUtil.h 200 Gimpact/btGImpactQuantizedBvh.h 201 Gimpact/btGImpactShape.h 202 Gimpact/btQuantization.h 203 Gimpact/btTriangleShapeEx.h 204 Gimpact/gim_array.h 205 Gimpact/gim_basic_geometry_operations.h 206 Gimpact/gim_bitset.h 207 Gimpact/gim_box_collision.h 208 Gimpact/gim_box_set.h 209 Gimpact/gim_clip_polygon.h 210 Gimpact/gim_contact.h 211 Gimpact/gim_geom_types.h 212 Gimpact/gim_geometry.h 213 Gimpact/gim_hash_table.h 214 Gimpact/gim_linear_math.h 215 Gimpact/gim_math.h 216 Gimpact/gim_memory.h 217 Gimpact/gim_radixsort.h 218 Gimpact/gim_tri_collision.h 219 ) 220 SET(NarrowPhaseCollision_HDRS 221 NarrowPhaseCollision/btContinuousConvexCollision.h 222 NarrowPhaseCollision/btConvexCast.h 223 NarrowPhaseCollision/btConvexPenetrationDepthSolver.h 224 NarrowPhaseCollision/btDiscreteCollisionDetectorInterface.h 225 NarrowPhaseCollision/btGjkConvexCast.h 226 NarrowPhaseCollision/btGjkEpa2.h 227 NarrowPhaseCollision/btGjkEpaPenetrationDepthSolver.h 228 NarrowPhaseCollision/btGjkPairDetector.h 229 NarrowPhaseCollision/btManifoldPoint.h 230 NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.h 231 NarrowPhaseCollision/btPersistentManifold.h 232 NarrowPhaseCollision/btPointCollector.h 233 NarrowPhaseCollision/btRaycastCallback.h 234 NarrowPhaseCollision/btSimplexSolverInterface.h 235 NarrowPhaseCollision/btSubSimplexConvexCast.h 236 NarrowPhaseCollision/btVoronoiSimplexSolver.h 237 NarrowPhaseCollision/btPolyhedralContactClipping.h 238 ) 239 240 SET(BulletCollision_HDRS 241 ${Root_HDRS} 242 ${BroadphaseCollision_HDRS} 243 ${CollisionDispatch_HDRS} 244 ${CollisionShapes_HDRS} 245 ${Gimpact_HDRS} 246 ${NarrowPhaseCollision_HDRS} 247 ) 248 249 250 ADD_LIBRARY(BulletCollision ${BulletCollision_SRCS} ${BulletCollision_HDRS}) 251 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES VERSION ${BULLET_VERSION}) 252 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES SOVERSION ${BULLET_VERSION}) 253 IF (BUILD_SHARED_LIBS) 254 TARGET_LINK_LIBRARIES(BulletCollision LinearMath) 255 ENDIF (BUILD_SHARED_LIBS) 256 257 258 IF (INSTALL_LIBS) 259 IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 260 #INSTALL of other files requires CMake 2.6 261 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 262 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 263 INSTALL(TARGETS BulletCollision DESTINATION .) 264 ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 265 INSTALL(TARGETS BulletCollision RUNTIME DESTINATION bin 266 LIBRARY DESTINATION lib${LIB_SUFFIX} 267 ARCHIVE DESTINATION lib${LIB_SUFFIX}) 268 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 269 DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN ".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE) 270 INSTALL(FILES ../btBulletCollisionCommon.h 271 DESTINATION ${INCLUDE_INSTALL_DIR}/BulletCollision) 272 ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 273 ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5) 274 275 IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 276 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES FRAMEWORK true) 277 278 SET_TARGET_PROPERTIES(BulletCollision PROPERTIES PUBLIC_HEADER "${Root_HDRS}") 279 # Have to list out sub-directories manually: 280 SET_PROPERTY(SOURCE ${BroadphaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/BroadphaseCollision) 281 SET_PROPERTY(SOURCE ${CollisionDispatch_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionDispatch) 282 SET_PROPERTY(SOURCE ${CollisionShapes_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/CollisionShapes) 283 SET_PROPERTY(SOURCE ${Gimpact_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/Gimpact) 284 SET_PROPERTY(SOURCE ${NarrowPhaseCollision_HDRS} PROPERTY MACOSX_PACKAGE_LOCATION Headers/NarrowPhaseCollision) 285 286 ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK) 287 ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES) 288 ENDIF (INSTALL_LIBS) 289