From f83677deed750f549493260229bf3e71004a3f83 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Sun, 17 Sep 2006 06:34:40 +0000 Subject: [PATCH] added buildsystem files --- Demos/CMakeLists.txt | 2 +- Demos/Jamfile | 2 + Demos/UserCollisionAlgorithm/CMakeLists.txt | 62 +++++++++++++++++++++ Demos/UserCollisionAlgorithm/Jamfile | 3 + 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 Demos/UserCollisionAlgorithm/CMakeLists.txt create mode 100644 Demos/UserCollisionAlgorithm/Jamfile diff --git a/Demos/CMakeLists.txt b/Demos/CMakeLists.txt index d7af0a95f..ed325b97c 100644 --- a/Demos/CMakeLists.txt +++ b/Demos/CMakeLists.txt @@ -1,2 +1,2 @@ -SUBDIRS( OpenGL CcdPhysicsDemo BspDemo ColladaDemo VehicleDemo ) +SUBDIRS( OpenGL CcdPhysicsDemo BspDemo ColladaDemo VehicleDemo ForkLiftDemo UserCollisionAlgorithm ) diff --git a/Demos/Jamfile b/Demos/Jamfile index 5c49ae204..a975795a3 100644 --- a/Demos/Jamfile +++ b/Demos/Jamfile @@ -73,6 +73,8 @@ else } SubInclude TOP Demos CcdPhysicsDemo ; +SubInclude TOP Demos UserCollisionAlgorithm ; +SubInclude TOP Demos ForkLiftDemo ; SubInclude TOP Demos BspDemo ; SubInclude TOP Demos ConvexDecompositionDemo ; SubInclude TOP Demos ColladaDemo ; diff --git a/Demos/UserCollisionAlgorithm/CMakeLists.txt b/Demos/UserCollisionAlgorithm/CMakeLists.txt new file mode 100644 index 000000000..d0aa6703e --- /dev/null +++ b/Demos/UserCollisionAlgorithm/CMakeLists.txt @@ -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( +LibCcdPhysicsInterface LibOpenGLSupport LibBulletDynamics LibPhysicsCommonInterface LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glU_LIBRARY} +) + +ADD_EXECUTABLE(UserCollisionAlgorithm + UserCollisionAlgorithm.cpp + SphereSphereCollisionAlgorithm.cpp +) + diff --git a/Demos/UserCollisionAlgorithm/Jamfile b/Demos/UserCollisionAlgorithm/Jamfile new file mode 100644 index 000000000..65b4fce53 --- /dev/null +++ b/Demos/UserCollisionAlgorithm/Jamfile @@ -0,0 +1,3 @@ +SubDir TOP Demos UserCollisionAlgorithm ; + +BulletDemo UserCollisionAlgorithm : [ Wildcard *.h *.cpp ] ;