summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
Diffstat (limited to 'config.tests')
-rwxr-xr-xconfig.tests/unix/compile.test3
-rw-r--r--config.tests/unix/egl/egl.cpp10
-rw-r--r--config.tests/unix/egl/egl.pro10
-rw-r--r--config.tests/unix/egl4gles1/egl4gles1.cpp10
-rw-r--r--config.tests/unix/egl4gles1/egl4gles1.pro10
-rw-r--r--config.tests/unix/opengles1/opengles1.cpp2
-rw-r--r--config.tests/unix/opengles1cl/opengles1cl.cpp2
-rw-r--r--config.tests/unix/opengles2/opengles2.cpp2
-rw-r--r--config.tests/unix/openvg/openvg.cpp16
-rw-r--r--config.tests/unix/openvg/openvg.pro19
-rw-r--r--config.tests/unix/shivavg/shivavg.cpp10
-rw-r--r--config.tests/unix/shivavg/shivavg.pro11
12 files changed, 98 insertions, 7 deletions
diff --git a/config.tests/unix/compile.test b/config.tests/unix/compile.test
index a854bd1..550890f 100755
--- a/config.tests/unix/compile.test
+++ b/config.tests/unix/compile.test
@@ -64,7 +64,8 @@ test -d "$OUTDIR/$TEST" || mkdir -p "$OUTDIR/$TEST"
cd "$OUTDIR/$TEST"
-make distclean >/dev/null 2>&1
+test -r Makefile && make distclean >/dev/null 2>&1
+
"$OUTDIR/bin/qmake" -nocache -spec "$QMKSPEC" "CONFIG+=$QMAKE_CONFIG" "LIBS*=$LFLAGS" "LIBS+=$MAC_ARCH_LFLAGS" "INCLUDEPATH*=$INCLUDEPATH" "QMAKE_CXXFLAGS*=$CXXFLAGS" "QMAKE_CXXFLAGS+=$MAC_ARCH_CXXFLAGS" "$SRCDIR/$TEST/$EXE.pro" -o "$OUTDIR/$TEST/Makefile"
if [ "$VERBOSE" = "yes" ]; then
diff --git a/config.tests/unix/egl/egl.cpp b/config.tests/unix/egl/egl.cpp
new file mode 100644
index 0000000..0c7f32c
--- /dev/null
+++ b/config.tests/unix/egl/egl.cpp
@@ -0,0 +1,10 @@
+#include <EGL/egl.h>
+
+int main(int, char **)
+{
+ EGLint x = 0;
+ EGLDisplay dpy = 0;
+ EGLContext ctx = 0;
+ eglDestroyContext(dpy, ctx);
+ return 0;
+}
diff --git a/config.tests/unix/egl/egl.pro b/config.tests/unix/egl/egl.pro
new file mode 100644
index 0000000..f04d053
--- /dev/null
+++ b/config.tests/unix/egl/egl.pro
@@ -0,0 +1,10 @@
+SOURCES = egl.cpp
+
+for(p, QMAKE_LIBDIR_EGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+
+CONFIG -= qt
diff --git a/config.tests/unix/egl4gles1/egl4gles1.cpp b/config.tests/unix/egl4gles1/egl4gles1.cpp
new file mode 100644
index 0000000..c1acb90
--- /dev/null
+++ b/config.tests/unix/egl4gles1/egl4gles1.cpp
@@ -0,0 +1,10 @@
+#include <GLES/egl.h>
+
+int main(int, char **)
+{
+ EGLint x = 0;
+ EGLDisplay dpy = 0;
+ EGLContext ctx = 0;
+ eglDestroyContext(dpy, ctx);
+ return 0;
+}
diff --git a/config.tests/unix/egl4gles1/egl4gles1.pro b/config.tests/unix/egl4gles1/egl4gles1.pro
new file mode 100644
index 0000000..667ea8e
--- /dev/null
+++ b/config.tests/unix/egl4gles1/egl4gles1.pro
@@ -0,0 +1,10 @@
+SOURCES = egl4gles1.cpp
+
+for(p, QMAKE_LIBDIR_EGL) {
+ exists($$p):LIBS += -L$$p
+}
+
+!isEmpty(QMAKE_INCDIR_EGL): INCLUDEPATH += $$QMAKE_INCDIR_EGL
+!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+
+CONFIG -= qt
diff --git a/config.tests/unix/opengles1/opengles1.cpp b/config.tests/unix/opengles1/opengles1.cpp
index a0060b4..de690c9 100644
--- a/config.tests/unix/opengles1/opengles1.cpp
+++ b/config.tests/unix/opengles1/opengles1.cpp
@@ -1,10 +1,8 @@
#include <GLES/gl.h>
-#include <GLES/egl.h>
int main(int, char **)
{
GLfloat a = 1.0f;
- eglInitialize(0, 0, 0);
glColor4f(a, a, a, a);
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/config.tests/unix/opengles1cl/opengles1cl.cpp b/config.tests/unix/opengles1cl/opengles1cl.cpp
index f864276..23ae710 100644
--- a/config.tests/unix/opengles1cl/opengles1cl.cpp
+++ b/config.tests/unix/opengles1cl/opengles1cl.cpp
@@ -1,10 +1,8 @@
#include <GLES/gl.h>
-#include <GLES/egl.h>
int main(int, char **)
{
GLfixed a = 0;
- eglInitialize(0, 0, 0);
glColor4x(a, a, a, a);
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp
index 493530d..63c7b35 100644
--- a/config.tests/unix/opengles2/opengles2.cpp
+++ b/config.tests/unix/opengles2/opengles2.cpp
@@ -1,9 +1,7 @@
-#include <EGL/egl.h>
#include <GLES2/gl2.h>
int main(int, char **)
{
- eglInitialize(0, 0, 0);
glUniform1f(1, GLfloat(1.0));
glClear(GL_COLOR_BUFFER_BIT);
diff --git a/config.tests/unix/openvg/openvg.cpp b/config.tests/unix/openvg/openvg.cpp
new file mode 100644
index 0000000..8f763cd
--- /dev/null
+++ b/config.tests/unix/openvg/openvg.cpp
@@ -0,0 +1,16 @@
+// There is some variation in OpenVG engines as to what case
+// the VG includes use. The Khronos reference implementation
+// for OpenVG 1.1 uses upper case, so we treat that as canonical.
+#if defined(QT_LOWER_CASE_VG_INCLUDES)
+#include <vg/openvg.h>
+#else
+#include <VG/openvg.h>
+#endif
+
+int main(int, char **)
+{
+ VGint i;
+ i = 2;
+ vgFlush();
+ return 0;
+}
diff --git a/config.tests/unix/openvg/openvg.pro b/config.tests/unix/openvg/openvg.pro
new file mode 100644
index 0000000..4bbde99
--- /dev/null
+++ b/config.tests/unix/openvg/openvg.pro
@@ -0,0 +1,19 @@
+SOURCES += openvg.cpp
+
+!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
+!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
+!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
+
+# Some OpenVG engines (e.g. ShivaVG) are implemented on top of OpenGL.
+# Add the extra includes and libraries for that case.
+openvg_on_opengl {
+ !isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+ !isEmpty(QMAKE_LIBDIR_OPENGL): LIBS += -L$$QMAKE_LIBDIR_OPENGL
+ !isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
+}
+
+lower_case_includes {
+ DEFINES += QT_LOWER_CASE_VG_INCLUDES
+}
+
+CONFIG -= qt
diff --git a/config.tests/unix/shivavg/shivavg.cpp b/config.tests/unix/shivavg/shivavg.cpp
new file mode 100644
index 0000000..b5d3291
--- /dev/null
+++ b/config.tests/unix/shivavg/shivavg.cpp
@@ -0,0 +1,10 @@
+#include <vg/openvg.h>
+
+int main(int, char **)
+{
+ VGint i;
+ i = 2;
+ vgFlush();
+ vgDestroyContextSH();
+ return 0;
+}
diff --git a/config.tests/unix/shivavg/shivavg.pro b/config.tests/unix/shivavg/shivavg.pro
new file mode 100644
index 0000000..39d7bcc
--- /dev/null
+++ b/config.tests/unix/shivavg/shivavg.pro
@@ -0,0 +1,11 @@
+SOURCES += shivavg.cpp
+
+!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
+!isEmpty(QMAKE_LIBDIR_OPENVG): LIBS += -L$$QMAKE_LIBDIR_OPENVG
+!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $$QMAKE_LIBS_OPENVG
+
+!isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+!isEmpty(QMAKE_LIBDIR_OPENGL): LIBS += -L$$QMAKE_LIBDIR_OPENGL
+!isEmpty(QMAKE_LIBS_OPENGL): LIBS += $$QMAKE_LIBS_OPENGL
+
+CONFIG -= qt