diff options
author | Eike Ziller <eike.ziller@qt.io> | 2022-12-16 11:23:54 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2022-12-20 09:58:28 +0000 |
commit | 77dfa71f0618278ff974d0f274bb87fc36c91077 (patch) | |
tree | c1f020b25b48f5864f0d5e7dd669cf9dbab798c0 /scripts | |
parent | 70b33886843cde31ee4d6a46cad010e81885ae70 (diff) |
Deploying Qt: Clean up .cpp.o(bj) files when deploying Qt
These files are required when building against some static libraries
that Qt ships. Since we don't link against these libraries, we used to
remove them when we install Qt, but starting with Qt 6.5 some of these
files are required by the Qt CMake files, and configuration would fail.
So, we now have to remove them when deploying Qt, instead of already
when installing Qt.
Change-Id: Ie38ab3735b86df0372b946d6a808007b5ec84b88
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/deployqt.py | 7 | ||||
-rwxr-xr-x | scripts/deployqtHelper_mac.sh | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/scripts/deployqt.py b/scripts/deployqt.py index 50eb3eb125..05113e43e7 100755 --- a/scripts/deployqt.py +++ b/scripts/deployqt.py @@ -110,9 +110,12 @@ def is_ignored_windows_file(use_debug, basepath, filename): return False def ignored_qt_lib_files(path, filenames): + # Qt ships some unneeded object files in the qml plugins + # On Windows we also do not want to ship the wrong debug/release .dlls or .lib files etc if not common.is_windows_platform(): - return [] - return [fn for fn in filenames if is_ignored_windows_file(debug_build, path, fn)] + return [fn for fn in filenames if fn.endswith('.cpp.o')] + return [fn for fn in filenames + if fn.endswith('.cpp.obj') or is_ignored_windows_file(debug_build, path, fn)] def copy_qt_libs(target_qt_prefix_path, qt_bin_dir, qt_libs_dir, qt_plugin_dir, qt_qml_dir, plugins): print("copying Qt libraries...") diff --git a/scripts/deployqtHelper_mac.sh b/scripts/deployqtHelper_mac.sh index a4afd7f20a..b33795ae4a 100755 --- a/scripts/deployqtHelper_mac.sh +++ b/scripts/deployqtHelper_mac.sh @@ -145,6 +145,9 @@ if [ ! -d "$app_path/Contents/Frameworks/QtCore.framework" ]; then fi +# clean up unneeded object files that are part of Qt for some static libraries +find "$app_path" -ipath "*/objects-*" -delete + # clean up after macdeployqt # it deploys some plugins (and libs for these) that interfere with what we want echo "Cleaning up after macdeployqt..." |