Commit c6d12e0d authored by Nicolai Hähnle's avatar Nicolai Hähnle
Browse files

Fixes for Cygwin by Yaakov

This patch fixes a few issues with piglet on Cygwin/X (which uses Mesa
for OpenGL):

1) Cygwin requires that all dependencies be explicitly passed in
dependency order during linking.  This means that static libraries must
precede the shared libraries on which they depend.

2) Cygwin defines log2 as a macro instead of a function.

3) Cygwin doesn't provide lspci(8).
parent 94dac46a
......@@ -272,7 +272,8 @@ class Environment:
def collectData(self):
print >>self.file, "glxinfo:", '@@@' + encode(self.run('glxinfo'))
print >>self.file, "lspci:", '@@@' + encode(self.run('lspci'))
if sys.platform != 'cygwin':
print >>self.file, "lspci:", '@@@' + encode(self.run('lspci'))
class Test:
......
......@@ -11,12 +11,12 @@ link_directories (
)
link_libraries (
mesautil
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${GLUT_glut_LIBRARY}
${TIFF_LIBRARY}
mesautil
piglitutil
)
add_executable (crash-texparameter-before-teximage crash-texparameter-before-teximage.c)
......
......@@ -10,12 +10,12 @@ link_directories (
)
link_libraries (
mesautil
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${GLUT_glut_LIBRARY}
${TIFF_LIBRARY}
mesautil
piglitutil
)
add_executable (linestipple linestipple.c)
......
......@@ -69,6 +69,7 @@ add_executable (glean
target_link_libraries (glean
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${X11_X11_LIB}
${TIFF_LIBRARY}
)
......@@ -33,6 +33,9 @@
#include <cctype>
#include <cmath>
#ifdef __CYGWIN__
#undef log2
#endif
#include "misc.h"
namespace GLEAN {
......
......@@ -29,6 +29,9 @@
// treadpix.cpp: implementation of ReadPixels tests
#include <cmath>
#ifdef __CYGWIN__
#undef log2
#endif
#include <iomanip>
#include <cstdlib>
#include "misc.h"
......
......@@ -46,6 +46,9 @@
#include <cmath>
#ifdef __CYGWIN__
#undef log2
#endif
#include <cstdlib>
#include "tvertattrib.h"
#include "glutils.h"
......
......@@ -12,12 +12,12 @@ link_directories (
)
link_libraries (
mesautil
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${GLUT_glut_LIBRARY}
${TIFF_LIBRARY}
mesautil
piglitutil
)
add_executable (trinity-fp1 trinity-fp1.c)
......
......@@ -10,12 +10,12 @@ link_directories (
)
link_libraries (
mesautil
piglitutil
${OPENGL_gl_LIBRARY}
${OPENGL_glu_LIBRARY}
${GLUT_glut_LIBRARY}
${TIFF_LIBRARY}
mesautil
piglitutil
)
add_executable (copytexsubimage copytexsubimage.c)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment