2016-05-03 20:02:06 +00:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
|
2016-11-04 20:15:10 +00:00
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
|
2017-02-21 04:55:37 +00:00
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
|
2016-05-04 20:24:06 +00:00
|
|
|
${PYTHON_INCLUDE_DIRS}
|
2016-05-03 20:02:06 +00:00
|
|
|
)
|
2016-09-11 10:35:12 +00:00
|
|
|
IF(BUILD_PYBULLET_NUMPY)
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${PYTHON_NUMPY_INCLUDE_DIR}
|
|
|
|
)
|
|
|
|
ENDIF()
|
2016-05-03 20:02:06 +00:00
|
|
|
|
|
|
|
SET(pybullet_SRCS
|
|
|
|
pybullet.c
|
2018-07-27 13:48:24 +00:00
|
|
|
../../examples/SharedMemory/plugins/collisionFilterPlugin/collisionFilterPlugin.cpp
|
2018-06-05 22:59:01 +00:00
|
|
|
../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.cpp
|
|
|
|
../../examples/SharedMemory/plugins/pdControlPlugin/pdControlPlugin.h
|
|
|
|
../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.cpp
|
|
|
|
../../examples/SharedMemory/b3RobotSimulatorClientAPI_NoDirect.h
|
2016-09-08 22:15:58 +00:00
|
|
|
../../examples/SharedMemory/IKTrajectoryHelper.cpp
|
|
|
|
../../examples/SharedMemory/IKTrajectoryHelper.h
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/ExampleBrowser/InProcessExampleBrowser.cpp
|
2018-01-17 20:48:48 +00:00
|
|
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.cpp
|
|
|
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/tinyRendererPlugin.h
|
|
|
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp
|
|
|
|
../../examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.h
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/OpenGLWindow/SimpleCamera.cpp
|
|
|
|
../../examples/OpenGLWindow/SimpleCamera.h
|
|
|
|
../../examples/TinyRenderer/geometry.cpp
|
|
|
|
../../examples/TinyRenderer/model.cpp
|
|
|
|
../../examples/TinyRenderer/tgaimage.cpp
|
|
|
|
../../examples/TinyRenderer/our_gl.cpp
|
|
|
|
../../examples/TinyRenderer/TinyRenderer.cpp
|
|
|
|
../../examples/SharedMemory/InProcessMemory.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClient.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClient.h
|
|
|
|
../../examples/SharedMemory/PhysicsServer.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsServer.h
|
|
|
|
../../examples/SharedMemory/PhysicsServerExample.cpp
|
2017-05-31 02:54:55 +00:00
|
|
|
../../examples/SharedMemory/PhysicsServerExampleBullet2.cpp
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsServerSharedMemory.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsServerSharedMemory.h
|
|
|
|
../../examples/SharedMemory/PhysicsDirect.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsDirect.h
|
|
|
|
../../examples/SharedMemory/PhysicsDirectC_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsDirectC_API.h
|
|
|
|
../../examples/SharedMemory/PhysicsServerCommandProcessor.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsServerCommandProcessor.h
|
2017-09-23 02:17:57 +00:00
|
|
|
../../examples/SharedMemory/b3PluginManager.cpp
|
|
|
|
../../examples/SharedMemory/b3PluginManager.h
|
|
|
|
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/SharedMemory/PhysicsClientSharedMemory.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientSharedMemory.h
|
2016-11-04 20:15:10 +00:00
|
|
|
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientSharedMemory_C_API.h
|
|
|
|
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/SharedMemory/PhysicsClientC_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientC_API.h
|
|
|
|
../../examples/SharedMemory/Win32SharedMemory.cpp
|
|
|
|
../../examples/SharedMemory/Win32SharedMemory.h
|
|
|
|
../../examples/SharedMemory/PosixSharedMemory.cpp
|
|
|
|
../../examples/SharedMemory/PosixSharedMemory.h
|
|
|
|
../../examples/Utils/b3ResourcePath.cpp
|
|
|
|
../../examples/Utils/b3ResourcePath.h
|
2017-02-17 18:47:55 +00:00
|
|
|
../../examples/Utils/RobotLoggingUtil.cpp
|
|
|
|
../../examples/Utils/RobotLoggingUtil.h
|
|
|
|
|
2018-04-12 07:09:44 +00:00
|
|
|
../../examples/ThirdPartyLibs/tinyxml2/tinyxml2.cpp
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
|
|
|
|
../../examples/ThirdPartyLibs/Wavefront/tiny_obj_loader.h
|
|
|
|
../../examples/ThirdPartyLibs/stb_image/stb_image.cpp
|
2018-09-11 06:18:34 +00:00
|
|
|
../../examples/ThirdPartyLibs/stb_image/stb_image_write.cpp
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/Importers/ImportColladaDemo/LoadMeshFromCollada.cpp
|
|
|
|
../../examples/Importers/ImportObjDemo/LoadMeshFromObj.cpp
|
|
|
|
../../examples/Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp
|
2016-12-31 22:43:15 +00:00
|
|
|
../../examples/Importers/ImportMJCFDemo/BulletMJCFImporter.cpp
|
2016-08-10 01:40:12 +00:00
|
|
|
../../examples/Importers/ImportURDFDemo/BulletUrdfImporter.cpp
|
|
|
|
../../examples/Importers/ImportURDFDemo/MyMultiBodyCreator.cpp
|
|
|
|
../../examples/Importers/ImportURDFDemo/URDF2Bullet.cpp
|
|
|
|
../../examples/Importers/ImportURDFDemo/UrdfParser.cpp
|
|
|
|
../../examples/Importers/ImportURDFDemo/urdfStringSplit.cpp
|
|
|
|
../../examples/Importers/ImportMeshUtility/b3ImportMeshUtility.cpp
|
|
|
|
../../examples/MultiThreading/b3PosixThreadSupport.cpp
|
|
|
|
../../examples/MultiThreading/b3Win32ThreadSupport.cpp
|
|
|
|
../../examples/MultiThreading/b3ThreadSupportInterface.cpp
|
2016-11-04 20:15:10 +00:00
|
|
|
|
2016-05-03 20:02:06 +00:00
|
|
|
)
|
2017-02-21 04:55:37 +00:00
|
|
|
IF(BUILD_PYBULLET_CLSOCKET)
|
|
|
|
ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
|
|
|
|
ENDIF(BUILD_PYBULLET_CLSOCKET)
|
2016-05-03 20:02:06 +00:00
|
|
|
|
2016-05-10 07:57:54 +00:00
|
|
|
IF(WIN32)
|
2016-11-04 20:15:10 +00:00
|
|
|
LINK_LIBRARIES(
|
2016-05-10 07:57:54 +00:00
|
|
|
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
|
|
|
)
|
2016-11-04 20:15:10 +00:00
|
|
|
IF(BUILD_PYBULLET_ENET)
|
|
|
|
ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET)
|
|
|
|
ENDIF(BUILD_PYBULLET_ENET)
|
2017-02-21 04:55:37 +00:00
|
|
|
IF(BUILD_PYBULLET_CLSOCKET)
|
|
|
|
ADD_DEFINITIONS(-DWIN32)
|
|
|
|
ENDIF(BUILD_PYBULLET_CLSOCKET)
|
|
|
|
|
2016-11-04 20:36:45 +00:00
|
|
|
ELSE(WIN32)
|
|
|
|
IF(BUILD_PYBULLET_ENET)
|
|
|
|
ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET)
|
|
|
|
ENDIF(BUILD_PYBULLET_ENET)
|
2017-02-21 04:55:37 +00:00
|
|
|
|
|
|
|
IF(BUILD_PYBULLET_CLSOCKET)
|
2017-04-14 19:43:45 +00:00
|
|
|
ADD_DEFINITIONS(${OSDEF})
|
2017-02-21 04:55:37 +00:00
|
|
|
ENDIF(BUILD_PYBULLET_CLSOCKET)
|
2016-05-10 07:57:54 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2016-11-04 20:15:10 +00:00
|
|
|
|
|
|
|
IF(BUILD_PYBULLET_ENET)
|
2017-02-21 04:34:05 +00:00
|
|
|
set(pybullet_SRCS ${pybullet_SRCS}
|
2016-11-04 20:15:10 +00:00
|
|
|
../../examples/SharedMemory/PhysicsClientUDP.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientUDP_C_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientUDP.h
|
|
|
|
../../examples/SharedMemory/PhysicsClientUDP_C_API.h
|
|
|
|
../../examples/ThirdPartyLibs/enet/win32.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/unix.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/callbacks.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/compress.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/host.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/list.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/packet.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/peer.c
|
|
|
|
../../examples/ThirdPartyLibs/enet/protocol.c
|
|
|
|
)
|
|
|
|
ENDIF(BUILD_PYBULLET_ENET)
|
2016-05-03 20:02:06 +00:00
|
|
|
|
2017-02-21 04:55:37 +00:00
|
|
|
IF(BUILD_PYBULLET_CLSOCKET)
|
|
|
|
set(pybullet_SRCS ${pybullet_SRCS}
|
|
|
|
../../examples/SharedMemory/PhysicsClientTCP.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientTCP.h
|
|
|
|
../../examples/SharedMemory/PhysicsClientTCP_C_API.cpp
|
|
|
|
../../examples/SharedMemory/PhysicsClientTCP_C_API.h
|
|
|
|
../../examples/ThirdPartyLibs/clsocket/src/SimpleSocket.cpp
|
|
|
|
../../examples/ThirdPartyLibs/clsocket/src/ActiveSocket.cpp
|
|
|
|
../../examples/ThirdPartyLibs/clsocket/src/PassiveSocket.cpp
|
|
|
|
)
|
|
|
|
ENDIF()
|
2017-02-21 04:34:05 +00:00
|
|
|
|
|
|
|
ADD_LIBRARY(pybullet SHARED ${pybullet_SRCS})
|
|
|
|
|
2016-11-29 17:09:35 +00:00
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES PREFIX "")
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES POSTFIX "")
|
|
|
|
|
2016-08-22 17:26:56 +00:00
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES VERSION ${BULLET_VERSION})
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES SOVERSION ${BULLET_VERSION})
|
2016-11-04 20:15:10 +00:00
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES DEBUG_POSTFIX "_d")
|
|
|
|
|
|
|
|
|
|
|
|
IF(WIN32)
|
2017-02-21 04:55:37 +00:00
|
|
|
IF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET)
|
2016-11-04 20:15:10 +00:00
|
|
|
TARGET_LINK_LIBRARIES(pybullet ws2_32 )
|
2017-02-24 23:34:11 +00:00
|
|
|
ENDIF(BUILD_PYBULLET_ENET OR BUILD_PYBULLET_CLSOCKET)
|
2016-11-04 20:15:10 +00:00
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd" )
|
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2019-01-11 19:47:36 +00:00
|
|
|
IF (APPLE)
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so" )
|
|
|
|
ENDIF()
|
2016-11-04 20:15:10 +00:00
|
|
|
|
|
|
|
|
2016-05-10 07:57:54 +00:00
|
|
|
|
2019-01-12 10:36:28 +00:00
|
|
|
TARGET_LINK_LIBRARIES(pybullet BulletExampleBrowserLib BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK Bullet3Common)
|
|
|
|
|
|
|
|
IF (WIN32)
|
|
|
|
TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES})
|
|
|
|
ELSEIF (APPLE)
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
|
|
|
ENDIF ()
|
|
|
|
# else Linux: dont link
|
2016-05-03 20:02:06 +00:00
|
|
|
|
2019-01-11 19:46:06 +00:00
|
|
|
IF(WIN32)
|
|
|
|
SET(PYTHON_SITE_PACKAGES Lib/site-packages CACHE PATH "Python install path")
|
|
|
|
ELSE()
|
|
|
|
SET(PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Python install path")
|
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES})
|
2016-05-03 20:02:06 +00:00
|
|
|
|