2019-06-14 14:49:24 +00:00
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/enet/include
|
|
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/clsocket/src
|
|
|
|
${PYTHON_INCLUDE_DIRS}
|
|
|
|
)
|
2016-09-11 10:35:12 +00:00
|
|
|
IF(BUILD_PYBULLET_NUMPY)
|
2019-06-14 14:49:24 +00:00
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
${PYTHON_NUMPY_INCLUDE_DIR}
|
|
|
|
)
|
2016-09-11 10:35:12 +00:00
|
|
|
ENDIF()
|
2016-05-03 20:02:06 +00:00
|
|
|
|
2021-03-01 22:03:48 +00:00
|
|
|
ADD_DEFINITIONS(-DSTATIC_LINK_SPD_PLUGIN )
|
2019-02-11 16:51:07 +00:00
|
|
|
|
2021-03-01 22:03:48 +00:00
|
|
|
IF(ENABLE_VHACD)
|
|
|
|
ADD_DEFINITIONS(-DBT_ENABLE_VHACD)
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
|
|
../../Extras/VHACD/inc
|
|
|
|
../../Extras/VHACD/public
|
|
|
|
)
|
|
|
|
ENDIF(ENABLE_VHACD)
|
2020-03-17 06:15:18 +00:00
|
|
|
|
2019-06-14 14:49:24 +00:00
|
|
|
SET(pybullet_SRCS
|
|
|
|
pybullet.c
|
2016-05-03 20:02:06 +00:00
|
|
|
)
|
2020-03-17 06:15:18 +00:00
|
|
|
|
|
|
|
IF(BUILD_CLSOCKET)
|
2019-06-14 14:49:24 +00:00
|
|
|
ADD_DEFINITIONS(-DBT_ENABLE_CLSOCKET)
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
2019-06-14 14:49:24 +00:00
|
|
|
|
|
|
|
IF(WIN32)
|
|
|
|
LINK_LIBRARIES(
|
|
|
|
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
|
|
|
)
|
2020-03-17 06:15:18 +00:00
|
|
|
IF(BUILD_ENET)
|
2019-06-14 14:49:24 +00:00
|
|
|
ADD_DEFINITIONS(-DWIN32 -DBT_ENABLE_ENET)
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
|
|
|
IF(BUILD_CLSOCKET)
|
2019-06-14 14:49:24 +00:00
|
|
|
ADD_DEFINITIONS(-DWIN32)
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
2019-06-14 14:49:24 +00:00
|
|
|
|
|
|
|
ELSE(WIN32)
|
2020-03-17 06:15:18 +00:00
|
|
|
IF(BUILD_ENET)
|
2019-06-14 14:49:24 +00:00
|
|
|
ADD_DEFINITIONS(-DHAS_SOCKLEN_T -DBT_ENABLE_ENET)
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
2019-06-14 14:49:24 +00:00
|
|
|
|
2020-03-17 06:15:18 +00:00
|
|
|
IF(BUILD_CLSOCKET)
|
2019-06-14 14:49:24 +00:00
|
|
|
ADD_DEFINITIONS(${OSDEF})
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
2019-06-14 14:49:24 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
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")
|
|
|
|
|
2019-06-14 14:49:24 +00:00
|
|
|
|
2016-11-04 20:15:10 +00:00
|
|
|
IF(WIN32)
|
2020-03-17 06:15:18 +00:00
|
|
|
IF(BUILD_ENET OR BUILD_CLSOCKET)
|
2019-06-14 14:49:24 +00:00
|
|
|
TARGET_LINK_LIBRARIES(pybullet ws2_32 )
|
2020-03-17 06:15:18 +00:00
|
|
|
ENDIF()
|
2016-11-04 20:15:10 +00:00
|
|
|
|
2019-06-14 14:49:24 +00:00
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".pyd" )
|
2016-11-04 20:15:10 +00:00
|
|
|
ENDIF(WIN32)
|
|
|
|
|
2019-06-14 14:49:24 +00:00
|
|
|
IF (APPLE)
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES SUFFIX ".so" )
|
2019-01-11 19:47:36 +00:00
|
|
|
ENDIF()
|
2016-11-04 20:15:10 +00:00
|
|
|
|
|
|
|
|
2019-06-14 14:49:24 +00:00
|
|
|
|
2020-03-17 06:15:18 +00:00
|
|
|
TARGET_LINK_LIBRARIES(pybullet BulletRoboticsGUI BulletExampleBrowserLib BulletRobotics BulletFileLoader BulletWorldImporter BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen BussIK Bullet3Common)
|
2019-06-14 14:49:24 +00:00
|
|
|
|
|
|
|
IF (WIN32)
|
2019-01-12 10:36:28 +00:00
|
|
|
TARGET_LINK_LIBRARIES(pybullet ${PYTHON_LIBRARIES})
|
2019-06-14 14:49:24 +00:00
|
|
|
ELSEIF (APPLE)
|
|
|
|
SET_TARGET_PROPERTIES(pybullet PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
|
|
|
|
ENDIF ()
|
2019-01-12 10:36:28 +00:00
|
|
|
# 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()
|
2019-06-14 14:49:24 +00:00
|
|
|
SET(PYTHON_SITE_PACKAGES lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "Python install path")
|
2019-01-11 19:46:06 +00:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
INSTALL(TARGETS pybullet DESTINATION ${PYTHON_SITE_PACKAGES})
|
2019-06-14 14:49:24 +00:00
|
|
|
|