Browse Source

Add ppremake package for bullet

rdb 13 years ago
parent
commit
91e305789a
4 changed files with 26 additions and 0 deletions
  1. 10 0
      dtool/Config.pp
  2. 5 0
      dtool/LocalSetup.pp
  3. 5 0
      dtool/Package.pp
  4. 6 0
      dtool/pptempl/Global.pp

+ 10 - 0
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

+ 5 - 0
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]]

+ 5 - 0
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]

+ 6 - 0
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