From 91e305789ad742480ad5eedb1e0b713f94214ba8 Mon Sep 17 00:00:00 2001 From: rdb Date: Thu, 25 Oct 2012 10:03:55 +0000 Subject: [PATCH] Add ppremake package for bullet --- dtool/Config.pp | 10 ++++++++++ dtool/LocalSetup.pp | 5 +++++ dtool/Package.pp | 5 +++++ dtool/pptempl/Global.pp | 6 ++++++ 4 files changed, 26 insertions(+) diff --git a/dtool/Config.pp b/dtool/Config.pp index 8130021c41..97284e00a0 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -1126,6 +1126,16 @@ // Unset this if you built libRocket without Python bindings #defer HAVE_ROCKET_PYTHON $[and $[HAVE_ROCKET],$[HAVE_PYTHON]] +// Bullet is a physics engine +#define BULLET_IPATH /usr/local/include +#define BULLET_LPATH /usr/local/lib +#if $[WINDOWS_PLATFORM] +#define BULLET_LIBS BulletSoftBody.lib BulletDynamics.lib BulletCollision.lib LinearMath.lib +#else +#define BULLET_LIBS BulletSoftBody BulletDynamics BulletCollision LinearMath +#endif +#defer HAVE_BULLET $[libtest $[BULLET_LPATH],$[BULLET_LIBS]] + // Define this to explicitly indicate the given platform string within // the resulting Panda runtime. Normally it is best to leave this // undefined, in which case Panda will determine the best value diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 222d2a92e0..429e8eec73 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -239,6 +239,11 @@ #else #print - Did not find libRocket #endif +#if $[HAVE_BULLET] +#print + Bullet Physics +#else +#print - Did not find Bullet Physics +#endif #print #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]] diff --git a/dtool/Package.pp b/dtool/Package.pp index 0d194219f9..9da3e85a29 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -386,6 +386,11 @@ #set HAVE_ROCKET $[HAVE_ROCKET] #set HAVE_ROCKET_PYTHON $[HAVE_ROCKET_PYTHON] +#set BULLET_IPATH $[unixfilename $[BULLET_IPATH]] +#set BULLET_LPATH $[unixfilename $[BULLET_LPATH]] +#set BULLET_LIBS $[BULLET_LIBS] +#set HAVE_BULLET $[HAVE_BULLET] + // Now infer a few more variables based on what was defined. #if $[and $[HAVE_GTK],$[PKG_CONFIG]] #define cflags $[shell $[PKG_CONFIG] gtk+-2.0 --cflags] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 4f4c393d58..cd5f385f0e 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -504,6 +504,12 @@ #define rocket_libs $[ROCKET_LIBS] #endif +#if $[HAVE_BULLET] + #define bullet_ipath $[wildcard $[BULLET_IPATH]] + #define bullet_lpath $[wildcard $[BULLET_LPATH]] + #define bullet_libs $[BULLET_LIBS] +#endif + // We define these two variables true here in the global scope; a // particular Sources.pp file can redefine these to be false to // prevent a particular directory or target from being built in