From 324b2a04cedebc63cea1d890a88b0a127beaf157 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Fri, 11 Nov 2016 22:34:33 +0100 Subject: [PATCH] cplusplus.pri: handle Debian C++11 library path. In the past, Debian stretch put C+11 ZeroC Ice libraries in a special C++11-specific library search path. Since it doesn't hurt to look there, keep this around, even though it's probably not needed anymore. --- cplusplus.pri | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/cplusplus.pri b/cplusplus.pri index 2eec6db9894..2585a5bf2f6 100644 --- a/cplusplus.pri +++ b/cplusplus.pri @@ -101,4 +101,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's 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, C++14 + # and C++1z mode. + CONFIG(c++11)|CONFIG(c++14)|CONFIG(c++1z) { + MULTIARCH_TRIPLE = $$system($${QMAKE_CC} -print-multiarch) + !isEmpty(MULTIARCH_TRIPLE) { + QMAKE_LIBDIR *= /usr/lib/$${MULTIARCH_TRIPLE}/c++11 + } + } }