diff --git a/Demos/CMakeLists.txt b/Demos/CMakeLists.txt index 219de3e4c..f37fa9221 100644 --- a/Demos/CMakeLists.txt +++ b/Demos/CMakeLists.txt @@ -1,2 +1,2 @@ -SUBDIRS( OpenGL CcdPhysicsDemo BasicDemo BspDemo ColladaDemo UserCollisionAlgorithm ) +SUBDIRS( OpenGL CcdPhysicsDemo BasicDemo BspDemo MovingConcaveDemo VehicleDemo ColladaDemo UserCollisionAlgorithm ) diff --git a/Demos/Jamfile b/Demos/Jamfile index e55413960..28633b816 100644 --- a/Demos/Jamfile +++ b/Demos/Jamfile @@ -21,7 +21,7 @@ if $(GLUT.AVAILABLE) = "yes" rule ExtraDemo { Application $(<) : $(>) : noinstall console nomanifest ; - LinkWith $(<) : colladadom libxml bulletopenglsupport convexdecomposition bulletdynamics bulletcollision bulletmath ; + LinkWith $(<) : GIMPACTBullet GIMPACT colladadom libxml bulletopenglsupport convexdecomposition bulletdynamics bulletcollision bulletmath ; CFlags $(<) : [ FIncludes $(TOP)/Demos/OpenGL ] [ FIncludes $(TOP)/Extras/ConvexDecomposition ] @@ -77,7 +77,7 @@ SubInclude TOP Demos BspDemo ; SubInclude TOP Demos VehicleDemo ; SubInclude TOP Demos CollisionDemo ; SubInclude TOP Demos CollisionInterfaceDemo ; -#SubInclude TOP Demos MovingConcaveDemo ; +SubInclude TOP Demos MovingConcaveDemo ; SubInclude TOP Demos ConcaveDemo ; SubInclude TOP Demos ConstraintDemo ; SubInclude TOP Demos ContinuousConvexCollision ; diff --git a/Demos/MovingConcaveDemo/CMakeLists.txt b/Demos/MovingConcaveDemo/CMakeLists.txt new file mode 100644 index 000000000..6ed72c1a1 --- /dev/null +++ b/Demos/MovingConcaveDemo/CMakeLists.txt @@ -0,0 +1,61 @@ +# 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}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } +) + +LINK_LIBRARIES( +LibGIMPACTBullet LibGIMPACT LibOpenGLSupport LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY} +) + +ADD_EXECUTABLE(MovingConcaveDemo +ConcavePhysicsDemo.cpp +) + diff --git a/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp b/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp index 9bfa784d6..2f8ceb08c 100644 --- a/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp +++ b/Demos/MovingConcaveDemo/ConcavePhysicsDemo.cpp @@ -1478,7 +1478,6 @@ int main(int argc,char** argv) concaveDemo->stepFront(); concaveDemo->stepFront(); - return glutmain(argc, argv,640,480,"Moving Concave Mesh Demo",concaveDemo); } diff --git a/Demos/MovingConcaveDemo/Jamfile b/Demos/MovingConcaveDemo/Jamfile new file mode 100644 index 000000000..d59ce99a7 --- /dev/null +++ b/Demos/MovingConcaveDemo/Jamfile @@ -0,0 +1,3 @@ +SubDir TOP Demos MovingConcaveDemo ; + +ExtraDemo MovingConcaveDemo : [ Wildcard *.h *.cpp ] ; diff --git a/Demos/VehicleDemo/CMakeLists.txt b/Demos/VehicleDemo/CMakeLists.txt index a63f06706..9aa9788bf 100644 --- a/Demos/VehicleDemo/CMakeLists.txt +++ b/Demos/VehicleDemo/CMakeLists.txt @@ -48,11 +48,11 @@ ELSE (WIN32) ENDIF (WIN32) INCLUDE_DIRECTORIES( -${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/Common ${BULLET_PHYSICS_SOURCE_DIR}/Extras/PhysicsInterface/CcdPhysics } +${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } ) LINK_LIBRARIES( -LibCcdPhysicsInterface LibOpenGLSupport LibBulletDynamics LibPhysicsCommonInterface LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY} + LibOpenGLSupport LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY} ) ADD_EXECUTABLE(VehicleDemo