Skip to content
Snippets Groups Projects
Commit 43e93009 authored by Eike Ziller's avatar Eike Ziller
Browse files

Linux: Fix deployment of libclang


We need the versioned name of the library now,
so copy all libclang.so* while keeping symlinks as symlinks.

Change-Id: Ia2cc5e82be0848a3c9b0cb3055e150e6b1a151c9
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 1c119185
No related branches found
No related tags found
No related merge requests found
......@@ -216,20 +216,31 @@ def copy_translations(install_dir, qt_tr_dir):
print translation, '->', tr_dir
shutil.copy(translation, tr_dir)
def copyPreservingLinks(source, destination):
if os.path.islink(source):
linkto = os.readlink(source)
destFilePath = destination
if os.path.isdir(destination):
destFilePath = os.path.join(destination, os.path.basename(source))
os.symlink(linkto, destFilePath)
else:
shutil.copy(source, destination)
def copy_libclang(install_dir, llvm_install_dir):
libsource = ""
libsources = []
libtarget = ""
if sys.platform.startswith("win"):
libsource = os.path.join(llvm_install_dir, 'bin', 'libclang.dll')
libsources = [os.path.join(llvm_install_dir, 'bin', 'libclang.dll')]
libtarget = os.path.join(install_dir, 'bin')
else:
libsource = os.path.join(llvm_install_dir, 'lib', 'libclang.so')
libsources = glob(os.path.join(llvm_install_dir, 'lib', 'libclang.so*'))
libtarget = os.path.join(install_dir, 'lib', 'qtcreator')
resourcesource = os.path.join(llvm_install_dir, 'lib', 'clang')
resourcetarget = os.path.join(install_dir, 'share', 'qtcreator', 'cplusplus', 'clang')
print "copying libclang..."
print libsource, '->', libtarget
shutil.copy(libsource, libtarget)
for libsource in libsources:
print libsource, '->', libtarget
copyPreservingLinks(libsource, libtarget)
print resourcesource, '->', resourcetarget
if (os.path.exists(resourcetarget)):
shutil.rmtree(resourcetarget)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment