From 505c37307980e20baf02961d1be5abf858d5510a Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Date: Thu, 15 Oct 2015 16:52:33 +0200
Subject: [PATCH] Fix build without pkg-config

Change-Id: I9217c633bcbecd330715b6dbc654245b3fb739a8
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
---
 examples/wayland/server-buffer/client/client.pro         | 9 +++++++--
 examples/wayland/server-buffer/compositor/compositor.pro | 3 ---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/examples/wayland/server-buffer/client/client.pro b/examples/wayland/server-buffer/client/client.pro
index ce4a04f91..9d408d9e9 100644
--- a/examples/wayland/server-buffer/client/client.pro
+++ b/examples/wayland/server-buffer/client/client.pro
@@ -3,8 +3,13 @@ TARGET = client
 INCLUDEPATH += .
 
 QT += waylandclient-private
-CONFIG += link_pkgconfig
-PKGCONFIG += wayland-client
+
+!contains(QT_CONFIG, no-pkg-config) {
+    PKGCONFIG += wayland-client
+    CONFIG += link_pkgconfig
+} else {
+    LIBS += -lwayland-client
+}
 
 CONFIG += wayland-scanner
 WAYLANDCLIENTSOURCES += ../share-buffer.xml
diff --git a/examples/wayland/server-buffer/compositor/compositor.pro b/examples/wayland/server-buffer/compositor/compositor.pro
index 9f7751a09..8d7f48820 100644
--- a/examples/wayland/server-buffer/compositor/compositor.pro
+++ b/examples/wayland/server-buffer/compositor/compositor.pro
@@ -17,7 +17,4 @@ RESOURCES += compositor.qrc
 CONFIG +=wayland-scanner
 WAYLANDSERVERSOURCES += ../share-buffer.xml
 
-CONFIG += link_pkgconfig
-PKGCONFIG += wayland-server
-
 DEFINES += QT_COMPOSITOR_QUICK
-- 
GitLab