make GLUT optional in cmake

fix for btMultiBody to avoid extreme energy gain
This commit is contained in:
Erwin Coumans
2014-03-17 23:58:03 -07:00
parent 9f92232640
commit cfb06f9cd3
51 changed files with 464 additions and 27 deletions

View File

@@ -0,0 +1,41 @@
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src
${BULLET_PHYSICS_SOURCE_DIR}/btgui
)
SET(AppSimpleOpenGL3_SRCS
main.cpp
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
)
IF (WIN32)
SET(AppSimpleOpenGL3_SRCS ${AppSimpleOpenGL3_SRCS} ${AppSimpleOpenGL3_Common_SRCS})
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/btgui/OpenGLWindow/GlewWindows
)
ADD_DEFINITIONS(-DGLEW_STATIC)
ELSE(WIN32)
IF(NOT APPLE)
LINK_LIBRARIES( GLEW)
ENDIF(NOT APPLE)
ENDIF(WIN32)
LINK_LIBRARIES(
Bullet3Common OpenGLWindow gwen ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ADD_EXECUTABLE(AppSimpleOpenGL3
${AppSimpleOpenGL3_SRCS}
)
IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES DEBUG_POSTFIX "_Debug")
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
SET_TARGET_PROPERTIES(AppSimpleOpenGL3 PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)

View File

@@ -26,8 +26,9 @@
"../../btgui/Timing/b3Clock.h"
}
if os.is("Linux") then links {"X11"} end
if os.is("MacOSX") then
links{"Cocoa.framework"}
links{"Cocoa.framework"}
end