define the module rpath in the installed module pri file

the fallback path wouldn't account for a sysroot. as there is no clean
way to implement that, rather remove the fallback alltogether and make
the rpath a mandatory part of modules.

Change-Id: I6f2bd6e36889be2f61e17a579174380aa3c6622d
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
Oswald Buddenhagen 2012-11-07 14:43:09 +01:00 committed by The Qt Project
parent f3597af5ad
commit c3637ce66b
3 changed files with 2 additions and 8 deletions

View File

@ -109,11 +109,7 @@ defineTest(qtAddModule) {
isEmpty(lib): lib = -l$${MODULE_NAME}$${QT_LIBINFIX}
LINKAGE += $$lib
contains(QT_CONFIG, rpath) {
rpath = $$eval(QT.$${1}.rpath)
isEmpty(rpath): rpath = $$MODULE_LIBS
QMAKE_RPATHDIR *= $$rpath
}
contains(QT_CONFIG, rpath): QMAKE_RPATHDIR *= $$eval(QT.$${1}.rpath)
# Make sure we can link to uninstalled libraries
unix:!mac:!isEmpty(QT.$${1}.libs) { # Use unmodified path, so /usr/lib also works

View File

@ -79,6 +79,7 @@ MODULE_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules-inst/qt_lib_$${MODULE}.pri
"QT.$${MODULE}.private_includes = $$MODULE_PRIVATE_INCLUDES" \
"QT.$${MODULE}.sources = $$val_escape(_PRO_FILE_PWD_)" \
"QT.$${MODULE}.libs = \$\$QT_MODULE_LIB_BASE" \
"QT.$${MODULE}.rpath = $$[QT_INSTALL_LIBS/raw]" \
"QT.$${MODULE}.plugins = \$\$QT_MODULE_PLUGIN_BASE" \
"QT.$${MODULE}.imports = \$\$QT_MODULE_IMPORT_BASE$$MODULE_IMPORT_SUFFIX" \
"QT.$${MODULE}.depends =$$join(MODULE_DEPENDS, " ", " ")" \

View File

@ -2,8 +2,6 @@
load(qt_build_paths)
isEmpty(MODULE_INSTALL_LIBS): MODULE_INSTALL_LIBS = $$[QT_INSTALL_LIBS/raw]
MODULE_FWD_PRI = $$MODULE_QMAKE_OUTDIR/mkspecs/modules/qt_lib_$${MODULE}.pri
# -rpath-link is used by the linker to find depedencies of dynamic
@ -58,7 +56,6 @@
"QT_MODULE_PLUGIN_BASE = $$MODULE_BASE_OUTDIR/plugins" \
$$module_rpathlink \
$$module_rpathlink_priv \
"QT.$${MODULE}.rpath = $$MODULE_INSTALL_LIBS" \
"include($$MODULE_PRI)"
write_file($$MODULE_FWD_PRI, MODULE_FWD_PRI_CONT)|error("Aborting.")
touch($$MODULE_FWD_PRI, $$MODULE_PRI)