mutter/tests/conform/test-no-gl-header.c
Neil Roberts b1542cf9dd Don't include cogl/cogl.h from test-utils.h
There was a circular depedency when building from a fresh git clone
where test-fixtures needs to be built before the cogl directory, but
test-fixtures also indirectly includes cogl-enum-types.h which is only
generated when building the cogl directory. If we change the header to
just include specific cogl headers instead of cogl/cogl.h then we can
break the circular dependency.

This needs a tweak to test-no-gl-header because that first undefines
COGL_COMPILATION before including test-utils.h. However it doesn't
really do any actual work so we can get away without including it.

Reviewed-by: Robert Bragg <robert@linux.intel.com>

(cherry picked from commit adb26bd13a48ed571ef4cae4de005e039b34e361)
2013-07-04 11:50:31 +01:00

17 lines
290 B
C

#undef COGL_COMPILATION
#include <cogl/cogl.h>
/* If you just include cogl/cogl.h, you shouldn't end up including any
GL headers */
#ifdef GL_TRUE
#error "Including cogl.h shouldn't be including any GL headers"
#endif
void test_no_gl_header (void);
void
test_no_gl_header (void)
{
}