copy glut*.dll next to executable using cmake postbuild step

re-add CollisionInterfaceDemo to cmake
This commit is contained in:
erwin.coumans
2010-01-29 17:47:17 +00:00
parent 37f6df2c32
commit 8616ea07d8
15 changed files with 190 additions and 29 deletions

View File

@@ -13,6 +13,7 @@ subject to the following restrictions:
3. This notice may not be removed or altered from any source distribution.
*/
// Collision Radius
#define COLLISION_RADIUS 0.0f

View File

@@ -23,6 +23,21 @@ IF (USE_GLUT)
BenchmarkDemo.cpp
BenchmarkDemo.h
)
IF (WIN32)
IF (CMAKE_CL_64)
ADD_CUSTOM_COMMAND(
TARGET AppBenchmarks
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/glut64.dll ${CMAKE_CURRENT_BINARY_DIR}
)
ELSE(CMAKE_CL_64)
ADD_CUSTOM_COMMAND(
TARGET AppBenchmarks
POST_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different ${BULLET_PHYSICS_SOURCE_DIR}/GLUT32.DLL ${CMAKE_CURRENT_BINARY_DIR}
)
ENDIF(CMAKE_CL_64)
ENDIF(WIN32)
ELSE (USE_GLUT)
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src
@@ -36,7 +51,6 @@ ELSE (USE_GLUT)
ADD_EXECUTABLE(AppBenchmarks
WIN32
../OpenGL/Win32AppMain.cpp
main.cpp
BenchmarkDemo.cpp
BenchmarkDemo.h
Win32BenchmarkDemo.cpp

View File

@@ -18,12 +18,12 @@ subject to the following restrictions:
#include "LinearMath/btHashMap.h"
#include <stdio.h>
#ifdef USE_GLUT_GRAPHICAL_BENCHMARK
#ifdef USE_GRAPHICAL_BENCHMARK
#include "GlutStuff.h"
#include "GLDebugDrawer.h"
GLDebugDrawer gDebugDrawer;
#define benchmarkDemo benchmarkDemo1
#endif //USE_GLUT_GRAPHICAL_BENCHMARK
#endif //USE_GRAPHICAL_BENCHMARK
#define NUM_DEMOS 7
@@ -47,11 +47,11 @@ int main(int argc,char** argv)
char* demoNames[NUM_DEMOS] = {"3000 fall", "1000 stack", "136 ragdolls","1000 convex", "prim-trimesh", "convex-trimesh","raytests"};
float totalTime[NUM_DEMOS] = {0.f,0.f,0.f,0.f,0.f,0.f,0.f};
#ifdef USE_GLUT_GRAPHICAL_BENCHMARK
#ifdef USE_GRAPHICAL_BENCHMARK
benchmarkDemo.initPhysics();
benchmarkDemo.getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
return glutmain(argc, argv,640,480,"Bullet Physics Demo. http://bulletphysics.com",&benchmarkDemo);
#else //USE_GLUT_GRAPHICAL_BENCHMARK
#else //USE_GRAPHICAL_BENCHMARK
int d;
for (d=0;d<NUM_DEMOS;d++)
@@ -80,7 +80,7 @@ int main(int argc,char** argv)
printf("\nResults for %s: %f",demoNames[d],totalTime[d]*(1.f/NUM_TESTS));
}
#endif //USE_GLUT_GRAPHICAL_BENCHMARK
#endif //USE_GRAPHICAL_BENCHMARK
return 0;
}