If we use pkg-config we prob don't want to use the internal
authorJørgen Lind <jorgen.lind@nokia.com>
Thu, 17 Mar 2011 08:39:29 +0000 (09:39 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Thu, 17 Mar 2011 08:39:29 +0000 (09:39 +0100)
copy of wayland but a version we pick up with pkg-config

examples/qwidget-compositor/qt-compositor.pro
src/qt-compositor/qt-compositor.pri

index ef427a9..6486d73 100644 (file)
@@ -13,8 +13,6 @@ CONFIG += use_pkgconfig
 
 DESTDIR=$$PWD/../../bin/
 
-LIBS += -L ../../lib
-
 include (../../src/qt-compositor/qt-compositor.pri)
 
 # Input
index 2f9914e..58e1840 100644 (file)
@@ -1,6 +1,16 @@
-LIBS += -lwayland-server -lffi
 INCLUDEPATH += $$PWD
 
+use_pkgconfig {
+    QMAKE_CXXFLAGS += $$system(pkg-config --cflags wayland-server)
+    #for some reason this is not included in the cflags line
+    INCLUDEPATH += $$system(pkg-config --variable=includedir wayland-server)
+    LIBS += $$system(pkg-config --libs wayland-server)
+} else {
+    INCLUDEPATH += $$PWD/../3rdparty/wayland
+    LIBS += -lwayland-server -lffi
+    LIBS += -L ../../lib
+}
+
 wayland_gl {
     system(echo "Qt-Compositor configured with openGL")
     QT += opengl
@@ -44,5 +54,3 @@ HEADERS += $$PWD/qtcompositor.h \
         $$PWD/private/wlshmbuffer.h \
         $$PWD/private/wldisplay.h \
         $$PWD/private/wlobject.h
-
-INCLUDEPATH += $$PWD/../3rdparty/wayland