replace all modules' build dirs while installing .pc, .la & .prl files
authorOswald Buddenhagen <oswald.buddenhagen@digia.com>
Wed, 5 Dec 2012 20:52:49 +0000 (21:52 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 6 Dec 2012 11:49:02 +0000 (12:49 +0100)
now we may get files with several mentions of the same lib/include dirs
on the same line, but that's essentially a non-issue.

Task-number: QTBUG-28336
Change-Id: I8204086420b82015f62090ae0a56908ce0cccee8
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
mkspecs/features/qt_module.prf

index 1d34762..ad8d9aa 100644 (file)
@@ -174,9 +174,13 @@ unix|win32-g++* {
    QMAKE_PKGCONFIG_INCDIR = $$[QT_INSTALL_HEADERS/raw]
    QMAKE_PKGCONFIG_CFLAGS = -I${includedir}/$$MODULE_INCNAME
    QMAKE_PKGCONFIG_DESTDIR = pkgconfig
-   include_replace.match = $$[QT_INSTALL_HEADERS/get]
+   !isEmpty(_QMAKE_SUPER_CACHE_): \
+      rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
+   else: \
+      rplbase = $$[QT_INSTALL_PREFIX/get]
+   include_replace.match = $$rplbase/include
    include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
-   lib_replace.match = $$[QT_INSTALL_LIBS/get]
+   lib_replace.match = $$rplbase/lib
    lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
    QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace
 }