aboutsummarylogtreecommitdiffstats
path: root/0001-Check-lib64-as-well-as-lib.patch
blob: 41b2c2306a476fc005d98b7f554392e1008a0320 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
From 2586eaac76349843ed573e8e7c24761d343a8b42 Mon Sep 17 00:00:00 2001
From: Donald Carr <sirspudd@gmail.com>
Date: Sun, 11 Sep 2016 18:10:14 -0700
Subject: [PATCH] Check lib64 as well as lib

Change-Id: I3a875a215e8524e5b1f2d5222ef3134bc1aa719f
---
 configure.pri | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/configure.pri b/configure.pri
index 6a75398..2240dea 100644
--- a/configure.pri
+++ b/configure.pri
@@ -148,17 +148,24 @@ defineTest(qtConfTest_detectPkgConfig) {
                 qtConfAddWarning("Cross compiling without sysroot. Disabling pkg-config")
                 return(false)
             }
-            !exists("$$sysroot/usr/lib/pkgconfig") {
+            exists("$$sysroot/usr/lib/pkgconfig") {
+                    pkgConfigLibdir = "$$pkgConfigLibdir:$$sysroot/usr/lib/pkgconfig"
+            }
+            exists("$$sysroot/usr/lib64/pkgconfig") {
+                    pkgConfigLibdir = "$$pkgConfigLibdir:$$sysroot/usr/lib64/pkgconfig"
+            }
+
+            isEmpty(pkgConfigLibdir) {
                 qtConfAddWarning( \
-                    "Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and" \
-                    "the host's .pc files would be used (even if you set PKG_CONFIG_PATH)." \
+                    "Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and cant be inferred." \
+                    "The host's .pc files would be used (even if you set PKG_CONFIG_PATH)." \
                     "Set this variable to the directory that contains target .pc files" \
                     "for pkg-config to function correctly when cross-compiling or" \
                     "use -pkg-config to override this test.")
                 return(false)
             }
 
-            pkgConfigLibdir = $$sysroot/usr/lib/pkgconfig:$$sysroot/usr/share/pkgconfig
+            pkgConfigLibdir = "$$pkgConfigLibdir:$$sysroot/usr/share/pkgconfig"
             gcc {
                 qtRunLoggedCommand("$$QMAKE_CXX -dumpmachine", gccMachineDump): \
                         !isEmpty(gccMachineDump): \
-- 
2.9.3