From d586371fc2c6436bc20a3397bbadef2af75d6ab1 Mon Sep 17 00:00:00 2001
From: Ray Donnelly <mingw.android@gmail.com>
Date: Mon, 13 Jun 2016 13:57:50 +0100
Subject: [PATCH 6/9] zlib_dependency: Add $$EXTRA_INCLUDEPATH for system-zlib

This is necessary for Anaconda since that's where the
'system' dependencies are placed.

Change-Id: I6103a92912f669684ebe2ffa5cda64a6ce6f0279
---
 src/3rdparty/zlib_dependency.pri | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git qtbase/src/3rdparty/zlib_dependency.pri qtbase/src/3rdparty/zlib_dependency.pri
index 53e0b3e..e707000 100644
--- qtbase/src/3rdparty/zlib_dependency.pri
+++ qtbase/src/3rdparty/zlib_dependency.pri
@@ -1,7 +1,10 @@
 # zlib dependency satisfied by bundled 3rd party zlib or system zlib
 contains(QT_CONFIG, system-zlib) {
-    if(unix|mingw):LIBS_PRIVATE += -lz
-    else {
+    if(unix|mingw) {
+        # The 'system-zlib' could be installed into the build prefix
+        LIBS_PRIVATE += $$EXTRA_LIBS -lz
+        INCLUDEPATH += $$EXTRA_INCLUDEPATH
+    } else {
         isEmpty(ZLIB_LIBS): LIBS += zdll.lib
         else: LIBS += $$ZLIB_LIBS
     }
-- 
2.10.2

