From b5d9b8658d1b4529da92b95be54a90e626ec299d Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Fri, 7 Feb 2014 18:19:05 -0700 Subject: [PATCH] CMake: Panda3D physics and particlesystem. --- panda/CMakeLists.txt | 7 ++++ panda/metalibs/pandaphysics/CMakeLists.txt | 4 ++ panda/src/particlesystem/CMakeLists.txt | 45 ++++++++++++++++++++++ panda/src/physics/CMakeLists.txt | 43 +++++++++++++++++++++ 4 files changed, 99 insertions(+) create mode 100644 panda/metalibs/pandaphysics/CMakeLists.txt create mode 100644 panda/src/particlesystem/CMakeLists.txt create mode 100644 panda/src/physics/CMakeLists.txt diff --git a/panda/CMakeLists.txt b/panda/CMakeLists.txt index 1a0c7ded18..74a1f8bc34 100644 --- a/panda/CMakeLists.txt +++ b/panda/CMakeLists.txt @@ -61,10 +61,15 @@ add_subdirectory(src/egg2pg) add_subdirectory(src/framework) add_subdirectory(src/testbed) +# For other metalibs +add_subdirectory(src/physics) +add_subdirectory(src/particlesystem) + # Include panda metalibs add_subdirectory(metalibs/panda) add_subdirectory(metalibs/pandagl) add_subdirectory(metalibs/pandaegg) +add_subdirectory(metalibs/pandaphysics) # Now add the Python modules: @@ -86,3 +91,5 @@ add_python_module(core ${CORE_MODULE_COMPONENTS}) if(HAVE_EGG) add_python_module(egg p3egg p3egg2pg) endif() + +add_python_module(physics p3physics p3particlesystem) diff --git a/panda/metalibs/pandaphysics/CMakeLists.txt b/panda/metalibs/pandaphysics/CMakeLists.txt new file mode 100644 index 0000000000..f48411820c --- /dev/null +++ b/panda/metalibs/pandaphysics/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(pandaphysics pandaphysics.cxx) +target_link_libraries(pandaphysics p3physics p3particlesystem) + +install(TARGETS pandaphysics DESTINATION lib) diff --git a/panda/src/particlesystem/CMakeLists.txt b/panda/src/particlesystem/CMakeLists.txt new file mode 100644 index 0000000000..f2e405b41b --- /dev/null +++ b/panda/src/particlesystem/CMakeLists.txt @@ -0,0 +1,45 @@ +set(P3PARTICLESYSTEM_HEADERS + baseParticle.I baseParticle.h baseParticleEmitter.I + baseParticleEmitter.h baseParticleFactory.I + baseParticleFactory.h baseParticleRenderer.I + baseParticleRenderer.h arcEmitter.I arcEmitter.h + boxEmitter.I boxEmitter.h + config_particlesystem.h discEmitter.I discEmitter.h + geomParticleRenderer.I geomParticleRenderer.h lineEmitter.I + lineEmitter.h lineParticleRenderer.I lineParticleRenderer.h + particleSystem.I particleSystem.h particleSystemManager.I + particleSystemManager.h pointEmitter.I pointEmitter.h + pointParticle.h pointParticleFactory.h + pointParticleRenderer.I pointParticleRenderer.h + rectangleEmitter.I rectangleEmitter.h ringEmitter.I + ringEmitter.h sparkleParticleRenderer.I + sparkleParticleRenderer.h sphereSurfaceEmitter.I + sphereSurfaceEmitter.h sphereVolumeEmitter.I + sphereVolumeEmitter.h spriteParticleRenderer.I + spriteParticleRenderer.h tangentRingEmitter.I + tangentRingEmitter.h zSpinParticle.I zSpinParticle.h + zSpinParticleFactory.I zSpinParticleFactory.h + particleCommonFuncs.h colorInterpolationManager.I + colorInterpolationManager.h) + +set(P3PARTICLESYSTEM_SOURCES + baseParticle.cxx baseParticleEmitter.cxx baseParticleFactory.cxx + baseParticleRenderer.cxx boxEmitter.cxx arcEmitter.cxx + config_particlesystem.cxx discEmitter.cxx + geomParticleRenderer.cxx lineEmitter.cxx + lineParticleRenderer.cxx particleSystem.cxx + particleSystemManager.cxx pointEmitter.cxx pointParticle.cxx + pointParticleFactory.cxx pointParticleRenderer.cxx + rectangleEmitter.cxx ringEmitter.cxx + sparkleParticleRenderer.cxx sphereSurfaceEmitter.cxx + sphereVolumeEmitter.cxx spriteParticleRenderer.cxx + tangentRingEmitter.cxx zSpinParticle.cxx + zSpinParticleFactory.cxx colorInterpolationManager.cxx) + + +composite_sources(p3particlesystem P3PARTICLESYSTEM_SOURCES) +add_library(p3particlesystem ${P3PARTICLESYSTEM_HEADERS} ${P3PARTICLESYSTEM_SOURCES}) +target_link_libraries(p3particlesystem p3pgraph p3physics) +target_interrogate(p3particlesystem ALL) + +install(TARGETS p3particlesystem DESTINATION lib) diff --git a/panda/src/physics/CMakeLists.txt b/panda/src/physics/CMakeLists.txt new file mode 100644 index 0000000000..3353864326 --- /dev/null +++ b/panda/src/physics/CMakeLists.txt @@ -0,0 +1,43 @@ +set(P3PHYSICS_HEADERS + actorNode.I actorNode.h angularEulerIntegrator.h angularForce.h + angularIntegrator.h angularVectorForce.I + angularVectorForce.h baseForce.I baseForce.h + baseIntegrator.I baseIntegrator.h config_physics.h + forceNode.I forceNode.h + linearControlForce.I linearControlForce.h + linearCylinderVortexForce.I linearCylinderVortexForce.h + linearDistanceForce.I + linearDistanceForce.h linearEulerIntegrator.h linearForce.I + linearForce.h linearFrictionForce.I linearFrictionForce.h + linearIntegrator.h linearJitterForce.h linearNoiseForce.I + linearNoiseForce.h linearRandomForce.I linearRandomForce.h + linearSinkForce.h linearSourceForce.h + linearUserDefinedForce.I linearUserDefinedForce.h + linearVectorForce.I linearVectorForce.h physical.I + physical.h physicalNode.I physicalNode.h + physicsCollisionHandler.I physicsCollisionHandler.h + physicsManager.I physicsManager.h + physicsObject.I physicsObject.h + physicsObjectCollection.I physicsObjectCollection.h) + +set(P3PHYSICS_SOURCES + actorNode.cxx angularEulerIntegrator.cxx angularForce.cxx + angularIntegrator.cxx angularVectorForce.cxx baseForce.cxx + baseIntegrator.cxx config_physics.cxx forceNode.cxx + linearControlForce.cxx + linearCylinderVortexForce.cxx linearDistanceForce.cxx + linearEulerIntegrator.cxx linearForce.cxx + linearFrictionForce.cxx linearIntegrator.cxx + linearJitterForce.cxx linearNoiseForce.cxx + linearRandomForce.cxx linearSinkForce.cxx + linearSourceForce.cxx linearUserDefinedForce.cxx + linearVectorForce.cxx physical.cxx physicalNode.cxx + physicsCollisionHandler.cxx physicsManager.cxx physicsObject.cxx + physicsObjectCollection.cxx) + +composite_sources(p3physics P3PHYSICS_SOURCES) +add_library(p3physics ${P3PHYSICS_HEADERS} ${P3PHYSICS_SOURCES}) +target_link_libraries(p3physics p3pgraph p3linmath p3collide) +target_interrogate(p3physics ALL) + +install(TARGETS p3physics DESTINATION lib)