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

@@ -192,9 +192,15 @@ 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)
SET(BUILD_SHARED_LIBS ON CACHE BOOL "Shared Libs" FORCE)
IF(WIN32)
FIND_PACKAGE(PythonLibs 3.4 REQUIRED)
SET(BUILD_SHARED_LIBS OFF CACHE BOOL "Shared Libs" FORCE)
ELSE(WIN32)
FIND_PACKAGE(PythonLibs 2.7 REQUIRED)
SET(BUILD_SHARED_LIBS ON CACHE BOOL "Shared Libs" FORCE)
ENDIF(WIN32)
ENDIF(BUILD_PYBULLET)
IF(BUILD_BULLET3)