Replace absolute Qt lib dir in .prl files

In the case of building a Qt module repository against an installed
qtbase the .prl files contain absolute paths to Qt dependencies e.g.
'/install-prefix/lib/libQt5Core.so'.

Those must be replaced with $$[QT_INSTALL_PREFIX]. The .prl
replacement code however only takes $$MODULE_BASE_OUTDIR/lib into
account.

Fixes: QTBUG-75804
Change-Id: I5ea5623ca7396b672fded3f1b9434b9ad5ed12ec
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Joerg Bornemann 2019-05-20 11:13:06 +02:00
parent 8bcc6f111b
commit f00de3322e

View File

@ -49,6 +49,8 @@ contains(TEMPLATE, .*lib) {
lib_replace.match = $$rplbase/lib
lib_replace.replace = $$qqt_libdir
}
!equals(qt_libdir, $$rplbase/lib): \
lib_replace.match = \\($$lib_replace.match\\)\\|\\($$qt_libdir\\)
lib_replace.CONFIG = path
QMAKE_PRL_INSTALL_REPLACE += lib_replace
}