fix some issues with Linux compatibility,

see Issue 409
This commit is contained in:
erwin.coumans
2010-07-17 13:44:10 +00:00
parent 41ad5d3c06
commit 5b70a895a5
6 changed files with 17 additions and 5 deletions

View File

@@ -131,7 +131,12 @@ ENDIF(INTERNAL_CREATE_MSVC_RELATIVE_PATH_PROJECTFILES)
ENDIF (WIN32)
OPTION(BUILD_MINICL_OPENCL_DEMOS "Build OpenCL demos for MiniCL (Generic CPU)" ON)
IF (WIN32 OR APPLE)
OPTION(BUILD_MINICL_OPENCL_DEMOS "Build OpenCL demos for MiniCL (Generic CPU)" ON)
ELSE()
#there is some build problem, locating glew under Linux
OPTION(BUILD_MINICL_OPENCL_DEMOS "Build OpenCL demos for MiniCL (Generic CPU)" OFF)
ENDIF()
OPTION(BUILD_CPU_DEMOS "Build original Bullet CPU demos" ON)

View File

@@ -8,6 +8,10 @@ ${BULLET_PHYSICS_SOURCE_DIR}/Demos/OpenGL
ADD_DEFINITIONS(-DUSE_MINICL)
#to get this to compile under linux, you could try setting CMAK_GLEW_LIBRARY
#to /usr/lib/libGLEW.so
IF(WIN32)
IF (CMAKE_CL_64)
SET(CMAK_GLEW_LIBRARY ${BULLET_PHYSICS_SOURCE_DIR}/Glut/glew64.lib )

View File

@@ -491,7 +491,7 @@ extern unsigned char sFontData[];
if (0)
{
char* text="ABC abc 123 !@#";
const char* text="ABC abc 123 !@#";
int x=0;
for (int cc = 0;cc<strlen(text);cc++)
{

View File

@@ -24,9 +24,10 @@ void SampleThreadFunc(void* userPtr,void* lsMemory);
void* SamplelsMemoryFunc();
#include <stdio.h>
#include "BulletMultiThreaded/PlatformDefinitions.h"
#ifdef __APPLE__
#ifdef USE_PTHREADS
//#ifdef __APPLE__
#include "BulletMultiThreaded/PosixThreadSupport.h"
btThreadSupportInterface* createThreadSupport(int numThreads)

View File

@@ -27,7 +27,7 @@ subject to the following restrictions:
#include "LinearMath/btMinMax.h"
#include <stdio.h>
#define DEBUG_MINICL_KERNELS 1
//#define DEBUG_MINICL_KERNELS 1
static char* spPlatformID = "MiniCL, SCEA";

View File

@@ -18,7 +18,9 @@ subject to the following restrictions:
#include "PlatformDefinitions.h"
#ifdef USE_PTHREADS //platform specific defines are defined in PlatformDefinitions.h
#ifndef _XOPEN_SOURCE
#define _XOPEN_SOURCE 600 //for definition of pthread_barrier_t, see http://pages.cs.wisc.edu/~travitch/pthreads_primer.html
#endif //_XOPEN_SOURCE
#include <pthread.h>
#include <semaphore.h>