Skip to content

Commit

Permalink
cplusplus.pri: handle Debian C++11 library path.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mkrautz committed Nov 11, 2016
1 parent b29f98a commit 324b2a0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cplusplus.pri
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

0 comments on commit 324b2a0

Please sign in to comment.