inline qtAddRpathLink()
there is no particular reason to have it in qt_functions.prf. Change-Id: I88ed1ea937a9a88a4625a6de7bcd3a29957560da Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
parent
967372c975
commit
93f69366eb
@ -53,7 +53,6 @@ qtAddModules(QT_PRIVATE, LIBS_PRIVATE)
|
||||
message("Running this project against other versions of the Qt modules may crash at any arbitrary point.")
|
||||
message("This is not a bug, but a result of using Qt internals. You have been warned!")
|
||||
}
|
||||
qtAddRpathLink($$QT $$QT_PRIVATE)
|
||||
|
||||
qt_module_deps = $$QT $$QT_PRIVATE
|
||||
qt_module_deps = $$replace(qt_module_deps, -private$, _private)
|
||||
@ -82,6 +81,19 @@ qt_module_deps = $$resolve_depends(qt_module_deps, "QT.")
|
||||
}
|
||||
}
|
||||
|
||||
!isEmpty(QMAKE_LFLAGS_RPATHLINK):!contains(QT_CONFIG, static) {
|
||||
# -rpath-link is used by the linker to find dependencies of dynamic
|
||||
# libraries which were NOT specified on the command line.
|
||||
# This means that paths of direct dependencies (QT & QT_PRIVATE)
|
||||
# don't need to be listed, unlike their private dependencies' paths.
|
||||
privdep = $$resolve_depends(qt_module_deps, "QT.", ".depends" ".run_depends")
|
||||
privdep -= $$qt_module_deps
|
||||
rpaths =
|
||||
for(dep, privdep): \
|
||||
rpaths += $$eval(QT.$${dep}.libs)
|
||||
QMAKE_RPATHLINKDIR *= $$unique(rpaths)
|
||||
}
|
||||
|
||||
# static builds: link qml import plugins into the app.
|
||||
contains(qt_module_deps, qml): \
|
||||
contains(QT_CONFIG, static):contains(TEMPLATE, .*app):!host_build:!no_import_scan {
|
||||
|
@ -172,23 +172,6 @@ defineTest(qtAddModules) {
|
||||
!isEmpty(BAD_QT):error("Unknown module(s) in $$1: $$replace(BAD_QT, _private$, -private)")
|
||||
}
|
||||
|
||||
defineTest(qtAddRpathLink) {
|
||||
# -rpath-link is used by the linker to find dependencies of dynamic
|
||||
# libraries which were NOT specified on the command line.
|
||||
# This means that paths of direct dependencies (QT & QT_PRIVATE)
|
||||
# don't need to appear here. However, their private dependencies'
|
||||
# paths OTOH need to be put there.
|
||||
pubqt = $$replace(1, -private$, _private)
|
||||
pubdep = $$resolve_depends(pubqt, "QT.")
|
||||
privdep = $$resolve_depends(pubqt, "QT.", ".depends" ".run_depends")
|
||||
privdep -= $$pubdep
|
||||
rpaths =
|
||||
for(dep, privdep): \
|
||||
rpaths += $$eval(QT.$${dep}.libs)
|
||||
QMAKE_RPATHLINKDIR *= $$unique(rpaths)
|
||||
export(QMAKE_RPATHLINKDIR)
|
||||
}
|
||||
|
||||
# variable, default, [suffix for variable for system() use], [prepare primary variable for system() use]
|
||||
defineTest(qtPrepareTool) {
|
||||
cmd = $$eval(QT_TOOL.$${2}.binary)
|
||||
|
Loading…
Reference in New Issue
Block a user