fix CMake build on Mac OSX
This commit is contained in:
@@ -41,9 +41,13 @@ IF (WIN32)
|
|||||||
)
|
)
|
||||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
IF(NOT APPLE)
|
IF(APPLE)
|
||||||
|
find_library(COCOA NAMES Cocoa)
|
||||||
|
MESSAGE(${COCOA})
|
||||||
|
link_libraries(${COCOA})
|
||||||
|
ELSE(APPLE)
|
||||||
LINK_LIBRARIES( GLEW)
|
LINK_LIBRARIES( GLEW)
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
@@ -61,4 +65,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
|||||||
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES DEBUG_POSTFIX "_Debug")
|
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES DEBUG_POSTFIX "_Debug")
|
||||||
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
||||||
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
SET_TARGET_PROPERTIES(App_AllBullet2Demos PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
||||||
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
||||||
|
|||||||
@@ -45,9 +45,13 @@ IF (WIN32)
|
|||||||
)
|
)
|
||||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||||
ELSE(WIN32)
|
ELSE(WIN32)
|
||||||
IF(NOT APPLE)
|
IF(APPLE)
|
||||||
|
find_library(COCOA NAMES Cocoa)
|
||||||
|
MESSAGE(${COCOA})
|
||||||
|
link_libraries(${COCOA})
|
||||||
|
ELSE(APPLE)
|
||||||
LINK_LIBRARIES( GLEW X11 dl)
|
LINK_LIBRARIES( GLEW X11 dl)
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
@@ -60,4 +64,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
|||||||
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES DEBUG_POSTFIX "_Debug")
|
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES DEBUG_POSTFIX "_Debug")
|
||||||
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
||||||
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
SET_TARGET_PROPERTIES(App_Bullet3_OpenCL_Demos PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
||||||
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
||||||
|
|||||||
@@ -22,9 +22,13 @@ IF (WIN32)
|
|||||||
)
|
)
|
||||||
ADD_DEFINITIONS(-DGLEW_STATIC)
|
ADD_DEFINITIONS(-DGLEW_STATIC)
|
||||||
ELSE(WIN32)
|
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)
|
LINK_LIBRARIES( GLEW X11 dl Xext)
|
||||||
ENDIF(NOT APPLE)
|
ENDIF(APPLE)
|
||||||
ENDIF(WIN32)
|
ENDIF(WIN32)
|
||||||
|
|
||||||
|
|
||||||
@@ -37,4 +41,4 @@ IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
|||||||
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES DEBUG_POSTFIX "_Debug")
|
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES DEBUG_POSTFIX "_Debug")
|
||||||
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
||||||
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
||||||
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
||||||
|
|||||||
@@ -32,7 +32,12 @@
|
|||||||
trigger = "enet",
|
trigger = "enet",
|
||||||
description = "Enable enet NAT punchthrough test"
|
description = "Enable enet NAT punchthrough test"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
newoption
|
||||||
|
{
|
||||||
|
trigger = "gtest",
|
||||||
|
description = "Enable unit tests using gtest"
|
||||||
|
}
|
||||||
configurations {"Release", "Debug"}
|
configurations {"Release", "Debug"}
|
||||||
configuration "Release"
|
configuration "Release"
|
||||||
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
flags { "Optimize", "EnableSSE2","StaticRuntime", "NoMinimalRebuild", "FloatFast"}
|
||||||
@@ -88,11 +93,13 @@
|
|||||||
dofile ("findOpenGLGlewGlut.lua")
|
dofile ("findOpenGLGlewGlut.lua")
|
||||||
|
|
||||||
language "C++"
|
language "C++"
|
||||||
|
|
||||||
|
if _OPTIONS["gtest"] then
|
||||||
|
include "../test/gtest-1.7.0"
|
||||||
|
-- include "../test/hello_gtest"
|
||||||
|
|
||||||
include "../test/gtest-1.7.0"
|
include "../test/TestBullet3OpenCL"
|
||||||
-- include "../test/hello_gtest"
|
end
|
||||||
|
|
||||||
include "../test/TestBullet3OpenCL"
|
|
||||||
|
|
||||||
|
|
||||||
include "../Demos3/AllBullet2Demos"
|
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 )
|
long b3_maxdot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
|
||||||
{
|
{
|
||||||
const float4 *vertices = (const float4*) vv;
|
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 dotMax = b3Assign128( -B3_INFINITY, -B3_INFINITY, -B3_INFINITY, -B3_INFINITY );
|
||||||
float4 vvec = _mm_loadu_ps( vec );
|
float4 vvec = _mm_loadu_ps( vec );
|
||||||
float4 vHi = b3CastiTo128f(_mm_shuffle_epi32( b3CastfTo128i( vvec), 0xaa )); /// zzzz
|
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 )
|
long b3_mindot_large( const float *vv, const float *vec, unsigned long count, float *dotResult )
|
||||||
{
|
{
|
||||||
const float4 *vertices = (const float4*) vv;
|
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 dotmin = b3Assign128( B3_INFINITY, B3_INFINITY, B3_INFINITY, B3_INFINITY );
|
||||||
float4 vvec = _mm_loadu_ps( vec );
|
float4 vvec = _mm_loadu_ps( vec );
|
||||||
float4 vHi = b3CastiTo128f(_mm_shuffle_epi32( b3CastfTo128i( vvec), 0xaa )); /// zzzz
|
float4 vHi = b3CastiTo128f(_mm_shuffle_epi32( b3CastfTo128i( vvec), 0xaa )); /// zzzz
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
void myerrorprintf(const char* msg)
|
void myerrorprintf(const char* msg)
|
||||||
{
|
{
|
||||||
printf(msg);
|
printf("%s",msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool sVerboseWarning = true;
|
static bool sVerboseWarning = true;
|
||||||
@@ -16,7 +16,7 @@ void mywarningprintf(const char* msg)
|
|||||||
if (sVerboseWarning)
|
if (sVerboseWarning)
|
||||||
{
|
{
|
||||||
//OutputDebugStringA(msg);
|
//OutputDebugStringA(msg);
|
||||||
printf(msg);
|
printf("%s",msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ void myprintf(const char* msg)
|
|||||||
if (sVerbosePrintf)
|
if (sVerbosePrintf)
|
||||||
{
|
{
|
||||||
//OutputDebugStringA(msg);
|
//OutputDebugStringA(msg);
|
||||||
printf(msg);
|
printf("%s",msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user