Fix how wayland is compiled so that we can pick up libffi from
authorJørgen Lind <jorgen.lind@nokia.com>
Tue, 22 Mar 2011 11:13:29 +0000 (12:13 +0100)
committerJørgen Lind <jorgen.lind@nokia.com>
Tue, 22 Mar 2011 11:50:02 +0000 (12:50 +0100)
pkg-config

src/3rdparty/wayland/client/client.pro
src/3rdparty/wayland/server/server.pro
src/3rdparty/wayland/shared.pri [new file with mode: 0644]

index ebf24b4..71af897 100644 (file)
@@ -4,11 +4,9 @@ DESTDIR=$$PWD/../../../../lib/
 
 CONFIG -= qt
 CONFIG += shared
+CONFIG += use_pkgconfig
 
-INCLUDEPATH += $$PWD/.. \
-               $$PWD/../../ffi
-
-LIBS += -L $$PWD/../../../../lib/ -lffi
+include(../shared.pri)
 
 SOURCES = ../wayland-client.c \
           ../wayland-protocol.c \
index 2c1788c..da2bf36 100644 (file)
@@ -4,11 +4,9 @@ DESTDIR=$$PWD/../../../../lib/
 
 CONFIG -= qt
 CONFIG += shared
+CONFIG += use_pkgconfig
 
-INCLUDEPATH += $$PWD/.. \
-               $$PWD/../../ffi
-
-LIBS += -L $$PWD/../../../../lib/ -lffi
+include(../shared.pri)
 
 SOURCES = ../event-loop.c \
           ../wayland-server.c \
diff --git a/src/3rdparty/wayland/shared.pri b/src/3rdparty/wayland/shared.pri
new file mode 100644 (file)
index 0000000..44194dc
--- /dev/null
@@ -0,0 +1,9 @@
+INCLUDEPATH += $$PWD
+
+use_pkgconfig {
+   CONFIG += link_pkgconfig
+   PKGCONFIG += libffi
+} else {
+    LIBS += -L $$PWD/../../../../lib/ -lffi 
+    INCLUDEPATH += $$PWD/../ffi
+}