From 2a8686abad16df4aa03977eea1423fd021193c08 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sat, 5 Nov 2016 12:28:34 +0100 Subject: [PATCH] compiler.pri: handle Debian c++11 lib path. --- compiler.pri | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/compiler.pri b/compiler.pri index 79b61df288e..50f19784a79 100644 --- a/compiler.pri +++ b/compiler.pri @@ -269,6 +269,20 @@ unix { QMAKE_CXXFLAGS += -std=c++98 QMAKE_LFLAGS += -std=c++98 } + + # Debian seems to put C++11 variants of shared libraries + # in /usr/lib/$triple/c++11. + # + # At least, that is the case for ZeroC Ice. + # + # The expectation is that this is a general convention, + # so add it to our library search path in C++11 mode. + CONFIG(c++11)|CONFIG(c++14)|CONFIG(c++1z) { + MULTIARCH_TRIPLE = $$system($${QMAKE_CXX} -print-multiarch) + !isEmpty(MULTIARCH_TRIPLE) { + QMAKE_LIBDIR *= /usr/lib/$${MULTIARCH_TRIPLE}/c++11 + } + } } contains(UNAME, FreeBSD) {