Kaynağa Gözat

Add vorbis package definition in ppremake in anticipation of ogg vorbis support. Also, remove unnecessary HAVE_VORBIS from dtool_config.h.

rdb 12 yıl önce
ebeveyn
işleme
30f1f50e78
4 değiştirilmiş dosya ile 25 ekleme ve 3 silme
  1. 6 0
      dtool/Config.pp
  2. 8 3
      dtool/LocalSetup.pp
  3. 5 0
      dtool/Package.pp
  4. 6 0
      dtool/pptempl/Global.pp

+ 6 - 0
dtool/Config.pp

@@ -1153,6 +1153,12 @@
 #endif
 #endif
 #defer HAVE_BULLET $[libtest $[BULLET_LPATH],$[BULLET_LIBS]]
 #defer HAVE_BULLET $[libtest $[BULLET_LPATH],$[BULLET_LIBS]]
 
 
+// libvorbisfile is used for reading Ogg Vorbis audio files (.ogg).
+#define VORBIS_IPATH
+#define VORBIS_LPATH
+#define VORBIS_LIBS $[if $[WINDOWS_PLATFORM],libogg_static.lib libvorbis_static.lib libvorbisfile_static.lib,ogg vorbis vorbisfile]
+#defer HAVE_VORBIS $[libtest $[VORBIS_LPATH],$[VORBIS_LIBS]]
+
 // Define this to explicitly indicate the given platform string within
 // Define this to explicitly indicate the given platform string within
 // the resulting Panda runtime.  Normally it is best to leave this
 // the resulting Panda runtime.  Normally it is best to leave this
 // undefined, in which case Panda will determine the best value
 // undefined, in which case Panda will determine the best value

+ 8 - 3
dtool/LocalSetup.pp

@@ -240,6 +240,11 @@
 #else
 #else
 #print - Did not find Bullet Physics
 #print - Did not find Bullet Physics
 #endif
 #endif
+#if $[HAVE_VORBIS]
+#print + libvorbis (Ogg Vorbis Decoder)
+#else
+#print - Did not find libvorbis (Ogg Vorbis Decoder)
+#endif
 
 
 #print
 #print
 #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]]
 #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]]
@@ -340,6 +345,9 @@ $[cdefine HAVE_FCOLLADA]
 /* Define if we have ARToolKit available. */
 /* Define if we have ARToolKit available. */
 $[cdefine HAVE_ARTOOLKIT]
 $[cdefine HAVE_ARTOOLKIT]
 
 
+/* Define if we have libvorbisfile available. */
+$[cdefine HAVE_VORBIS]
+
 /* Define if we have OpenSSL installed.  */
 /* Define if we have OpenSSL installed.  */
 $[cdefine HAVE_OPENSSL]
 $[cdefine HAVE_OPENSSL]
 $[cdefine REPORT_OPENSSL_ERRORS]
 $[cdefine REPORT_OPENSSL_ERRORS]
@@ -377,9 +385,6 @@ $[cdefine HAVE_SQUISH]
 /* Define if we have Berkeley DB installed.  */
 /* Define if we have Berkeley DB installed.  */
 $[cdefine HAVE_BDB]
 $[cdefine HAVE_BDB]
 
 
-/* Define if we have VRPN installed.  */
-$[cdefine HAVE_VRPN]
-
 /* Define if we have HELIX installed.  */
 /* Define if we have HELIX installed.  */
 $[cdefine HAVE_HELIX]
 $[cdefine HAVE_HELIX]
 
 

+ 5 - 0
dtool/Package.pp

@@ -391,6 +391,11 @@
 #set BULLET_LIBS $[BULLET_LIBS]
 #set BULLET_LIBS $[BULLET_LIBS]
 #set HAVE_BULLET $[HAVE_BULLET]
 #set HAVE_BULLET $[HAVE_BULLET]
 
 
+#set VORBIS_IPATH $[unixfilename $[VORBIS_IPATH]]
+#set VORBIS_LPATH $[unixfilename $[VORBIS_LPATH]]
+#set VORBIS_LIBS $[VORBIS_LIBS]
+#set HAVE_VORBIS $[HAVE_VORBIS]
+
 // Now infer a few more variables based on what was defined.
 // Now infer a few more variables based on what was defined.
 #if $[and $[HAVE_GTK],$[PKG_CONFIG]]
 #if $[and $[HAVE_GTK],$[PKG_CONFIG]]
   #define cflags $[shell $[PKG_CONFIG] gtk+-2.0 --cflags]
   #define cflags $[shell $[PKG_CONFIG] gtk+-2.0 --cflags]

+ 6 - 0
dtool/pptempl/Global.pp

@@ -510,6 +510,12 @@
   #define bullet_libs $[BULLET_LIBS]
   #define bullet_libs $[BULLET_LIBS]
 #endif
 #endif
 
 
+#if $[HAVE_VORBIS]
+  #define vorbis_ipath $[wildcard $[VORBIS_IPATH]]
+  #define vorbis_lpath $[wildcard $[VORBIS_LPATH]]
+  #define vorbis_libs $[VORBIS_LIBS]
+#endif
+
 // We define these two variables true here in the global scope; a
 // We define these two variables true here in the global scope; a
 // particular Sources.pp file can redefine these to be false to
 // particular Sources.pp file can redefine these to be false to
 // prevent a particular directory or target from being built in
 // prevent a particular directory or target from being built in