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) {