Allow to compile pybullet on Windows, using CMake

(got it to run, rename pybullet.dll into pybullet.pyd and copy in c:\python34\dlls)
Update test.py
Allow to compile pybullet using Python 3.x and 2.7
This commit is contained in:
erwin coumans
2016-05-10 00:57:54 -07:00
parent e9c6abff47
commit 99073e03f7
4 changed files with 241 additions and 39 deletions

View File

@@ -1,4 +1,3 @@
IF (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src
@@ -12,13 +11,19 @@ SET(pybullet_SRCS
../../examples/ExampleBrowser/ExampleEntries.cpp
)
IF(WIN32)
LINK_LIBRARIES(
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
)
ADD_LIBRARY(pybullet ${pybullet_SRCS})
ENDIF(WIN32)
ADD_LIBRARY(pybullet SHARED ${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_LIBRARIES})
ENDIF (BUILD_SHARED_LIBS)
TARGET_LINK_LIBRARIES(pybullet BulletExampleBrowserLib BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen Bullet3Common ${PYTHON_LIBRARIES})