68 lines
2.7 KiB
Diff
68 lines
2.7 KiB
Diff
From 0bd37923dec93270066fc4362db7e443475a4b06 Mon Sep 17 00:00:00 2001
|
|
From: Martin Jansa <Martin.Jansa@gmail.com>
|
|
Date: Sat, 27 Apr 2013 23:15:37 +0200
|
|
Subject: [PATCH 09/11] qt_module: Fix pkgconfig replacement
|
|
|
|
* in situation like this:
|
|
QT_SYSROOT:/OE/oe-core/tmp-eglibc/sysroots/qemuarm
|
|
QT_INSTALL_LIBS:/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib
|
|
QT_INSTALL_LIBS/raw:/usr/lib
|
|
QT_INSTALL_LIBS/get:/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib
|
|
|
|
I don't want the replacement like this:
|
|
sed
|
|
-e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/include,/usr/include/qt5,g"
|
|
-e "s,/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/build/lib,/usr/lib,g"
|
|
"../../lib/pkgconfig/Qt5Core.pc"
|
|
>"/OE/oe-core/tmp-eglibc/work/armv5te-oe-linux-gnueabi/qtbase/5.0.0-r0.0/image/OE/oe-core/tmp-eglibc/sysroots/qemuarm/usr/lib/pkgconfig/Qt5Core.pc"
|
|
because that way I'll end with -L/usr/lib in .pc file which is
|
|
cross-compile unfriendly, keeping ${libdir}/${includedir} works better
|
|
in my case
|
|
|
|
Change-Id: Id0f9143c012b7fe7bb7bab0055687f4e0517f653
|
|
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
---
|
|
mkspecs/features/qt_module.prf | 16 ++++++++++++++--
|
|
1 file changed, 14 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/mkspecs/features/qt_module.prf b/mkspecs/features/qt_module.prf
|
|
index 1132943..7fbfd8d 100644
|
|
--- a/mkspecs/features/qt_module.prf
|
|
+++ b/mkspecs/features/qt_module.prf
|
|
@@ -128,18 +128,30 @@ unix|win32-g++* {
|
|
rplbase = $$dirname(_QMAKE_SUPER_CACHE_)/[^/][^/]*
|
|
else: \
|
|
rplbase = $$MODULE_BASE_OUTDIR
|
|
+ pkgconfig_include_replace.match = $$rplbase/include
|
|
+ pkgconfig_include_replace.replace = "\$$\\{includedir}"
|
|
+ pkgconfig_lib_replace.match = $$rplbase/lib
|
|
+ pkgconfig_lib_replace.replace = "\$$\\{libdir}"
|
|
include_replace.match = $$rplbase/include
|
|
include_replace.replace = $$[QT_INSTALL_HEADERS/raw]
|
|
lib_replace.match = $$rplbase/lib
|
|
lib_replace.replace = $$[QT_INSTALL_LIBS/raw]
|
|
- QMAKE_PKGCONFIG_INSTALL_REPLACE += include_replace lib_replace
|
|
+ lafile_replace.match = $$rplbase
|
|
+ lafile_replace.replace = "=$$[QT_INSTALL_PREFIX/raw]"
|
|
+
|
|
+ !isEmpty(SYSROOT): \
|
|
+ rplbase = $$[SYSROOT] \
|
|
+ lafile_replace.match = $$rplbase \
|
|
+ lafile_replace.replace = "=" \
|
|
+
|
|
+ QMAKE_PKGCONFIG_INSTALL_REPLACE += pkgconfig_include_replace pkgconfig_lib_replace
|
|
QMAKE_PRL_INSTALL_REPLACE += include_replace lib_replace
|
|
}
|
|
|
|
unix {
|
|
CONFIG += create_libtool explicitlib
|
|
QMAKE_LIBTOOL_LIBDIR = $$[QT_INSTALL_LIBS/raw]
|
|
- QMAKE_LIBTOOL_INSTALL_REPLACE += include_replace lib_replace
|
|
+ QMAKE_LIBTOOL_INSTALL_REPLACE += lafile_replace
|
|
}
|
|
|
|
unix|win32-g++* {
|
|
--
|
|
1.8.2.1
|
|
|