diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-04-19 12:05:19 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-04-20 10:06:38 +0000 |
commit | 5c4576ac2c25cc51e55f59dddd5ea3c790379ad9 (patch) | |
tree | 90ad12262271ba515a3a868a8d75bd0a018526ca /packaging-tools/bld_qtcreator.py | |
parent | 61cec3904a378ac5984322e23966d624a8459c9a (diff) |
Qt Creator/qdoc: Add rpath to qdoc on macOS directly
When we modify the qdoc_wrapper script, this can be overwritten
again when we call 'make docs', so instead directly 'fix' qdoc itself.
Change-Id: Ic2363180aac98d269082a17af8aca589b83b0d48
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'packaging-tools/bld_qtcreator.py')
-rwxr-xr-x | packaging-tools/bld_qtcreator.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packaging-tools/bld_qtcreator.py b/packaging-tools/bld_qtcreator.py index ba6db1072..2b85ecb56 100755 --- a/packaging-tools/bld_qtcreator.py +++ b/packaging-tools/bld_qtcreator.py @@ -240,6 +240,10 @@ if __name__ == "__main__": if need_to_install_qt: patch_qt_pri_files(callerArguments.qt5path) bldinstallercommon.patch_qt(callerArguments.qt5path) + # TODO temporary workaround for qdoc not finding a suitable libclang in the system QTBUG-66015 + if bldinstallercommon.is_mac_platform() and os.environ.get('QDOC_LLVM_INSTALL_DIR'): + qdoc_lib_path = os.path.join(os.environ['QDOC_LLVM_INSTALL_DIR'], 'lib') + subprocess.check_call(['/usr/bin/install_name_tool', '-add_rpath', qdoc_lib_path, os.path.join(callerArguments.qt5path, 'bin', 'qdoc')]) ### lets start building @@ -294,14 +298,10 @@ if __name__ == "__main__": qdoc_environment['LD_LIBRARY_PATH'] = os.pathsep.join([qdoc_lib_path, qdoc_environment['LD_LIBRARY_PATH']]) elif bldinstallercommon.is_win_platform(): qdoc_environment['PATH'] = os.pathsep.join([qdoc_lib_path, qdoc_environment['PATH']]) - else: - # macOS System Integrity Protection prevents passing DYLD_LIBRARY_PATH through qdoc_wrapper.sh - # so we have to manually adapt the script instead - with open(os.path.join(qtCreatorBuildDirectory, 'qdoc_wrapper.sh'), 'r') as f: - lines = f.readlines() - lines.insert(1, 'export DYLD_LIBRARY_PATH="' + qdoc_lib_path + '"\n') - with open(os.path.join(qtCreatorBuildDirectory, 'qdoc_wrapper.sh'), 'w') as f: - f.writelines(lines) + # macOS System Integrity Protection prevents passing DYLD_LIBRARY_PATH through qdoc_wrapper.sh + # and that script can be re-generated by 'make docs', so we cannot modify that. + # Instead we added the @rpath to qdoc directly after "installing" Qt above + runInstallCommand("docs", currentWorkingDirectory = qtCreatorBuildDirectory, callerArguments = callerArguments, init_environment = qdoc_environment) |