summaryrefslogtreecommitdiffstats
path: root/tests/auto/compositor/compositor.pro
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/compositor/compositor.pro')
-rw-r--r--tests/auto/compositor/compositor.pro26
1 files changed, 22 insertions, 4 deletions
diff --git a/tests/auto/compositor/compositor.pro b/tests/auto/compositor/compositor.pro
index 26a3cb8a1..68524f6cf 100644
--- a/tests/auto/compositor/compositor.pro
+++ b/tests/auto/compositor/compositor.pro
@@ -4,11 +4,29 @@ TARGET = tst_compositor
QT += testlib
QT += core-private gui-private compositor
-INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
+!contains(QT_CONFIG, no-pkg-config) {
+ #If Qt uses pkg-config then override pkgconfig from mkspec
+ QMAKE_CFLAGS_WAYLAND=$$system(pkg-config --cflags wayland-server 2>/dev/null)
+ QMAKE_LIBS_WAYLAND_SERVER=$$system(pkg-config --libs-only-l wayland-server 2>/dev/null)
+ QMAKE_LIBS_WAYLAND_CLIENT=$$system(pkg-config --libs-only-l wayland-client 2>/dev/null)
+ QMAKE_INCDIR_WAYLAND=$$system("pkg-config --cflags-only-I wayland-server 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'")
+ QMAKE_LIBDIR_WAYLAND=$$system("pkg-config --libs-only-L wayland-server 2>/dev/null | sed -e 's,^-L,,g' -e 's, -L, ,g'")
+ QMAKE_DEFINES_WAYLAND=""
+}
+
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_WAYLAND
+DEFINES += $$QMAKE_DEFINES_WAYLAND
+LIBS += $$QMAKE_LIBS_WAYLAND_SERVER
+LIBS += $$QMAKE_LIBS_WAYLAND_CLIENT
+!isEmpty(QMAKE_LIBDIR_WAYLAND) {
+ LIBS += -L$$QMAKE_LIBDIR_WAYLAND
+}
-LIBS += $$QMAKE_LIBS_WAYLAND
-mac {
- LIBS += -lwayland-client
+!isEmpty(QMAKE_LFLAGS_RPATH) {
+ !isEmpty(QMAKE_LIBDIR_WAYLAND) {
+ QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${QMAKE_LIBS_WAYLAND}
+ }
}
QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND