From 3c240ae0cd5a94909397f2deacb1171d31404b6f Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 8 Feb 2014 16:21:49 -0700 Subject: [PATCH] CMake: Build panda3d.ode. --- panda/CMakeLists.txt | 9 ++++- panda/src/ode/CMakeLists.txt | 76 ++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100755 panda/src/ode/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 74a1f8bc34..c057dc6539 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -61,9 +61,12 @@ add_subdirectory(src/egg2pg) add_subdirectory(src/framework) add_subdirectory(src/testbed) -# For other metalibs +# For other components +# physics add_subdirectory(src/physics) add_subdirectory(src/particlesystem) +# ode +add_subdirectory(src/ode) # Include panda metalibs add_subdirectory(metalibs/panda) @@ -93,3 +96,7 @@ if(HAVE_EGG) endif() add_python_module(physics p3physics p3particlesystem) + +if(HAVE_ODE) + add_python_module(ode p3ode) +endif() diff --git a/panda/src/ode/CMakeLists.txt b/panda/src/ode/CMakeLists.txt new file mode 100755 index 0000000000..9e17af5b24 --- /dev/null +++ b/panda/src/ode/CMakeLists.txt @@ -0,0 +1,76 @@ +if(HAVE_ODE) + set(P3ODE_HEADERS + ode_includes.h config_ode.h + odeWorld.I odeWorld.h + odeMass.I odeMass.h + odeBody.I odeBody.h + odeJointGroup.I odeJointGroup.h + odeJoint.I odeJoint.h + odeUtil.h + odeSpace.I odeSpace.h + odeGeom.I odeGeom.h + odeSurfaceParameters.I odeSurfaceParameters.h + odeContactGeom.I odeContactGeom.h + odeContact.I odeContact.h + odeAMotorJoint.I odeAMotorJoint.h + odeBallJoint.I odeBallJoint.h + odeContactJoint.I odeContactJoint.h + odeFixedJoint.I odeFixedJoint.h + odeHingeJoint.I odeHingeJoint.h + odeHinge2Joint.I odeHinge2Joint.h + odeLMotorJoint.I odeLMotorJoint.h + odeNullJoint.I odeNullJoint.h + odePlane2dJoint.I odePlane2dJoint.h + odeSliderJoint.I odeSliderJoint.h + odeUniversalJoint.I odeUniversalJoint.h + odeJointCollection.I odeJointCollection.h + odeSimpleSpace.I odeSimpleSpace.h + odeHashSpace.I odeHashSpace.h + odeQuadTreeSpace.I odeQuadTreeSpace.h + odeSphereGeom.I odeSphereGeom.h + odeBoxGeom.I odeBoxGeom.h + odePlaneGeom.I odePlaneGeom.h + odeCappedCylinderGeom.I odeCappedCylinderGeom.h + odeCylinderGeom.I odeCylinderGeom.h + odeRayGeom.I odeRayGeom.h + odeTriMeshData.I odeTriMeshData.h + odeTriMeshGeom.I odeTriMeshGeom.h + odeCollisionEntry.I odeCollisionEntry.h + odeHelperStructs.h) + + set(P3ODE_SOURCES + config_ode.cxx + odeWorld.cxx odeMass.cxx odeBody.cxx + odeJointGroup.cxx odeJoint.cxx + odeUtil.cxx + odeSpace.cxx + odeGeom.cxx + odeSurfaceParameters.cxx + odeContactGeom.cxx odeContact.cxx + odeAMotorJoint.cxx odeBallJoint.cxx + odeContactJoint.cxx odeFixedJoint.cxx + odeHingeJoint.cxx odeHinge2Joint.cxx + odeLMotorJoint.cxx odeNullJoint.cxx + odePlane2dJoint.cxx odeSliderJoint.cxx + odeUniversalJoint.cxx odeJointCollection.cxx + odeSimpleSpace.cxx + odeHashSpace.cxx odeQuadTreeSpace.cxx + odeSphereGeom.cxx odeBoxGeom.cxx + odePlaneGeom.cxx odeCappedCylinderGeom.cxx + odeCylinderGeom.cxx odeRayGeom.cxx + odeTriMeshData.cxx odeTriMeshGeom.cxx + odeCollisionEntry.cxx) + + set(P3ODE_IGATE_SOURCES "${P3ODE_HEADERS};${P3ODE_SOURCES}") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeConvexGeom.h") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHeightFieldGeom.h") + list(REMOVE_ITEM P3ODE_IGATE_SOURCES "odeHelperStructs.h") + + composite_sources(p3ode P3ODE_SOURCES) + add_library(p3ode ${P3ODE_SOURCES} ${P3ODE_HEADERS}) + set_target_properties(p3ode PROPERTIES COMPILE_DEFINITIONS dSINGLE) + target_link_libraries(p3ode p3pgraph p3physics ${ODE_LIBRARY}) + target_interrogate(p3ode ${P3ODE_IGATE_SOURCES}) + + install(TARGETS p3ode DESTINATION lib) +endif()