Explorar el Código

fix recursive reference to HAVE_GL

David Rose hace 19 años
padre
commit
a1b75855e1
Se han modificado 3 ficheros con 8 adiciones y 4 borrados
  1. 6 3
      dtool/Config.pp
  2. 1 0
      dtool/Package.pp
  3. 1 1
      dtool/pptempl/Global.pp

+ 6 - 3
dtool/Config.pp

@@ -478,19 +478,22 @@
 #defer GL_IPATH /usr/include
 #defer GL_LPATH
 #defer GL_LIBS
+#defer GLU_LIBS
 #if $[WINDOWS_PLATFORM]
-  #define GL_LIBS opengl32.lib $[if $[HAVE_GLU],glu32.lib]
+  #define GL_LIBS opengl32.lib
+  #define GLU_LIBS glu32.lib
 #elif $[OSX_PLATFORM]
   #defer GL_FRAMEWORK OpenGL
 #else
   #defer GL_LPATH /usr/X11R6/lib
-  #defer GL_LIBS GL $[if $[HAVE_GLU],GLU]
+  #defer GL_LIBS GL
+  #defer GLU_LIBS GLU
 #endif
 #defer HAVE_GL $[libtest $[GL_LPATH],$[GL_LIBS]]
 
 // GLU is an auxiliary library that is usually provided with OpenGL,
 // but is sometimes missing (e.g. the default FC5 installation).
-#defer HAVE_GLU $[HAVE_GL]
+#defer HAVE_GLU $[libtest $[GL_LPATH],$[GLU_LIBS]]
 
 // Is Mesa installed separately from OpenGL?  Mesa is an open-source
 // software-only OpenGL renderer.  Panda can link with it

+ 1 - 0
dtool/Package.pp

@@ -181,6 +181,7 @@
 #set GL_IPATH $[unixfilename $[GL_IPATH]]
 #set GL_LPATH $[unixfilename $[GL_LPATH]]
 #set GL_LIBS $[GL_LIBS]
+#set GLU_LIBS $[GLU_LIBS]
 #set HAVE_GL $[HAVE_GL]
 #set HAVE_GLU $[HAVE_GLU]
 

+ 1 - 1
dtool/pptempl/Global.pp

@@ -122,7 +122,7 @@
   #define gl_ipath $[wildcard $[GL_IPATH]]
   #define gl_lpath $[wildcard $[GL_LPATH]]
   #define gl_cflags $[GL_CFLAGS]
-  #define gl_libs $[GL_LIBS]
+  #define gl_libs $[GL_LIBS] $[if $[HAVE_GLU],$[GLU_LIBS]]
   #define gl_framework $[GL_FRAMEWORK]
 #endif