forked from qt-creator/qt-creator
deployqt: Support elfutils from Linux distribution
Which can be in a more complicated directory than just /usr/lib, like /usr/lib/aarch64-linux-gnu . So, recursively look for the elf library to determine the right directory. Change-Id: I58ed8a045fbde50dea8851f63409a5a0863c3b16 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -273,13 +273,20 @@ def deploy_elfutils(qtc_install_dir, chrpath_bin, args):
|
|||||||
if common.is_mac_platform():
|
if common.is_mac_platform():
|
||||||
return
|
return
|
||||||
|
|
||||||
|
libs = ['elf', 'dw']
|
||||||
|
version = '1'
|
||||||
|
|
||||||
def lib_name(name, version):
|
def lib_name(name, version):
|
||||||
return ('lib' + name + '.so.' + version if common.is_linux_platform()
|
return ('lib' + name + '.so.' + version if common.is_linux_platform()
|
||||||
else name + '.dll')
|
else name + '.dll')
|
||||||
|
|
||||||
version = '1'
|
def find_elfutils_lib_path(path):
|
||||||
libs = ['elf', 'dw']
|
for root, _, files in os.walk(path):
|
||||||
elfutils_lib_path = os.path.join(args.elfutils_path, 'lib')
|
if lib_name('elf', version) in files:
|
||||||
|
return root
|
||||||
|
return path
|
||||||
|
|
||||||
|
elfutils_lib_path = find_elfutils_lib_path(os.path.join(args.elfutils_path, 'lib'))
|
||||||
if common.is_linux_platform():
|
if common.is_linux_platform():
|
||||||
install_path = os.path.join(qtc_install_dir, 'lib', 'elfutils')
|
install_path = os.path.join(qtc_install_dir, 'lib', 'elfutils')
|
||||||
backends_install_path = install_path
|
backends_install_path = install_path
|
||||||
|
Reference in New Issue
Block a user