summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor.pri
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor/compositor.pri')
-rw-r--r--src/compositor/compositor.pri33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/compositor/compositor.pri b/src/compositor/compositor.pri
index 7962b05ba..77467c2dd 100644
--- a/src/compositor/compositor.pri
+++ b/src/compositor/compositor.pri
@@ -7,24 +7,27 @@ INCLUDEPATH += $$PWD
DEFINES += QT_WAYLAND_WINDOWMANAGER_SUPPORT
DEFINES += QT_BUILD_COMPOSITOR_LIB
-!mac:use_pkgconfig {
- CONFIG += link_pkgconfig
- PKGCONFIG += wayland-server
+!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_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=""
+}
- #set the rpath
- !isEmpty(QMAKE_LFLAGS_RPATH) {
- WAYLAND_NEEDS_RPATH = $$system(pkg-config --libs-only-L wayland-server)
- !isEmpty(WAYLAND_NEEDS_RPATH) {
- WAYLAND_LIBDIR = $$system(pkg-config --variable=libdir wayland-server)
- !isEmpty(WAYLAND_LIBDIR):QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${WAYLAND_LIBDIR}
- }
- }
-} else {
- INCLUDEPATH += $$QMAKE_INCDIR_WAYLAND
+QMAKE_CXXFLAGS += $$QMAKE_CFLAGS_WAYLAND
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_WAYLAND
+DEFINES += $$QMAKE_DEFINES_WAYLAND
+LIBS += $$QMAKE_LIBS_WAYLAND_SERVER
+!isEmpty(QMAKE_LIBDIR_WAYLAND) {
+ LIBS += -L$$QMAKE_LIBDIR_WAYLAND
+}
+
+!isEmpty(QMAKE_LFLAGS_RPATH) {
!isEmpty(QMAKE_LIBDIR_WAYLAND) {
- LIBS += -L$$QMAKE_LIBDIR_WAYLAND
+ QMAKE_LFLAGS += $${QMAKE_LFLAGS_RPATH}$${QMAKE_LIBS_WAYLAND}
}
- LIBS += -lwayland-server -lffi
}
HEADERS += qtcompositorversion.h