forked from qt-creator/qt-creator
Linux deployment: Only add RPATH to Qt if necessary
Don't try to add an RPATH to Qt if the library/executable does not link to Qt. Chances are, that the reserved space for the RPATH is too short in that case. Change-Id: Ie8d50ede43d19236611fe56667995e58606062db Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -125,6 +125,9 @@ def fix_rpaths(path, qt_deploy_path, qt_install_info, chrpath=None):
|
|||||||
new_rpath = filter(lambda path: not path.startswith(qt_install_prefix) and not path.startswith(qt_install_libs),
|
new_rpath = filter(lambda path: not path.startswith(qt_install_prefix) and not path.startswith(qt_install_libs),
|
||||||
rpath)
|
rpath)
|
||||||
|
|
||||||
|
# check for Qt linking
|
||||||
|
lddOutput = subprocess.check_output(['ldd', filepath])
|
||||||
|
if lddOutput.find('libQt5') >= 0 or lddOutput.find('libicu') >= 0:
|
||||||
# add Qt RPATH if necessary
|
# add Qt RPATH if necessary
|
||||||
relative_path = os.path.relpath(qt_deploy_path, os.path.dirname(filepath))
|
relative_path = os.path.relpath(qt_deploy_path, os.path.dirname(filepath))
|
||||||
if relative_path == '.':
|
if relative_path == '.':
|
||||||
|
Reference in New Issue
Block a user