Added preliminary CMake buildsystem support, it can autogenerate projectfiles/makefiles etc. Including Mac OS X Xcode.
This provides a better maintainable alternative to jam/msvcgen
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
//Copyright (c) 2003-2006 Erwin Coumans http://continuousphysics.com/Bullet/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// AxisSweep3
|
// AxisSweep3
|
||||||
//
|
//
|
||||||
|
|||||||
58
Bullet/CMakeLists.txt
Normal file
58
Bullet/CMakeLists.txt
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/LinearMath ${BULLET_PHYSICS_SOURCE_DIR}/Bullet }
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_LIBRARY(BULLET_COLLISION
|
||||||
|
BroadphaseCollision/AxisSweep3.cpp
|
||||||
|
BroadphaseCollision/BroadphaseProxy.cpp
|
||||||
|
BroadphaseCollision/CollisionAlgorithm.cpp
|
||||||
|
BroadphaseCollision/Dispatcher.cpp
|
||||||
|
BroadphaseCollision/OverlappingPairCache.cpp
|
||||||
|
BroadphaseCollision/SimpleBroadphase.cpp
|
||||||
|
CollisionDispatch/CollisionDispatcher.cpp
|
||||||
|
CollisionDispatch/CollisionObject.cpp
|
||||||
|
CollisionDispatch/CollisionWorld.cpp
|
||||||
|
CollisionDispatch/CompoundCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/ConvexConcaveCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/ConvexConvexAlgorithm.cpp
|
||||||
|
CollisionDispatch/EmptyCollisionAlgorithm.cpp
|
||||||
|
CollisionDispatch/ManifoldResult.cpp
|
||||||
|
CollisionDispatch/SimulationIslandManager.cpp
|
||||||
|
CollisionDispatch/UnionFind.cpp
|
||||||
|
CollisionShapes/BoxShape.cpp
|
||||||
|
CollisionShapes/BvhTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/CollisionShape.cpp
|
||||||
|
CollisionShapes/CompoundShape.cpp
|
||||||
|
CollisionShapes/ConcaveShape.cpp
|
||||||
|
CollisionShapes/ConeShape.cpp
|
||||||
|
CollisionShapes/ConvexHullShape.cpp
|
||||||
|
CollisionShapes/ConvexShape.cpp
|
||||||
|
CollisionShapes/ConvexTriangleMeshShape.cpp
|
||||||
|
CollisionShapes/CylinderShape.cpp
|
||||||
|
CollisionShapes/EmptyShape.cpp
|
||||||
|
CollisionShapes/MinkowskiSumShape.cpp
|
||||||
|
CollisionShapes/MultiSphereShape.cpp
|
||||||
|
CollisionShapes/OptimizedBvh.cpp
|
||||||
|
CollisionShapes/PolyhedralConvexShape.cpp
|
||||||
|
CollisionShapes/Simplex1to4Shape.cpp
|
||||||
|
CollisionShapes/SphereShape.cpp
|
||||||
|
CollisionShapes/StaticPlaneShape.cpp
|
||||||
|
CollisionShapes/StridingMeshInterface.cpp
|
||||||
|
CollisionShapes/TriangleCallback.cpp
|
||||||
|
CollisionShapes/TriangleIndexVertexArray.cpp
|
||||||
|
CollisionShapes/TriangleMesh.cpp
|
||||||
|
CollisionShapes/TriangleMeshShape.cpp
|
||||||
|
NarrowPhaseCollision/ContinuousConvexCollision.cpp
|
||||||
|
NarrowPhaseCollision/ConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/GjkConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/GjkPairDetector.cpp
|
||||||
|
NarrowPhaseCollision/Hull.cpp
|
||||||
|
NarrowPhaseCollision/ManifoldContactAddResult.cpp
|
||||||
|
NarrowPhaseCollision/MinkowskiPenetrationDepthSolver.cpp
|
||||||
|
NarrowPhaseCollision/PersistentManifold.cpp
|
||||||
|
NarrowPhaseCollision/RaycastCallback.cpp
|
||||||
|
NarrowPhaseCollision/Shape.cpp
|
||||||
|
NarrowPhaseCollision/SubSimplexConvexCast.cpp
|
||||||
|
NarrowPhaseCollision/VoronoiSimplexSolver.cpp
|
||||||
|
)
|
||||||
17
BulletDynamics/CMakeLists.txt
Normal file
17
BulletDynamics/CMakeLists.txt
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/LinearMath ${BULLET_PHYSICS_SOURCE_DIR}/Bullet ${BULLET_PHYSICS_SOURCE_DIR}/BulletDynamics }
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_LIBRARY(BULLET_DYNAMICS
|
||||||
|
|
||||||
|
ConstraintSolver/ContactConstraint.cpp
|
||||||
|
ConstraintSolver/Generic6DofConstraint.cpp
|
||||||
|
ConstraintSolver/HingeConstraint.cpp
|
||||||
|
ConstraintSolver/Point2PointConstraint.cpp
|
||||||
|
ConstraintSolver/SequentialImpulseConstraintSolver.cpp
|
||||||
|
ConstraintSolver/Solve2LinearConstraint.cpp
|
||||||
|
ConstraintSolver/TypedConstraint.cpp
|
||||||
|
Dynamics/BU_Joint.cpp
|
||||||
|
Dynamics/ContactJoint.cpp
|
||||||
|
Dynamics/RigidBody.cpp
|
||||||
|
)
|
||||||
3
CMakeLists.txt
Normal file
3
CMakeLists.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
PROJECT(BULLET_PHYSICS)
|
||||||
|
|
||||||
|
SUBDIRS(LinearMath Bullet BulletDynamics Demos Extras)
|
||||||
2
Demos/CMakeLists.txt
Normal file
2
Demos/CMakeLists.txt
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
SUBDIRS( OpenGL CcdPhysicsDemo )
|
||||||
|
|
||||||
62
Demos/CcdPhysicsDemo/CMakeLists.txt
Normal file
62
Demos/CcdPhysicsDemo/CMakeLists.txt
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
# This is basically the overall name of the project in Visual Studio this is the name of the Solution File
|
||||||
|
|
||||||
|
|
||||||
|
# For every executable you have with a main method you should have an add_executable line below.
|
||||||
|
# For every add executable line you should list every .cpp and .h file you have associated with that executable.
|
||||||
|
|
||||||
|
|
||||||
|
# This is the variable for Windows. I use this to define the root of my directory structure.
|
||||||
|
SET(GLUT_ROOT ${BULLET_PHYSICS_SOURCE_DIR}/Glut)
|
||||||
|
|
||||||
|
# You shouldn't have to modify anything below this line
|
||||||
|
########################################################
|
||||||
|
|
||||||
|
|
||||||
|
# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system
|
||||||
|
# This should be the case.
|
||||||
|
INCLUDE (${CMAKE_ROOT}/Modules/FindGLU.cmake)
|
||||||
|
INCLUDE (${CMAKE_ROOT}/Modules/FindGLUT.cmake)
|
||||||
|
INCLUDE (${CMAKE_ROOT}/Modules/FindOpenGL.cmake)
|
||||||
|
|
||||||
|
|
||||||
|
IF (WIN32)
|
||||||
|
# This is the Windows code for which Opengl, and Glut are not properly installed
|
||||||
|
# since I can't install them I must cheat and copy libraries around
|
||||||
|
INCLUDE_DIRECTORIES(${GLUT_ROOT})
|
||||||
|
# LINK_DIRECTORIES(${GLUT_ROOT}\\lib)
|
||||||
|
IF (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
|
||||||
|
SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib)
|
||||||
|
# LINK_LIBRARIES(${GLUT_ROOT}\\lib\\glut32 ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
|
||||||
|
# TARGET_LINK_LIBRARIES(table ${GLUT_ROOT}\\lib\\glut32)
|
||||||
|
#
|
||||||
|
# ADD_CUSTOM_COMMAND(TARGET table POST_BUILD COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2005\\Debug
|
||||||
|
# COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs2003\\Debug
|
||||||
|
# COMMAND copy ${GLUT_ROOT}\\lib\\glut32.dll ${GLUT_ROOT}\\bin\\vs6\\Debug)
|
||||||
|
ELSE (${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
|
||||||
|
# LINK_LIBRARIES(${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
|
||||||
|
# TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY})
|
||||||
|
ENDIF(${GLUT_glut_LIBRARY} MATCHES "GLUT_glut_LIBRARY-NOTFOUND")
|
||||||
|
# TARGET_LINK_LIBRARIES(table ${OPENGL_gl_LIBRARY})
|
||||||
|
# TARGET_LINK_LIBRARIES(table ${OPENGL_glu_LIBRARY})
|
||||||
|
ELSE (WIN32)
|
||||||
|
# This is the lines for linux. This should always work if everything is installed and working fine.
|
||||||
|
# SET(CMAKE_BUILD_TYPE Debug)
|
||||||
|
# SET(CMAKE_CXX_FLAGS_DEBUG "-g")
|
||||||
|
INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR})
|
||||||
|
# TARGET_LINK_LIBRARIES(table ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
|
||||||
|
# TARGET_LINK_LIBRARIES(checker ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY})
|
||||||
|
ENDIF (WIN32)
|
||||||
|
|
||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/LinearMath ${BULLET_PHYSICS_SOURCE_DIR}/Bullet ${BULLET_PHYSICS_SOURCE_DIR}/BulletDynamics ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/Common ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/CcdPhysics }
|
||||||
|
)
|
||||||
|
|
||||||
|
LINK_LIBRARIES(
|
||||||
|
CCD_PHYSICS_INTERFACE OPENGL_SUPPORT BULLET_DYNAMICS PHYSICS_COMMON_INTERFACE BULLET_COLLISION LINEAR_MATH ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY}
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_EXECUTABLE(CCD_PHYSICS_DEMO
|
||||||
|
CcdPhysicsDemo.cpp
|
||||||
|
MyMotionState.cpp
|
||||||
|
)
|
||||||
|
|
||||||
1
Extras/CMakeLists.txt
Normal file
1
Extras/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SUBDIRS( PhysicsInterface )
|
||||||
1
Extras/PhysicsInterface/CMakeLists.txt
Normal file
1
Extras/PhysicsInterface/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
SUBDIRS( CcdPhysics Common )
|
||||||
11
Extras/PhysicsInterface/CcdPhysics/CMakeLists.txt
Normal file
11
Extras/PhysicsInterface/CcdPhysics/CMakeLists.txt
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/LinearMath ${BULLET_PHYSICS_SOURCE_DIR}/Bullet ${BULLET_PHYSICS_SOURCE_DIR}/BulletDynamics ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/Common ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/CcdPhysics }
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_LIBRARY(CCD_PHYSICS_INTERFACE
|
||||||
|
CcdPhysicsController.cpp
|
||||||
|
CcdPhysicsEnvironment.cpp
|
||||||
|
ParallelIslandDispatcher.cpp
|
||||||
|
ParallelPhysicsEnvironment.cpp
|
||||||
|
SimulationIsland.cpp
|
||||||
|
)
|
||||||
@@ -455,10 +455,10 @@ void SimulationIsland::UpdateAabbs(IDebugDraw* debugDrawer,BroadphaseInterface*
|
|||||||
if (reportMe)
|
if (reportMe)
|
||||||
{
|
{
|
||||||
reportMe = false;
|
reportMe = false;
|
||||||
printf("Overflow in AABB, object removed from simulation \n");
|
//printf("Overflow in AABB, object removed from simulation \n");
|
||||||
printf("If you can reproduce this, please email bugs@continuousphysics.com\n");
|
//printf("If you can reproduce this, please email bugs@continuousphysics.com\n");
|
||||||
printf("Please include above information, your Platform, version of OS.\n");
|
//printf("Please include above information, your Platform, version of OS.\n");
|
||||||
printf("Thanks.\n");
|
//printf("Thanks.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
10
Extras/PhysicsInterface/Common/CMakeLists.txt
Normal file
10
Extras/PhysicsInterface/Common/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
INCLUDE_DIRECTORIES(
|
||||||
|
${BULLET_PHYSICS_SOURCE_DIR}/LinearMath ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/Common }
|
||||||
|
)
|
||||||
|
|
||||||
|
ADD_LIBRARY(PHYSICS_COMMON_INTERFACE
|
||||||
|
PHY_IMotionState.cpp
|
||||||
|
PHY_IPhysicsController.cpp
|
||||||
|
PHY_IPhysicsEnvironment.cpp
|
||||||
|
PHY_IVehicle.cpp
|
||||||
|
)
|
||||||
10
LinearMath/CMakeLists.txt
Normal file
10
LinearMath/CMakeLists.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
ADD_LIBRARY(LINEAR_MATH
|
||||||
|
Geometry.cpp
|
||||||
|
Quat.cpp
|
||||||
|
Vector.cpp
|
||||||
|
quickprof.cpp
|
||||||
|
Matrix.cpp
|
||||||
|
Scalar.cpp
|
||||||
|
VectorBase.cpp
|
||||||
|
)
|
||||||
|
|
||||||
@@ -1,6 +1,11 @@
|
|||||||
Bullet Continuous Collision Detection and Physics Library
|
Bullet Continuous Collision Detection and Physics Library
|
||||||
Erwin Coumans
|
Erwin Coumans
|
||||||
|
|
||||||
|
2006 August 9
|
||||||
|
Added CMake support (see http://cmake.org)
|
||||||
|
This can autogenerate makefiles, projectfiles cross platform (including MacOS X Xcode )
|
||||||
|
Just run cmake . in the root folder and it will autogenerate build files
|
||||||
|
|
||||||
2006 July 26 Erwin Coumans
|
2006 July 26 Erwin Coumans
|
||||||
Upgraded to COLLADA-DOM 1.4.1, latest SVN version
|
Upgraded to COLLADA-DOM 1.4.1, latest SVN version
|
||||||
ColladaDemo can export snapshots to .dae
|
ColladaDemo can export snapshots to .dae
|
||||||
|
|||||||
Reference in New Issue
Block a user