fix CMake build on Mac OSX
This commit is contained in:
@@ -41,9 +41,13 @@ IF (WIN32)
|
||||
)
|
||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||
ELSE(WIN32)
|
||||
IF(NOT APPLE)
|
||||
IF(APPLE)
|
||||
find_library(COCOA NAMES Cocoa)
|
||||
MESSAGE(${COCOA})
|
||||
link_libraries(${COCOA})
|
||||
ELSE(APPLE)
|
||||
LINK_LIBRARIES( GLEW)
|
||||
ENDIF(NOT APPLE)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
|
||||
@@ -45,9 +45,13 @@ IF (WIN32)
|
||||
)
|
||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||
ELSE(WIN32)
|
||||
IF(NOT APPLE)
|
||||
IF(APPLE)
|
||||
find_library(COCOA NAMES Cocoa)
|
||||
MESSAGE(${COCOA})
|
||||
link_libraries(${COCOA})
|
||||
ELSE(APPLE)
|
||||
LINK_LIBRARIES( GLEW X11 dl)
|
||||
ENDIF(NOT APPLE)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
|
||||
@@ -22,9 +22,13 @@ IF (WIN32)
|
||||
)
|
||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||
ELSE(WIN32)
|
||||
IF(NOT APPLE)
|
||||
IF(APPLE)
|
||||
find_library(COCOA NAMES Cocoa)
|
||||
MESSAGE(${COCOA})
|
||||
link_libraries(${COCOA})
|
||||
ELSE(APPLE)
|
||||
LINK_LIBRARIES( GLEW X11 dl Xext)
|
||||
ENDIF(NOT APPLE)
|
||||
ENDIF(APPLE)
|
||||
ENDIF(WIN32)
|
||||
|
||||
|
||||
|
||||
@@ -33,6 +33,11 @@
|
||||
description = "Enable enet NAT punchthrough test"
|
||||
}
|
||||
|
||||
newoption
|
||||
{
|
||||
trigger = "gtest",
|
||||
description = "Enable unit tests using gtest"
|
||||
}
|
||||
configurations {"Release", "Debug"}
|
||||
configuration "Release"
|
||||
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
||||
@@ -89,10 +94,12 @@
|
||||
|
||||
language "C++"
|
||||
|
||||
if _OPTIONS["gtest"] then
|
||||
include "../test/gtest-1.7.0"
|
||||
-- include "../test/hello_gtest"
|
||||
|
||||
include "../test/TestBullet3OpenCL"
|
||||
end
|
||||
|
||||
|
||||
include "../Demos3/AllBullet2Demos"
|
||||
|
||||
@@ -42,7 +42,7 @@ long b3_maxdot_large( const float *vv, const float *vec, unsigned long count, fl
|
||||
long b3_maxdot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
|
||||
{
|
||||
const float4 *vertices = (const float4*) vv;
|
||||
static const unsigned char indexTable[16] = {-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
|
||||
static const unsigned char indexTable[16] = {(unsigned char)-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
|
||||
float4 dotMax = b3Assign128( -B3_INFINITY, -B3_INFINITY, -B3_INFINITY, -B3_INFINITY );
|
||||
float4 vvec = _mm_loadu_ps( vec );
|
||||
float4 vHi = b3CastiTo128f(_mm_shuffle_epi32( b3CastfTo128i( vvec), 0xaa )); /// zzzz
|
||||
@@ -427,7 +427,8 @@ long b3_mindot_large( const float *vv, const float *vec, unsigned long count, fl
|
||||
long b3_mindot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
|
||||
{
|
||||
const float4 *vertices = (const float4*) vv;
|
||||
static const unsigned char indexTable[16] = {-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
|
||||
static const unsigned char indexTable[16] = {(unsigned char)-1, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 };
|
||||
|
||||
float4 dotmin = b3Assign128( B3_INFINITY, B3_INFINITY, B3_INFINITY, B3_INFINITY );
|
||||
float4 vvec = _mm_loadu_ps( vec );
|
||||
float4 vHi = b3CastiTo128f(_mm_shuffle_epi32( b3CastfTo128i( vvec), 0xaa )); /// zzzz
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
void myerrorprintf(const char* msg)
|
||||
{
|
||||
printf(msg);
|
||||
printf("%s",msg);
|
||||
}
|
||||
|
||||
static bool sVerboseWarning = true;
|
||||
@@ -16,7 +16,7 @@ void mywarningprintf(const char* msg)
|
||||
if (sVerboseWarning)
|
||||
{
|
||||
//OutputDebugStringA(msg);
|
||||
printf(msg);
|
||||
printf("%s",msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ void myprintf(const char* msg)
|
||||
if (sVerbosePrintf)
|
||||
{
|
||||
//OutputDebugStringA(msg);
|
||||
printf(msg);
|
||||
printf("%s",msg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user