cmake with 2 examples (HelloWorld, BasicDemo)
This commit is contained in:
31
examples/BasicDemo/CMakeLists.txt
Normal file
31
examples/BasicDemo/CMakeLists.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
# App_BasicExample is a minimal sample creating, stepping and deleting a Bullet dynamics world
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/src
|
||||
)
|
||||
|
||||
LINK_LIBRARIES(
|
||||
BulletDynamics BulletCollision LinearMath
|
||||
)
|
||||
|
||||
IF (WIN32)
|
||||
ADD_EXECUTABLE(App_BasicExample
|
||||
BasicExample.cpp
|
||||
main.cpp
|
||||
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
|
||||
)
|
||||
ELSE()
|
||||
ADD_EXECUTABLE(App_BasicExample
|
||||
BasicExample.cpp
|
||||
main.cpp
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
||||
|
||||
|
||||
IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
||||
SET_TARGET_PROPERTIES(App_BasicExample PROPERTIES DEBUG_POSTFIX "_Debug")
|
||||
SET_TARGET_PROPERTIES(App_BasicExample PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
||||
SET_TARGET_PROPERTIES(App_BasicExample PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
||||
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
||||
1
examples/CMakeLists.txt
Normal file
1
examples/CMakeLists.txt
Normal file
@@ -0,0 +1 @@
|
||||
SUBDIRS( HelloWorld BasicDemo )
|
||||
@@ -76,12 +76,12 @@ struct CommonGraphicsApp
|
||||
void defaultMouseButtonCallback( int button, int state, float x, float y)
|
||||
{
|
||||
if (button==0)
|
||||
m_leftMouseButton=state;
|
||||
m_leftMouseButton= (state==1);
|
||||
if (button==1)
|
||||
m_middleMouseButton=state;
|
||||
m_middleMouseButton= (state==1);
|
||||
|
||||
if (button==2)
|
||||
m_rightMouseButton=state;
|
||||
m_rightMouseButton= (state==1);
|
||||
|
||||
m_mouseXpos = x;
|
||||
m_mouseYpos = y;
|
||||
|
||||
Reference in New Issue
Block a user