diff --git a/CMakeLists.txt b/CMakeLists.txt index 65ea21e1e..74cd3c291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,57 @@ +cmake_minimum_required(VERSION 2.4) + PROJECT(BULLET_PHYSICS) IF (NOT CMAKE_BUILD_TYPE) SET(CMAKE_BUILD_TYPE "Release") ENDIF (NOT CMAKE_BUILD_TYPE) + + +IF(COMMAND cmake_policy) + cmake_policy(SET CMP0003 NEW) +ENDIF(COMMAND cmake_policy) + + +# This is the shortcut to finding GLU, GLUT and OpenGL if they are properly installed on your system +# This should be the case. + +FIND_PACKAGE(OpenGL) +IF (OPENGL_FOUND) +MESSAGE("OPENGL FOUND") +MESSAGE(${OPENGL_LIBRARIES}) +ELSE (OPENGL_FOUND) +MESSAGE("OPENGL NOT FOUND") +SET(OPENGL_gl_LIBRARY opengl32) +SET(OPENGL_glu_LIBRARY glu32) +ENDIF (OPENGL_FOUND) + +FIND_PACKAGE(GLU) + +FIND_PACKAGE(GLUT) +IF (GLUT_FOUND) +MESSAGE("GLUT FOUND") +MESSAGE(${GLUT_glut_LIBRARY}) +ELSE (GLUT_FOUND) + +IF (MINGW) +MESSAGE ("GLUT NOT FOUND not found, trying to use MINGW glut32") +SET(GLUT_glut_LIBRARY glut32) +ENDIF (MINGW) + +IF (MSVC) +MESSAGE ("GLUT NOT FOUND, trying to use Bullet/Glut/glut32.lib for MSVC") +SET(GLUT_glut_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glut32.lib) +ENDIF (MSVC) +ENDIF (GLUT_FOUND) + + +IF (WIN32) + INCLUDE_DIRECTORIES(${BULLET_PHYSICS_SOURCE_DIR}/Glut) +ELSE (WIN32) + # This is the lines for linux. This should always work if everything is installed and working fine. + INCLUDE_DIRECTORIES(/usr/include /usr/local/include ${GLUT_INCLUDE_DIR}) +ENDIF (WIN32) + + SUBDIRS(src Demos Extras) diff --git a/Demos/AllBulletDemos/CMakeLists.txt b/Demos/AllBulletDemos/CMakeLists.txt index 7fc028cc0..3d09c4de1 100644 --- a/Demos/AllBulletDemos/CMakeLists.txt +++ b/Demos/AllBulletDemos/CMakeLists.txt @@ -5,57 +5,21 @@ # 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}) - LINK_LIBRARIES(AllBulletDemos pthread) -ENDIF (WIN32) INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/Extras/BulletColladaConverter ${BULLET_PHYSICS_SOURCE_DIR}/Extras ${BULLET_PHYSICS_SOURCE_DIR}/Extras/GIMPACT/include ${BULLET_PHYSICS_SOURCE_DIR}/Extras/GIMPACTUtils ${BULLET_PHYSICS_SOURCE_DIR}/Extras/ConvexDecomposition ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML/include ${BULLET_PHYSICS_SOURCE_DIR}/Extras/COLLADA_DOM/include/1.4 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/COLLADA_DOM/include ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } ) LINK_LIBRARIES( -LibBulletColladaConverter LibGLUI LibGIMPACTUtils LibGIMPACT LibConvexDecomposition LibColladaDom LibXML LibOpenGLSupport LibBulletSoftBody LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} +LibBulletColladaConverter LibGLUI LibGIMPACTUtils LibGIMPACT LibConvexDecomposition LibColladaDom LibXML LibOpenGLSupport LibBulletSoftBody LibBulletDynamics LibBulletCollision LibLinearMath ${GLUT_glut_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} ) + + ADD_EXECUTABLE(AllBulletDemos Main.cpp DemoEntries.cpp diff --git a/Demos/BasicDemo/CMakeLists.txt b/Demos/BasicDemo/CMakeLists.txt index be7e84bed..32c667510 100644 --- a/Demos/BasicDemo/CMakeLists.txt +++ b/Demos/BasicDemo/CMakeLists.txt @@ -11,42 +11,6 @@ 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 } ) diff --git a/Demos/Benchmarks/CMakeLists.txt b/Demos/Benchmarks/CMakeLists.txt index 5b4227394..fd5c76fd9 100644 --- a/Demos/Benchmarks/CMakeLists.txt +++ b/Demos/Benchmarks/CMakeLists.txt @@ -5,47 +5,10 @@ # 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 } diff --git a/Demos/BspDemo/CMakeLists.txt b/Demos/BspDemo/CMakeLists.txt index 3d7bb54dc..f3a6572f6 100644 --- a/Demos/BspDemo/CMakeLists.txt +++ b/Demos/BspDemo/CMakeLists.txt @@ -5,48 +5,10 @@ # 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 } ) diff --git a/Demos/CcdPhysicsDemo/CMakeLists.txt b/Demos/CcdPhysicsDemo/CMakeLists.txt index b30a05796..8bae751ae 100644 --- a/Demos/CcdPhysicsDemo/CMakeLists.txt +++ b/Demos/CcdPhysicsDemo/CMakeLists.txt @@ -5,47 +5,11 @@ # 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 } diff --git a/Demos/CharacterDemo/CMakeLists.txt b/Demos/CharacterDemo/CMakeLists.txt index 368b669de..506cfce83 100644 --- a/Demos/CharacterDemo/CMakeLists.txt +++ b/Demos/CharacterDemo/CMakeLists.txt @@ -5,48 +5,10 @@ # 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 } ) @@ -56,8 +18,11 @@ LINK_LIBRARIES( ) ADD_EXECUTABLE(CharacterDemo - CharacterController.cpp - CharacterController.h + KinematicCharacterController.cpp + DynamicCharacterController.cpp + KinematicCharacterController.h + DynamicCharacterController.h + CharacterControllerInterface.h CharacterDemo.cpp CharacterDemo.h main.cpp diff --git a/Demos/ColladaDemo/CMakeLists.txt b/Demos/ColladaDemo/CMakeLists.txt index f3e86627c..41c8c392f 100644 --- a/Demos/ColladaDemo/CMakeLists.txt +++ b/Demos/ColladaDemo/CMakeLists.txt @@ -5,47 +5,11 @@ # 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}/Extras/BulletColladaConverter ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML ${BULLET_PHYSICS_SOURCE_DIR}/Extras/LibXML/include ${BULLET_PHYSICS_SOURCE_DIR}/Extras/COLLADA_DOM/include/1.4 ${BULLET_PHYSICS_SOURCE_DIR}/Extras/COLLADA_DOM/include ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL } diff --git a/Demos/ConstraintDemo/CMakeLists.txt b/Demos/ConstraintDemo/CMakeLists.txt index 85e72b442..b6c23352c 100644 --- a/Demos/ConstraintDemo/CMakeLists.txt +++ b/Demos/ConstraintDemo/CMakeLists.txt @@ -5,47 +5,11 @@ # 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 } diff --git a/Demos/GenericJointDemo/CMakeLists.txt b/Demos/GenericJointDemo/CMakeLists.txt index 705091646..b8f8af7bf 100644 --- a/Demos/GenericJointDemo/CMakeLists.txt +++ b/Demos/GenericJointDemo/CMakeLists.txt @@ -5,48 +5,11 @@ # 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 } ) diff --git a/Demos/MultiThreadedDemo/CMakeLists.txt b/Demos/MultiThreadedDemo/CMakeLists.txt index c96c18471..ce4bc7edf 100644 --- a/Demos/MultiThreadedDemo/CMakeLists.txt +++ b/Demos/MultiThreadedDemo/CMakeLists.txt @@ -5,49 +5,11 @@ # 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}) - LINK_LIBRARIES(MultiThreadedDemo pthread) -# 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 } ) diff --git a/Demos/OpenGL/CMakeLists.txt b/Demos/OpenGL/CMakeLists.txt index aa5c8ee84..04ed5abd4 100644 --- a/Demos/OpenGL/CMakeLists.txt +++ b/Demos/OpenGL/CMakeLists.txt @@ -5,47 +5,14 @@ # 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") - # 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}/Extras/ConvexHull } ) diff --git a/Demos/RagdollDemo/CMakeLists.txt b/Demos/RagdollDemo/CMakeLists.txt index 02c9188aa..fd5915e5b 100644 --- a/Demos/RagdollDemo/CMakeLists.txt +++ b/Demos/RagdollDemo/CMakeLists.txt @@ -5,47 +5,10 @@ # 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 } diff --git a/Demos/SliderConstraintDemo/CMakeLists.txt b/Demos/SliderConstraintDemo/CMakeLists.txt index 64e9d363a..8cbed81d6 100644 --- a/Demos/SliderConstraintDemo/CMakeLists.txt +++ b/Demos/SliderConstraintDemo/CMakeLists.txt @@ -5,47 +5,11 @@ # 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 } diff --git a/Demos/SoftDemo/CMakeLists.txt b/Demos/SoftDemo/CMakeLists.txt index 7538e7c57..a8bea3563 100644 --- a/Demos/SoftDemo/CMakeLists.txt +++ b/Demos/SoftDemo/CMakeLists.txt @@ -5,47 +5,12 @@ # 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 } diff --git a/Demos/UserCollisionAlgorithm/CMakeLists.txt b/Demos/UserCollisionAlgorithm/CMakeLists.txt index f0db6ea20..901cd0f8f 100644 --- a/Demos/UserCollisionAlgorithm/CMakeLists.txt +++ b/Demos/UserCollisionAlgorithm/CMakeLists.txt @@ -5,47 +5,11 @@ # 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 } diff --git a/Demos/VehicleDemo/CMakeLists.txt b/Demos/VehicleDemo/CMakeLists.txt index fae6839b0..9c345c8e5 100644 --- a/Demos/VehicleDemo/CMakeLists.txt +++ b/Demos/VehicleDemo/CMakeLists.txt @@ -5,47 +5,11 @@ # 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 }