From b0a4e126bfd77064d05518ebc6d677cced17871b Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Wed, 4 May 2016 13:24:06 -0700 Subject: [PATCH] use cmake FIND_PACKAGE(PythonLibs 2.7 REQUIRED) if pybullet is build --- CMakeLists.txt | 3 +++ examples/ExampleBrowser/ExampleEntries.cpp | 2 ++ examples/pybullet/CMakeLists.txt | 4 ++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7e3321091..7809a87ef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -192,6 +192,9 @@ ENDIF() OPTION(BUILD_BULLET3 "Set when you want to build Bullet 3" ON) OPTION(BUILD_PYBULLET "Set when you want to build pybullet (experimental Python bindings for Bullet)" OFF) +IF(BUILD_PYBULLET) + FIND_PACKAGE(PythonLibs 2.7 REQUIRED) +ENDIF(BUILD_PYBULLET) IF(BUILD_BULLET3) IF(APPLE) diff --git a/examples/ExampleBrowser/ExampleEntries.cpp b/examples/ExampleBrowser/ExampleEntries.cpp index 3ec1403d6..08f71cf69 100644 --- a/examples/ExampleBrowser/ExampleEntries.cpp +++ b/examples/ExampleBrowser/ExampleEntries.cpp @@ -83,8 +83,10 @@ static ExampleEntry gDefaultExamples[]= ExampleEntry(0,"API"), + ExampleEntry(1,"Basic Example","Create some rigid bodies using box collision shapes. This is a good example to familiarize with the basic initialization of Bullet. The Basic Example can also be compiled without graphical user interface, as a console application. Press W for wireframe, A to show AABBs, I to suspend/restart physics simulation. Press D to toggle auto-deactivation of the simulation. ", BasicExampleCreateFunc), + ExampleEntry(1,"Rolling Friction", "Damping is often not good enough to keep rounded objects from rolling down a sloped surface. Instead, you can set the rolling friction of a rigid body. Generally it is best to leave the rolling friction to zero, to avoid artifacts.", RollingFrictionCreateFunc), ExampleEntry(1,"Constraints","Show the use of the various constraints in Bullet. Press the L key to visualize the constraint limits. Press the C key to visualize the constraint frames.", diff --git a/examples/pybullet/CMakeLists.txt b/examples/pybullet/CMakeLists.txt index b5ee53a0e..a583192ab 100644 --- a/examples/pybullet/CMakeLists.txt +++ b/examples/pybullet/CMakeLists.txt @@ -4,7 +4,7 @@ INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/src ${BULLET_PHYSICS_SOURCE_DIR}/examples ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs - /usr/include/python2.7 + ${PYTHON_INCLUDE_DIRS} ) SET(pybullet_SRCS @@ -18,7 +18,7 @@ ADD_LIBRARY(pybullet ${pybullet_SRCS}) SET_TARGET_PROPERTIES(pybullet PROPERTIES VERSION ${BULLET_VERSION}) SET_TARGET_PROPERTIES(pybullet PROPERTIES SOVERSION ${BULLET_VERSION}) - TARGET_LINK_LIBRARIES(pybullet BulletExampleBrowserLib BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen Bullet3Common Python) + TARGET_LINK_LIBRARIES(pybullet BulletExampleBrowserLib BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen Bullet3Common ${PYTHON_LIBRARIES}) ENDIF (BUILD_SHARED_LIBS)