add CMake support for pybullet (still preliminary)

requires shared library build:
cmake .. -DBUILD_SHARED_LIBS=on
then create a symbolic link from libpybullet.so to pybullet.so
This commit is contained in:
Erwin Coumans
2016-05-03 13:02:06 -07:00
parent fb65c29033
commit 709a55d5ab
4 changed files with 93 additions and 34 deletions

View File

@@ -0,0 +1,24 @@
IF (BUILD_SHARED_LIBS)
INCLUDE_DIRECTORIES(
${BULLET_PHYSICS_SOURCE_DIR}/src
${BULLET_PHYSICS_SOURCE_DIR}/examples
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
/usr/include/python2.7
)
SET(pybullet_SRCS
pybullet.c
../../examples/ExampleBrowser/ExampleEntries.cpp
)
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)
ENDIF (BUILD_SHARED_LIBS)

View File

@@ -20,6 +20,7 @@ project ("pybullet")
".",
"../../src",
"../ThirdPartyLibs",
"/usr/include/python2.7",
}