mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-14 13:50:04 +00:00
709a55d5ab
requires shared library build: cmake .. -DBUILD_SHARED_LIBS=on then create a symbolic link from libpybullet.so to pybullet.so
275 lines
9.9 KiB
CMake
275 lines
9.9 KiB
CMake
|
|
INCLUDE_DIRECTORIES(
|
|
.
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
|
|
)
|
|
|
|
FILE(GLOB GwenGUISupport_SRCS "GwenGUISupport/*" )
|
|
FILE(GLOB GwenGUISupport_HDRS "GwenGUISupport/*" )
|
|
|
|
|
|
SET(BulletExampleBrowser_SRCS
|
|
OpenGLExampleBrowser.cpp
|
|
OpenGLGuiHelper.cpp
|
|
InProcessExampleBrowser.cpp
|
|
GL_ShapeDrawer.cpp
|
|
../SharedMemory/PhysicsServer.cpp
|
|
../SharedMemory/PhysicsClientSharedMemory.cpp
|
|
../SharedMemory/PhysicsClient.cpp
|
|
../SharedMemory/PhysicsClientC_API.cpp
|
|
../SharedMemory/PhysicsServerExample.cpp
|
|
../SharedMemory/PhysicsClientExample.cpp
|
|
../SharedMemory/PosixSharedMemory.cpp
|
|
../SharedMemory/Win32SharedMemory.cpp
|
|
../SharedMemory/InProcessMemory.cpp
|
|
../SharedMemory/PhysicsServerSharedMemory.cpp
|
|
../SharedMemory/PhysicsDirect.cpp
|
|
../SharedMemory/PhysicsDirect.h
|
|
../SharedMemory/PhysicsDirectC_API.cpp
|
|
../SharedMemory/PhysicsDirectC_API.h
|
|
../SharedMemory/SharedMemoryInProcessPhysicsC_API.cpp
|
|
../SharedMemory/PhysicsLoopBack.cpp
|
|
../SharedMemory/PhysicsLoopBack.h
|
|
../SharedMemory/PhysicsLoopBackC_API.cpp
|
|
../SharedMemory/PhysicsLoopBackC_API.h
|
|
../SharedMemory/PhysicsServerCommandProcessor.cpp
|
|
../SharedMemory/PhysicsServerCommandProcessor.h
|
|
../BasicDemo/BasicExample.cpp
|
|
../BasicDemo/BasicExample.h
|
|
../InverseDynamics/InverseDynamicsExample.cpp
|
|
../InverseDynamics/InverseDynamicsExample.h
|
|
../ForkLift/ForkLiftDemo.cpp
|
|
../ForkLift/ForkLiftDemo.h
|
|
../Tutorial/Tutorial.cpp
|
|
../Tutorial/Tutorial.h
|
|
../Tutorial/Dof6ConstraintTutorial.cpp
|
|
../Tutorial/Dof6ConstraintTutorial.h
|
|
../Collision/CollisionSdkC_Api.cpp
|
|
../Collision/CollisionSdkC_Api.h
|
|
../Collision/CollisionTutorialBullet2.cpp
|
|
../Collision/CollisionTutorialBullet2.h
|
|
../Collision/Internal/Bullet2CollisionSdk.cpp
|
|
../Collision/Internal/Bullet2CollisionSdk.h
|
|
../Collision/Internal/CollisionSdkInterface.h
|
|
../Collision/Internal/RealTimeBullet3CollisionSdk.cpp
|
|
../Collision/Internal/RealTimeBullet3CollisionSdk.h
|
|
../GyroscopicDemo/GyroscopicSetup.cpp
|
|
../GyroscopicDemo/GyroscopicSetup.h
|
|
../Planar2D/Planar2D.cpp
|
|
../Planar2D/Planar2D.h
|
|
../RollingFrictionDemo/RollingFrictionDemo.cpp
|
|
../RollingFrictionDemo/RollingFrictionDemo.h
|
|
../FractureDemo/FractureDemo.cpp
|
|
../FractureDemo/btFractureBody.cpp
|
|
../FractureDemo/btFractureDynamicsWorld.cpp
|
|
../FractureDemo/FractureDemo.h
|
|
../FractureDemo/btFractureBody.h
|
|
../FractureDemo/btFractureDynamicsWorld.h
|
|
../DynamicControlDemo/MotorDemo.cpp
|
|
../DynamicControlDemo/MotorDemo.h
|
|
../MultiThreading/MultiThreadingExample.cpp
|
|
../MultiThreading/b3PosixThreadSupport.cpp
|
|
../MultiThreading/b3Win32ThreadSupport.cpp
|
|
../MultiThreading/b3ThreadSupportInterface.cpp
|
|
../RenderingExamples/TimeSeriesCanvas.cpp
|
|
../RenderingExamples/TimeSeriesCanvas.h
|
|
../RenderingExamples/TimeSeriesFontData.cpp
|
|
../RenderingExamples/TimeSeriesFontData.h
|
|
|
|
../RenderingExamples/CoordinateSystemDemo.cpp
|
|
../RenderingExamples/CoordinateSystemDemo.h
|
|
../RenderingExamples/RaytracerSetup.cpp
|
|
../RenderingExamples/RaytracerSetup.h
|
|
../RenderingExamples/RenderInstancingDemo.cpp
|
|
../RenderingExamples/RenderInstancingDemo.h
|
|
../RenderingExamples/TimeSeriesExample.cpp
|
|
../Benchmarks/BenchmarkDemo.cpp
|
|
../Benchmarks/BenchmarkDemo.h
|
|
../Benchmarks/landscapeData.h
|
|
../Benchmarks/TaruData
|
|
../Raycast/RaytestDemo.cpp
|
|
../Importers/ImportBsp/BspConverter.h
|
|
../Importers/ImportBullet/SerializeSetup.cpp
|
|
../Importers/ImportBullet/SerializeSetup.h
|
|
|
|
../../Extras/Serialize/BulletWorldImporter/btWorldImporter.cpp
|
|
../../Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp
|
|
../../Extras/Serialize/BulletFileLoader/bChunk.cpp
|
|
../../Extras/Serialize/BulletFileLoader/bFile.cpp
|
|
../../Extras/Serialize/BulletFileLoader/bDNA.cpp
|
|
../../Extras/Serialize/BulletFileLoader/btBulletFile.cpp
|
|
|
|
../Importers/ImportBsp/BspLoader.h
|
|
../Importers/ImportBsp/ImportBspExample.h
|
|
../Importers/ImportColladaDemo/btMatrix4x4.h
|
|
../Importers/ImportColladaDemo/ColladaGraphicsInstance.h
|
|
../Importers/ImportColladaDemo/ImportColladaSetup.h
|
|
../Importers/ImportColladaDemo/LoadMeshFromCollada.h
|
|
../Importers/ImportObjDemo/ImportObjExample.h
|
|
../Importers/ImportObjDemo/LoadMeshFromObj.h
|
|
../Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.h
|
|
../Importers/ImportSTLDemo/ImportSTLSetup.h
|
|
../Importers/ImportSTLDemo/LoadMeshFromSTL.h
|
|
../Importers/ImportURDFDemo/ConvertRigidBodies2MultiBody.h
|
|
../Importers/ImportURDFDemo/ImportURDFSetup.h
|
|
../Importers/ImportURDFDemo/URDF2Bullet.h
|
|
../Importers/ImportURDFDemo/urdf_samples.h
|
|
../Importers/ImportBsp/BspConverter.cpp
|
|
../Importers/ImportBsp/BspLoader.cpp
|
|
../Importers/ImportBsp/ImportBspExample.cpp
|
|
../Importers/ImportColladaDemo/ImportColladaSetup.cpp
|
|
../Importers/ImportColladaDemo/LoadMeshFromCollada.cpp
|
|
../Importers/ImportObjDemo/ImportObjExample.cpp
|
|
../Importers/ImportObjDemo/LoadMeshFromObj.cpp
|
|
../Importers/ImportObjDemo/Wavefront2GLInstanceGraphicsShape.cpp
|
|
../Importers/ImportSTLDemo/ImportSTLSetup.cpp
|
|
../Importers/ImportURDFDemo/ImportURDFSetup.cpp
|
|
../Importers/ImportURDFDemo/URDF2Bullet.cpp
|
|
../Importers/ImportURDFDemo/MyMultiBodyCreator.cpp
|
|
../Importers/ImportURDFDemo/MyMultiBodyCreator.h
|
|
../Importers/ImportURDFDemo/UrdfParser.cpp
|
|
../Importers/ImportURDFDemo/urdfStringSplit.cpp
|
|
../Importers/ImportURDFDemo/urdfStringSplit.h
|
|
../Importers/ImportURDFDemo/BulletUrdfImporter.cpp
|
|
../Importers/ImportURDFDemo/BulletUrdfImporter.h
|
|
../VoronoiFracture/VoronoiFractureDemo.cpp
|
|
../VoronoiFracture/VoronoiFractureDemo.h
|
|
../VoronoiFracture/btConvexConvexMprAlgorithm.cpp
|
|
../VoronoiFracture/btConvexConvexMprAlgorithm.h
|
|
../Vehicles/Hinge2Vehicle.cpp
|
|
../Vehicles/Hinge2Vehicle.h
|
|
../MultiBody/Pendulum.cpp
|
|
../MultiBody/MultiBodySoftContact.cpp
|
|
../MultiBody/TestJointTorqueSetup.cpp
|
|
../MultiBody/TestJointTorqueSetup.h
|
|
../MultiBody/InvertedPendulumPDControl.cpp
|
|
../MultiBody/InvertedPendulumPDControl.h
|
|
../MultiBody/MultiBodyConstraintFeedback.cpp
|
|
../MultiBody/MultiDofDemo.cpp
|
|
../MultiBody/MultiDofDemo.h
|
|
../RigidBody/RigidBodySoftContact.cpp
|
|
../Constraints/TestHingeTorque.cpp
|
|
../Constraints/TestHingeTorque.h
|
|
../Constraints/ConstraintDemo.cpp
|
|
../Constraints/ConstraintDemo.h
|
|
../Constraints/Dof6Spring2Setup.cpp
|
|
../Constraints/Dof6Spring2Setup.h
|
|
../Constraints/ConstraintPhysicsSetup.cpp
|
|
../Constraints/ConstraintPhysicsSetup.h
|
|
|
|
|
|
../ThirdPartyLibs/stb_image/stb_image.cpp
|
|
../ThirdPartyLibs/stb_image/stb_image.h
|
|
|
|
../ThirdPartyLibs/Wavefront/tiny_obj_loader.cpp
|
|
../ThirdPartyLibs/tinyxml/tinystr.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxml.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxmlerror.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxmlparser.cpp
|
|
|
|
../ThirdPartyLibs/tinyxml/tinystr.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxml.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxmlerror.cpp
|
|
../ThirdPartyLibs/tinyxml/tinyxmlparser.cpp
|
|
../Utils/b3Clock.cpp
|
|
../Utils/b3Clock.h
|
|
../Utils/b3ResourcePath.cpp
|
|
../Utils/b3ResourcePath.h
|
|
${GwenGUISupport_SRCS}
|
|
${GwenGUISupport_HDRS}
|
|
${BULLET_PHYSICS_SOURCE_DIR}/build3/bullet.rc
|
|
)
|
|
|
|
IF (WIN32)
|
|
INCLUDE_DIRECTORIES(
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/Glew
|
|
)
|
|
IF (BUILD_SHARED_LIBS)
|
|
TARGET_LINK_LIBRARIES(
|
|
Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils
|
|
BulletInverseDynamics LinearMath OpenGLWindow gwen
|
|
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
|
)
|
|
ENDIF (BUILD_SHARED_LIBS)
|
|
ADD_DEFINITIONS(-DGLEW_STATIC)
|
|
ELSE(WIN32)
|
|
IF(APPLE)
|
|
find_library(COCOA NAMES Cocoa)
|
|
MESSAGE(${COCOA})
|
|
IF (BUILD_SHARED_LIBS)
|
|
TARGET_LINK_LIBRARIES(
|
|
Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils
|
|
BulletInverseDynamics LinearMath OpenGLWindow gwen
|
|
${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
|
)
|
|
ELSE(APPLE)
|
|
ENDIF (BUILD_SHARED_LIBS)
|
|
ADD_DEFINITIONS("-DGLEW_INIT_OPENGL11_FUNCTIONS=1")
|
|
ADD_DEFINITIONS("-DGLEW_STATIC")
|
|
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
|
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/Glew )
|
|
IF (BUILD_SHARED_LIBS)
|
|
TARGET_LINK_LIBRARIES(
|
|
Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils
|
|
BulletInverseDynamics LinearMath OpenGLWindow gwen
|
|
pthread dl
|
|
)
|
|
ENDIF(BUILD_SHARED_LIBS)
|
|
ENDIF(APPLE)
|
|
ENDIF(WIN32)
|
|
|
|
|
|
ADD_LIBRARY(BulletExampleBrowserLib ${BulletExampleBrowser_SRCS} )
|
|
SET_TARGET_PROPERTIES(BulletExampleBrowserLib PROPERTIES VERSION ${BULLET_VERSION})
|
|
SET_TARGET_PROPERTIES(BulletExampleBrowserLib PROPERTIES SOVERSION ${BULLET_VERSION})
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
.
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs
|
|
)
|
|
|
|
|
|
LINK_LIBRARIES(
|
|
BulletExampleBrowserLib Bullet3Common BulletSoftBody BulletDynamics BulletCollision BulletInverseDynamicsUtils BulletInverseDynamics LinearMath OpenGLWindow gwen
|
|
)
|
|
|
|
IF (WIN32)
|
|
INCLUDE_DIRECTORIES(
|
|
${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/Glew
|
|
)
|
|
LINK_LIBRARIES(
|
|
${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY}
|
|
)
|
|
ADD_DEFINITIONS(-DGLEW_STATIC)
|
|
ELSE(WIN32)
|
|
IF(APPLE)
|
|
find_library(COCOA NAMES Cocoa)
|
|
MESSAGE(${COCOA})
|
|
link_libraries(${COCOA} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY})
|
|
ELSE(APPLE)
|
|
ADD_DEFINITIONS("-DGLEW_INIT_OPENGL11_FUNCTIONS=1")
|
|
ADD_DEFINITIONS("-DGLEW_STATIC")
|
|
ADD_DEFINITIONS("-DGLEW_DYNAMIC_LOAD_ALL_GLX_FUNCTIONS=1")
|
|
INCLUDE_DIRECTORIES( ${BULLET_PHYSICS_SOURCE_DIR}/examples/ThirdPartyLibs/Glew )
|
|
LINK_LIBRARIES( pthread dl)
|
|
ENDIF(APPLE)
|
|
ENDIF(WIN32)
|
|
|
|
|
|
|
|
|
|
ADD_EXECUTABLE(App_ExampleBrowser
|
|
main.cpp
|
|
ExampleEntries.cpp
|
|
ExampleEntries.h
|
|
)
|
|
|
|
|
|
IF (INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|
|
SET_TARGET_PROPERTIES(App_ExampleBrowser PROPERTIES DEBUG_POSTFIX "_Debug")
|
|
SET_TARGET_PROPERTIES(App_ExampleBrowser PROPERTIES MINSIZEREL_POSTFIX "_MinsizeRel")
|
|
SET_TARGET_PROPERTIES(App_ExampleBrowser PROPERTIES RELWITHDEBINFO_POSTFIX "_RelWithDebugInfo")
|
|
ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES)
|