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