Add a custom rule for hardware_integration
authorJørgen Lind <jorgen.lind@nokia.com>
Mon, 11 Apr 2011 12:50:47 +0000 (14:50 +0200)
committerJørgen Lind <jorgen.lind@nokia.com>
Mon, 11 Apr 2011 12:50:47 +0000 (14:50 +0200)
This enables the compositor pro file to include another pri file which
implements the hardware integration

src/qt-compositor/hardware_integration/hardware_integration.pri

index 8c82d08..a988c20 100644 (file)
@@ -1,28 +1,32 @@
 contains(QT_CONFIG, opengl) {
-HEADERS += \
-    $$PWD/graphicshardwareintegration.h
+    HEADERS += \
+        $$PWD/graphicshardwareintegration.h
 
-SOURCES += \
-    $$PWD/graphicshardwareintegration.cpp
+    SOURCES += \
+        $$PWD/graphicshardwareintegration.cpp
 
     DEFINES += QT_COMPOSITOR_WAYLAND_GL
     QT += opengl
 
     QT_WAYLAND_GL_CONFIG = $$(QT_WAYLAND_GL_CONFIG)
-    contains(QT_CONFIG, opengles2) {
-        isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) {
-            QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
-            CONFIG += mesa_egl
-        } else:isEqual(QT_WAYLAND_GL_CONFIG,dri2_xcb) {
-            QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
-            CONFIG += dri2_xcb
+    isEqual(QT_WAYLAND_GL_CONFIG, custom) {
+        QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
+    } else {
+        contains(QT_CONFIG, opengles2) {
+            isEqual(QT_WAYLAND_GL_CONFIG, wayland_egl) {
+                QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
+                CONFIG += mesa_egl
+            } else:isEqual(QT_WAYLAND_GL_CONFIG,dri2_xcb) {
+                QT_WAYLAND_GL_INTEGRATION = $$QT_WAYLAND_GL_CONFIG
+                CONFIG += dri2_xcb
+            } else {
+                QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
+                CONFIG += xcomposite_egl
+            }
         } else {
-            QT_WAYLAND_GL_INTEGRATION = xcomposite_egl
-            CONFIG += xcomposite_egl
+            QT_WAYLAND_GL_INTEGRATION = xcomposite_glx
+            CONFIG += xcomposite_glx
         }
-    } else {
-        QT_WAYLAND_GL_INTEGRATION = xcomposite_glx
-        CONFIG += xcomposite_glx
     }
     system(echo "Qt-Compositor configured with openGL: $$QT_WAYLAND_GL_INTEGRATION")
 } else {