summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-06-24 02:55:06 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-06-24 02:55:06 (GMT)
commit871364bf2475cf3b2a9c5535b59dab41db184ef4 (patch)
tree724bacc13f16cfa236d6069cd8ae7089954e290c
parent0570b26f90f031b09970f8fca1a67339b66ee33f (diff)
downloadQt-871364bf2475cf3b2a9c5535b59dab41db184ef4.zip
Qt-871364bf2475cf3b2a9c5535b59dab41db184ef4.tar.gz
Qt-871364bf2475cf3b2a9c5535b59dab41db184ef4.tar.bz2
Better detection for OpenVG engines that run on top of OpenGL
ShivaVG runs on top of OpenGL. Include the QMAKE_*_OPENGL flags on the link line if it is needed by the OpenVG engine. Reviewed-by: trustme
-rw-r--r--config.tests/unix/openvg/openvg.pro8
-rw-r--r--config.tests/unix/shivavg/shivavg.pro4
-rwxr-xr-xconfigure15
-rw-r--r--mkspecs/common/linux.conf3
-rw-r--r--mkspecs/features/unix/openvg.prf6
-rw-r--r--mkspecs/features/win32/openvg.prf4
-rw-r--r--src/openvg/openvg.pro6
7 files changed, 46 insertions, 0 deletions
diff --git a/config.tests/unix/openvg/openvg.pro b/config.tests/unix/openvg/openvg.pro
index 8dd227b..4bbde99 100644
--- a/config.tests/unix/openvg/openvg.pro
+++ b/config.tests/unix/openvg/openvg.pro
@@ -4,6 +4,14 @@ SOURCES += openvg.cpp
!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
}
diff --git a/config.tests/unix/shivavg/shivavg.pro b/config.tests/unix/shivavg/shivavg.pro
index 0c1bd07..39d7bcc 100644
--- a/config.tests/unix/shivavg/shivavg.pro
+++ b/config.tests/unix/shivavg/shivavg.pro
@@ -4,4 +4,8 @@ SOURCES += shivavg.cpp
!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
diff --git a/configure b/configure
index 473deef..d82c51a 100755
--- a/configure
+++ b/configure
@@ -591,6 +591,7 @@ CFG_OPENGL=auto
CFG_OPENVG=no
CFG_OPENVG_LC_INCLUDES=no
CFG_OPENVG_SHIVA=no
+CFG_OPENVG_ON_OPENGL=no
CFG_EGL=no
CFG_EGL_GLES_INCLUDES=no
CFG_SSE=auto
@@ -5550,11 +5551,22 @@ if [ "$CFG_OPENVG" != "no" ]; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
+ if [ "$CFG_OPENVG" = "auto" ]; then
+ CFG_OPENVG=yes
+ fi
+ CFG_OPENVG_ON_OPENGL=yes
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
CFG_OPENVG_LC_INCLUDES=yes
+ elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG openvg_on_opengl lower_case_includes" $OPT_VERBOSE "$relpath" "$outpath" "config.tests/unix/openvg" "OpenVG (lc includes)" $L_FLAGS $I_FLAGS $l_FLAGS $CONFIG_ARG; then
+ if [ "$CFG_OPENVG" = "auto" ]; then
+ CFG_OPENVG=yes
+ fi
+ CFG_OPENVG_LC_INCLUDES=yes
+ CFG_OPENVG_ON_OPENGL=yes
else
if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
@@ -5714,6 +5726,9 @@ else
if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
fi
+ if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
+ QT_CONFIG="$QT_CONFIG openvg_on_opengl"
+ fi
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shivavg"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
diff --git a/mkspecs/common/linux.conf b/mkspecs/common/linux.conf
index fa84841..cc5c38b 100644
--- a/mkspecs/common/linux.conf
+++ b/mkspecs/common/linux.conf
@@ -15,6 +15,8 @@ QMAKE_INCDIR_OPENGL = /usr/X11R6/include
QMAKE_LIBDIR_OPENGL = /usr/X11R6/lib
QMAKE_INCDIR_EGL =
QMAKE_LIBDIR_EGL =
+QMAKE_INCDIR_OPENVG =
+QMAKE_LIBDIR_OPENVG =
QMAKE_LIBS =
QMAKE_LIBS_DYNLOAD = -ldl
@@ -24,6 +26,7 @@ QMAKE_LIBS_NIS = -lnsl
QMAKE_LIBS_EGL = -lEGL
QMAKE_LIBS_OPENGL = -lGLU -lGL
QMAKE_LIBS_OPENGL_QT = -lGL
+QMAKE_LIBS_OPENVG = -lOpenVG
QMAKE_LIBS_THREAD = -lpthread
QMAKE_MOC = $$[QT_INSTALL_BINS]/moc
diff --git a/mkspecs/features/unix/openvg.prf b/mkspecs/features/unix/openvg.prf
index 7bd7fbe..a21d1ca 100644
--- a/mkspecs/features/unix/openvg.prf
+++ b/mkspecs/features/unix/openvg.prf
@@ -1,3 +1,9 @@
!isEmpty(QMAKE_INCDIR_OPENVG): INCLUDEPATH += $$QMAKE_INCDIR_OPENVG
!isEmpty(QMAKE_LIBDIR_OPENVG): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENVG
!isEmpty(QMAKE_LIBS_OPENVG): LIBS += $QMAKE_LIBS_OPENVG
+
+contains(QT_CONFIG, openvg_on_opengl) {
+ !isEmpty(QMAKE_INCDIR_OPENGL): INCLUDEPATH += $$QMAKE_INCDIR_OPENGL
+ !isEmpty(QMAKE_LIBDIR_OPENGL): QMAKE_LIBDIR += -L$$QMAKE_LIBDIR_OPENGL
+ !isEmpty(QMAKE_LIBS_OPENGL): LIBS += $QMAKE_LIBS_OPENGL
+}
diff --git a/mkspecs/features/win32/openvg.prf b/mkspecs/features/win32/openvg.prf
index d4aa296..0df5b66 100644
--- a/mkspecs/features/win32/openvg.prf
+++ b/mkspecs/features/win32/openvg.prf
@@ -1,3 +1,7 @@
QMAKE_LIBS += $$QMAKE_LIBS_OPENVG
QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENVG
+contains(QT_CONFIG, openvg_on_opengl) {
+ QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
+}
diff --git a/src/openvg/openvg.pro b/src/openvg/openvg.pro
index 4d499ef..240bf13 100644
--- a/src/openvg/openvg.pro
+++ b/src/openvg/openvg.pro
@@ -45,4 +45,10 @@ contains(QT_CONFIG, egl) {
!isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
}
+contains(QT_CONFIG, 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
+}
+
INCLUDEPATH += ../3rdparty/harfbuzz/src